Slow RSA Decryption

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'));

Hi,
RSA is slow in full Delphi mode (I think it's mentioned in the manual). It is due to at least 3 things: lots of checks, data structures and Delphi that is slower than C (the library was written in C up to 4.3, with Delphi wrappers).
I'll improve that in future releases but it will never be as fast as C code.
Regards,
bernard