Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Security / October 2005

Tip: Looking for answers? Try searching our database.

PKCS8 DER to RSA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rene.rugerio@gmail.com - 18 Oct 2005 14:12 GMT
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 - 18 Oct 2005 15:19 GMT
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

> hello all
> i have this big trouble, i hope anyone can help me
[quoted text clipped - 10 lines]
> 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
rene.rugerio@gmail.com - 18 Oct 2005 16:43 GMT
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 !

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.