Hello,
we are using the following code to decrypt a string with 39 characters (encrypted to 346 characters as base 64). Decrypting takes over 1 second. Using the TMS Cryptography Pack demo it's slow, too.
When using it in one of our containers which doesn't have a lot of performance it takes up to 40 seconds.
We also tried setting "withOpenSSL := true" and using "FromOpenSSLPrivateKey" with the same result.
When we use openssl.exe as a command line it takes about 10 to 20 miliseconds.
Is there a reason why it is so slow if the use TRSAEncSign? Any way to increase the speed? Did we use any wrong settings?
We need to use "epkcs1_5" in this case but also tried using oaep with no change in speed.
FRSAEnc := TRSAEncSign.Create(nil);
FRSAEnc.keyLength := kl2048;
FRSAEnc.outputFormat := base64;
FRSAEnc.Unicode := yesUni;
FRSAEnc.encType := epkcs1_5;
FRSAEnc.FromPrivateKey(PrivKey);
var decrStr := FRSAEnc.Decrypt(Request.Headers.Get('Key'));