[Cryptography Team] Help with RSA
Ron Teitelbaum
Ron at USMedRec.com
Thu Aug 17 03:21:32 UTC 2006
Hello All,
I'm working on SSL / TLS implementation in Squeak and I need some help
understanding RSA.
It appears that our RSA implementation has an encodingParameter. I see what
it's doing but now I'm confused and was hoping that someone could explain
this to me.
I see that the parameter is needs to be the same for encrypting and
decrypting, or it doesn't work.
My question is how is this stored on a certificate?
Here is the MS Export format
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/seccrypto/s
ecurity/private_key_blobs.asp
Field
Description
blobheader
A BLOBHEADER structure as described in a previous section. The bType field
must always have a value of PRIVATEKEYBLOB.
rsapubkey
A
<http://msdn.microsoft.com/library/en-us/seccrypto/security/rsapubkey.asp>
RSAPUBKEY structure as described in Public
<http://msdn.microsoft.com/library/en-us/seccrypto/security/public_key_blobs
.asp> Key BLOBs. The magic field must always have a value of 0x32415352
("RSA2").
modulus
The modulus. This has a value of "prime1 * prime2" and is often known as
"n".
prime1
Prime number 1, often known as "p".
prime2
Prime number 2, often known as "q".
exponent1
Exponent 1. This has a numeric value of "d mod (p - 1)".
exponent2
Exponent 2. This has a numeric value of "d mod (q - 1)".
coefficient
Coefficient. This has a numeric value of "(inverse of q) mod p".
privateExponent
Private exponent, often known as "d".
I also noticed that : http://en.wikipedia.org/wiki/RSA
For reasons of efficiency sometimes a different form of the private key
(including CRT parameters) is stored:
* p and q, the primes from the key generation,
* d mod (p-1) and d mod (q-1) (often known as dmp1 and dmq1)
* (1/q) mod p (often known as iqmp)
Does this mean that the parameter is the coefficient? Is the CRT parameter
the encoding parameter? Any help would be very much appreciated, I'm having
trouble understanding the differences, and how the parameter is supposed to
be used.
Thanks!
Ron Teitelbaum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/cryptography/attachments/20060816/db773da3/attachment.htm
More information about the Cryptography
mailing list