[Cryptography Team] Help with RSA

Ron Teitelbaum Ron at USMedRec.com
Thu Aug 17 15:58:56 UTC 2006


Thank you Matt!

 

Ron

 

  _____  

From: Matthew S. Hamrick [mailto:mhamrick at cryptonomicon.net] 
Sent: Thursday, August 17, 2006 3:09 AM
To: Ron Teitelbaum
Subject: Re: [Cryptography Team] Help with RSA

 

Hey Ron...

 

I haven't been looking too closely at the official crypto source, so I can't
say for sure. But from the sound of it, maybe it's the message encoding
scheme for the RSA signature. There are two main encoding schemes: PKCS#1
and OAEP, though PKCS#1 now includes OAEP as an option. There's also
ISO9697, but I've never seen it used in conjunction with X.509. If this is
the encoding scheme, then it can be found in the ALGO oid in the
SubjectPublicKeyInfo portion of the cert.

 

Hope this helps.

 

-Cheers

-Matt H.

 

On Aug 16, 2006, at 8:21 PM, Ron Teitelbaum wrote:





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

_______________________________________________

Cryptography mailing list

Cryptography at lists.squeakfoundation.org

http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/cryptography

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/cryptography/attachments/20060817/73ce063d/attachment.htm


More information about the Cryptography mailing list