RSA Decryption?

View: New views
2 Messages — Rating Filter:   Alert me  

RSA Decryption?

by Scott Neugroschl :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've got a client who's sending me a session key, formatted and encrypted in
1024 bit RSA per PKCS#1.
However, it's just the raw encrypted session key - 128 bytes, no wrappers or
envelopes.

How can I decrypt and import this session key?  Can I just call
cryptDecrypt() on it?  The manual gives
dire warnings about doing this.  Or is there a way that I can build an
exported key wrapper around this
so that I can call cryptImportKey?




_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.

Re: RSA Decryption?

by Peter Gutmann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Scott Neugroschl" <redfloyd@...> writes:

>I've got a client who's sending me a session key, formatted and encrypted in
>1024 bit RSA per PKCS#1.
>However, it's just the raw encrypted session key - 128 bytes, no wrappers or
>envelopes.
>
>How can I decrypt and import this session key?  Can I just call
>cryptDecrypt() on it?  The manual gives
>dire warnings about doing this.  Or is there a way that I can build an
>exported key wrapper around this
>so that I can call cryptImportKey?

You can pass it to cryptDecrypt() but then you'll have to perform the
unpadding yourself (this is particularly tricky for signatures, for wrapped
keys it shouldn't be that bad).

Peter.


_______________________________________________
Cryptlib mailing list
Cryptlib@... via Mail: cryptlib-request@...
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.