I'll preface this with "no experience with Informix on Windows"...
According to the Error Messages document:https://www.ibm.com/docs/en/informix-servers/12.10?topic=informix-error-messages
-26009 Key generation failed.
The internal crypto library key generation API failed.
Which isn't super helpful but sounds like a missing library (.dll).
Given your "Initialization of Encryption...succeeded" messages on
startup, you probably are not missing a library, or it is not yet
initialized at that point yet.
On Linux, I ran nm(1) and grepped for 'crypt' on the libraries in
$INFORMIXDIR/lib. It looks like most of the encryption functions
are in libbsapsm.so, so I'd look to see if you have a libbsapsm.dll,
which would probably be the equvalent on Windows.
Of course the Informix library might be making a call to a Windows
library where a function was changed/moved between Windows 10 and 11.
You would have to run some sort of library trace tool on the Informix
process to track this down. It probably would not be trivial given
everything the Informix server is doing.
What is the size of mycrypt_column in your table?
Is it big enough to hold the encrypted format of the data?
See "1. Calculate the size of the encrypted column"https://www.ibm.com/docs/en/informix-servers/12.10?topic=encryption-encrypting-column-data
I ran a test with a varchar(10) field, inserted data unencrypted,
then ran the update to encrypt the data. It worked OK, but because
the column was not big enough to hold the encrypted format, when
trying to select data with decrypt_char I got the error:
26005: The encrypted data is wrong or corrupted
which is different from your error. When using a column size of
varchar(255) for the encrypted column, reinserting the encrypted
data, then decrypt_char worked OK.
Not sure if any of that helps you.
Sent: Thu January 19, 2023 06:52 PM
From: Bryce Stenberg
Subject: IDS 12.10 'Key generation failed' -26009 on Windows 11?
Windows 11 Pro 21H2
We recently got a couple of Windows 11 laptops for developers, so I installed Informix on them the same way I have always done for our Windows 10 machines.
All appears to install correctly but encrypt and decrypt of columns now does not work on either laptop.
So if I do: set encryption password "abcdefghijk";
update table1 set mycrypt_column = encrypt_aes("password") where 1 = 1;
Code -26009: Key generation failed.
Same error if I try a decrypt_char().
A web search hasn't given me much joy on how to resolve this.
We can't install v14 as we need to be in step with production which is still 12.10.
There are no clues in the online log.
Starting with 'oninit -j' shows these lines ralating to encryption:
Initialization of Encryption...succeeded
Initializing encryption-at-rest if necessary...succeeded
Anyone have any idea what is necessary under Windows 11 and IDS 12.10 to fix this?
Harness Racing New Zealand Inc.