Thus wrote vichy (vichy....@gmail.com):

> Dear all:
> I try to use "openssl genrsa -out 1024.private.key 1024" to generate
> rsa key pairs.
> if I remember correctly, 1024 is the size of n, the unit in bits and
> it will be one of public key paris.

> But when I generate the public key by the command,openssl rsa -in
> 1024.private.key -pubout.
> I cannot tell what the key value is.
> "MIGfMA.....FsvJULwIDAQAB" is 216 characters and if 8 bits for one
> character, it will be 1728 bits.

> it is far beyond the 1024 bits limitation.
> so I guess I interpret the value of n in the wrong way.
> How could I tell the exact key value from the output of "openssl rsa -pubout"?

kaiser@host:~ > openssl genrsa -out myKey.pem 1024
Generating RSA private key, 1024 bit long modulus
.........................................++++++
........++++++
e is 65537 (0x10001)
kaiser@host:~ > openssl rsa -in myKey.pem -noout -text
Private-Key: (1024 bit)
modulus:
    00:d5:2f:5d:8a:54:a5:9a:64:54:e8:6f:76:a3:f3:
    ...
publicExponent: 65537 (0x10001)
privateExponent:
    65:8b:af:41:c1:fa:33:e5:90:b0:3a:cf:c7:5e:7c:
...
prime1:
    00:ee:fd:32:06:ac:4e:87:f1:39:d6:64:7b:01:6e:
...
prime2:
    00:e4:5b:f9:90:f7:28:27:df:e9:47:e0:7c:02:0d:
...
exponent1:
    76:f7:b3:9f:7e:c6:d9:05:4c:35:5d:6f:9e:16:b4:
...
exponent2:
    5a:d5:0a:cb:d2:c3:b2:38:aa:3d:e0:d8:f2:a8:34:
...
coefficient:
    77:a3:3f:b1:22:e8:7b:ae:db:6c:44:86:3e:bb:28:
...

Best regards,

   Martin
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to