Re: RSA keys
Andreas Steffen <[email protected]> Tue, 18 Mar 2003 14:52:22 +0100
| Newsgroups | gmane.network.freeswan.devel |
|---|---|
| Message-ID | <[email protected]> |
OpenSSL uses the PKCS#1 private key format which contains the same
elements as the FreeS/WAN private key format with the difference
that the encoding is in binary DER format based on the
following ASN.1 object definition:
RSAPrivateKey ::= SEQUENCE {
version INTEGER { rsaPrivateKeyVer0(0) }(rsaPrivateKeyVer0),
modulus INTEGER, -- (Usually large) n
publicExponent INTEGER, -- (Usually small) e
privateExponent INTEGER, -- (Usually large) d
prime1 INTEGER, -- (Usually large) p
prime2 INTEGER, -- (Usually large) q
exponent1 INTEGER, -- (Usually large) d mod (p-1)
exponent2 INTEGER, -- (Usually large) d mod (q-1)
coefficient INTEGER -- (Usually large) (inverse of q) mod p
}
To my knowledge nobody has written a tool yet that does
the conversion from FreeS/WAN ASCII format into binary DER format.
Such a tool could easily built using either the OpenSSL library or
some ASN.1 Perl modules. Unfortunately I haven't found the
time yet to do it.
Regards
Andreas
Roberto Barcellona wrote:
> I have to convert the public/private RSA keys format of FreeS/WAN in the RSA
> keys format of Openssl library. Does someone know the simplest way of doing
> it?
>
> Thanks in advance.
>
>
> ---------------------------------------------
> This message was sent using Endymion MailMan.
> http://www.endymion.com/products/mailman/
>
>
> _______________________________________________
> Design mailing list
> [email protected]
> http://lists.freeswan.org/mailman/listinfo/design
--
=======================================================================
Andreas Steffen e-mail: [email protected]
strongSec GmbH home: http://www.strongsec.com
Alter Zürichweg 20 phone: +41 1 730 80 64
CH-8952 Schlieren (Switzerland) fax: +41 1 730 80 65
==========================================[strong internet security]===
Content Security by MailMarshal