Hello!

I want to use openssl generated rsa keys in my custom rsa implementation. In order to do this, I have to interpret the
binary file created by: (host.key is the rsa key file)

$ openssl enc -d -base64 -in host.key

I suppose the funny outputs are the bignums from the

struct rsa_st  (crypto/rsa/rsa.h)

However, if I display the key file in human readable format,

$ openssl rsa -text -in host.key

open the binary output from the prior command in a hex editor
and search for, e.g., the modulus, I cannot find it. In brief,
the hexadecimal representation and the binary representation do
converge.

Thus, I conclude that there is some format in place, respectively
how do I know where a bignum starts and where it ends?

I tried to find a clue by browsing the sources, but I gave up
confused by all the asn1 parse and nested bio print functions.

Can some one please put me into the right direction? I appreciate
help and comments!

-Armin

ps: My custom rsa library is built on gmp, so I want to convert the
binary data to the mpz_t type later on.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to