Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PKCS8 DER to RSA

45 views
Skip to first unread message

rene.r...@gmail.com

unread,
Oct 18, 2005, 9:12:24 AM10/18/05
to
hello all
i have this big trouble, i hope anyone can help me
im desperate
i received a DER file (*.key) with the following information accesible
from openssl with a given password
it displays through a pkcs8 -inform der ... blah blah blah
the following
-- BEGIN RSA PRIVATE KEY --
ewklwkelwkle [.......]
-- END RSA PRIVATE KEY --
So it is valid

What can i do, in order to get that key to rsa in c# in the way of the
public key <rsaparams><module><exponent> etc etc etc

Michel Gallant

unread,
Oct 18, 2005, 10:19:11 AM10/18/05
to
First have a look at this note on various formats:
http://www.jensign.com/JavaScience/PEM/pemformats.txt

You can use openssl to convert to more standard pkcs#8 format using something like
openssl pkcs8 -in key.pem -topk8 ....
and then use capi fn like CryptImportPKCS8() to get RSA keypair from pkcs#8
blob into a capi keystore (with named keycontainer). Then you can
access that named keycontainer from .NET.

Or you can write a converter fron pkcs#8 unencrypted format (PrivateKeyInfo) to
a capi PRIVATEKEYBLOB and extract out the modulus and exponent for
.NET usage. .. here's one converter:
http://www.jensign.com/JavaScience/PvkConvert

- Mitch Gallant
MVP Security

<rene.r...@gmail.com> wrote in message news:1129641144....@g14g2000cwa.googlegroups.com...

rene.r...@gmail.com

unread,
Oct 18, 2005, 11:43:06 AM10/18/05
to
thanks for replying Michel in so short time
i really appreciate you are taking precious time to do it
as i stated in my previous post i have that
Private Key (Traditional SSLeay RSAPrivateKey format) Encrypted file
(as i can match the header with your information about formats)
so it can be manipulated

is there any other way (other than capicom1 or 2) to do it , any
libraries able to do so ?
i found capicom (the blob to container thing) quite confusing, where
can i find concrete and maybe basic examples on how to invoke the
functions ?
i have saw your entire page and so the msdn published tutorials
and i can say i have tried

thanks in advance, my friend

thanks forums !

0 new messages