ECC Key Generation Linux

Hello,


This code beglow works in OSX and WIndows perfectly, it hangs infinitively when run in Linux. Can you help, please? Thanks in advance!

Michael

var
  ecc: TEccEncSign;
begin
  ecc := TEccEncSign.create(nil);
  try
    ecc.eccType := cc25519;
    ecc.outputFormat := base64;
    ecc.GenerateKeys;
    pubkey := ecc.PublicKey;
    privkey := ecc.privatekey;
  finally
    ecc.Free;
  end;


Hi,
The problem is that RandomBuffer in Linux is waiting for entropy to run because it calls /dev/random. I will change that to /dev/urandom to not being blocked. I will release a new version in the next days.
Best regards,
Marion

Thanks, you guys are awsome!

Hi, I installed the latest version (as of 24.1.) but unfortunately key generation still hangs run on the latest ubuntu server 64bit. Would you mind looking into it once more?

Hi,
I have just tested on Ubuntu 64-bit server 16.04 and it works on it. In the latest version, I have just changed the libTMSCPlib.a file in libLinux folder. Maybe there was an issue with the update of this file!?
I will check that.
Best regards,
Marion
Do you have the 3.3.2.1 version of TMS Cryptography Pack?
Marion

Hello Marion, 

yes, I use 3.3.2.1. 
Best regards
Michael

Hello Marion,


ECC may not be the problem any more but the update introduced a new problem. I have a big bunch of unit tests running on my foundation classes and they ran fine in Linux in the last version when I commented out the ECC stuff, WIndows and OSX are fine with everything. 

With Version 3.3.2.1 AES decryption has a Problem. I encrypt "Penner17" and get "enner17#0#0#0...." as a result using the same routines like before and only in Linux. 

Would you mind looking into that once more?

Best regards,

Michael

Hello,
Linux is a particular platform for us, because we cannot use PAnsiChar on it (as in Windows or MacOS) but it is a desktop platform so string index begins to 1 and not 0. That is why there could be more bugs than on other platforms.
I have fixed the bug, I will release a new version soon.
Best regards,
Marion

Thanks a lot. I love the TMS cryptography pack! Linux indeed involves a lot more effort in Delphi, I also experienced that in my development.



Best regards

Michael

If I can help by testing at least the ECC and AES parts, I just have to include it in my automated Unit Tests going across Ubuntu Server, Windows and OSX Mojave Machines on my Servers.

Thanks for fixing everything this fast.