Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-14 Thread Tomasz Kaźmierczak
Thanks all for your help - I've finally managed to read the keys (now I have to also write a code that will write keys in the same format, but that shouldn't be much of a problem). Documents which helped me were the PKCS#1 v2.1 specification (for the format of the key certificates) and the

Re: Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-11 Thread carlyoung
On Tue 10/02/09 10:53 PM , Michael Sierchio ku...@tenebras.com sent: Tomasz Kaźmierczak wrote: I've managed to base64 decode a public key (at least I think so;). Now I'm trying to understand how to interpret the key data. I've found the definitions of RSAPublicKey and RSAPrivateKey structures

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-11 Thread Tomasz Kaźmierczak
Thanks, I've managed to find a direct link to the X.690 documentation on Wikipedia (http://en.wikipedia.org/wiki/Basic_Encoding_Rules#External_links). Now things are clarifying quickly. Kyle Hamilton pisze: For information on how they're encoded, please see ITU recommendation X.690 (DER).

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-10 Thread Tomasz Kaźmierczak
I've managed to base64 decode a public key (at least I think so;). Now I'm trying to understand how to interpret the key data. I've found the definitions of RSAPublicKey and RSAPrivateKey structures (in the PKCS #1: RSA Cryptography Standard), but there is no information about what are the

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-10 Thread Michael Sierchio
Tomasz Kaźmierczak wrote: I've managed to base64 decode a public key (at least I think so;). Now I'm trying to understand how to interpret the key data. I've found the definitions of RSAPublicKey and RSAPrivateKey structures (in the PKCS #1: RSA Cryptography Standard), but there is no

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-10 Thread Kyle Hamilton
For information on how they're encoded, please see ITU recommendation X.690 (DER). The full documentation on ASN.1 (the notation language) can be found in ITU recommendation X.680; you can also see http://www.oss.com/asn1/dubuisson.html (for a complete overview) and

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-06 Thread Tomasz Kaźmierczak
Thanks for the link, but I've already seen that, and unfortunately it didn't help... When I open the PEM files with keys in a plain text editor, the contents are different than what's shown on the linked page. In stead of: -BEGIN RSA PRIVATE KEY- Proc-Type: 4,ENCRYPTED DEK-Info:

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-06 Thread Kyle Hamilton
If it says -BEGIN RSA PRIVATE KEY-, then it is an unencrypted PKCS#1 RSA key structure which contains private exponent, public exponent, and modulus. -Kyle H On Fri, Feb 6, 2009 at 9:34 AM, Tomasz Kaźmierczak tome...@wp.eu wrote: Thanks for the link, but I've already seen that, and

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-06 Thread Tomasz Kaźmierczak
Ok. And it is of course base64 encoded, right? And what about the public key (-BEGIN RSA PUBLIC KEY-)? It looks the same way as the private key file, but it is shorter. Kyle Hamilton pisze: If it says -BEGIN RSA PRIVATE KEY-, then it is an unencrypted PKCS#1 RSA key structure

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-06 Thread Dr. Stephen Henson
On Fri, Feb 06, 2009, Tomasz Ka??mierczak wrote: Ok. And it is of course base64 encoded, right? And what about the public key (-BEGIN RSA PUBLIC KEY-)? It looks the same way as the private key file, but it is shorter. As I said in the other message thats an RSAPublicKey structure,

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-06 Thread Tomasz Kaźmierczak
Ok. Thanks for the answers. I'll try with this information. Regards, Tomasz Kaźmierczak Dr. Stephen Henson pisze: On Fri, Feb 06, 2009, Tomasz Kaźmierczak wrote: Ok. And it is of course base64 encoded, right? And what about the public key (-BEGIN RSA PUBLIC KEY-)? It looks the

documentation/description of RSA PEM file format used by OpenSSL

2009-02-05 Thread Tomasz Kaźmierczak
Hello, In the OpenSSL API there are functions called PEM_write_RSAPrivateKey(), PEM_write_RSAPublicKey() and corresponding read functions: PEM_read_RSAPrivateKey(), PEM_read_RSAPublicKey(). What I need is to read/write RSA keys to/from a file in exactly the same format as these functions do,

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-05 Thread Dr. Stephen Henson
On Thu, Feb 05, 2009, Tomasz Ka??mierczak wrote: Hello, In the OpenSSL API there are functions called PEM_write_RSAPrivateKey(), PEM_write_RSAPublicKey() and corresponding read functions: PEM_read_RSAPrivateKey(), PEM_read_RSAPublicKey(). What I need is to read/write RSA keys to/from a

Re: documentation/description of RSA PEM file format used by OpenSSL

2009-02-05 Thread Kyle Hamilton
http://www.rsa.com/rsalabs/node.asp?id=2124 has links to the PKCS formats (Public-Key Cryptography Standards). http://www.rfc-editor.org/rfc/rfc4648.txt has the documentation on the base64 encoding that the PEM_ functions work with. (This is in addition to the links that Dr. Henson has