Open
Description
Hi,
I am trying to use the RSA module to do some signature verification, and I found that the byte order of TLbBigInt
to be kind of funny.
If I do this to load pubkey.der
which was generated using OpenSSL
,
pubKey := TLbRSAKey.Create(aks1024);
pubKey.LoadFromFile('pubkey.der');
then the modular exponentiation seems to be wrong. Somehow I had to reverse the byte order of the modulus to make it working.
However, even if the modular exponentiation works, the signature verification cannot succeed, because at line 688 of LbRSA.pas
, the byte orders of SHA1Digest1
and SHA1Digest2
are reverse of each other (I checked the Local Variables by using adding a breakpoint there), and thus Result
will be False
.
Any thoughts on this?
Metadata
Metadata
Assignees
Labels
No labels