ECC Errors on Win 64 bit

With the latest version I get sporadic errors on ECC function only in Windows 64. Sometimes Signing functions, sometimes encryption/decryption. Win32 and Linux runs fine.


Would you mind having a look into that?
Hi Michael,
What are the errors ?
Could you provide me some code to test ?
Best regards,
Marion

As they are sporadic, it is difficult to reproduce. Sometimes my unit tests fail where I check given signatures or decrypt messages. As it only happens with Win64, i was wondering.


Is ist possible to get rid of randomdll.dll? I read a post where setting a define on compile time in newer delphis can achieve that.
OK I will investigate to reproduce this bug.

For RandomDLL.dll, you can get rid it by uncommenting //{$DEFINE IDEVERSION1021} in tmscrypto.inc if you have 3.4 version of TMS CP. Otherwise, you can find this line in each unit of TMS CP. It works only if you have RAD Studio 10.2.1 or newer.

Marion:


Please let me check first if it changes when I get rid of random.dll before you invest any effort. I will resturn with results!

Thanks a lot!
Michael

With the latest Update the problem seems to have disappeared. Thanks.

Hello Marion, 


the errors reappeared in my DUNITX unit tests in the latest version and I found out that calling some ECC functions in the initialization part of my cryptography wrapper unit for 64 bit seems to solve this. It looks like the first call to one of the functions seems to fail on 64 bit only and subsequent calls work perfectly. 

Regards
Michael

Hello Marion,


I rejoiced prematurely, the errors in ECC functions now persist in 90% of the Uunit test runs in Windows 64. I will rewrite everything to use RSA for now and hope there will be a fix that allows me using ECC in Windows 64 Bit in the future.

Regarding the environment I used Delphi 10.3 Rio Enterprise, the latest version(s) of TMS Cryptography Pack and ran the tests on clean Windows 7 and Windows 10 Build machines I use as CI runners for Gitlab.

Best regards
Michael

Update: 


I removed dependency to randomdll.dll by uncommenting {$DEFINE IDEVERSION1021}. 35 test runs of the unit tests went through eithout errors. Through the updates this was undefined and I had the dll still in the binaries of my unit tests so I didn't notice. Perhaps the dll is the root of all evil ;-) I will post if I run into errors again.

Michael