Problem displaying rsa private key.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Problem displaying rsa private key.

George Garner (online)
An rsa private key may be displayed using the following command (on MS Windows):

openssl rsa -inform PEM -in E:\Temp\private.pem -text -noout

When I execute this command I get the following partial results:

modulus:
    00:cd:a7:cc:46:17:97:e6:89:e7:bb:36:e2:4d:f0:
    32:1c:e7:e2:6f:18:de:80:73:2a:2b:48:f8:36:0c:
    ed:a4:55:a1:5f:d2:72:62:88:3c:15:8c:a5:31:89:
    f5:f6:83:d5:ba:19:f1:7d:1e:ae:5d:f9:5d:d9:4d:
    87:4f:27:b1:b2:a4:ac:a5:81:1f:41:51:5d:90:d6:
    0d:cc:3c:d5:56:47:ba:61:5d:2b:f9:85:36:0c:b7:
    76:aa:87:0e:2e:51:f9:b3:cf:24:b3:92:38:28:51:
    90:72:1c:d6:13:87:3b:cf:19:f8:80:e6:32:25:b0:
    79:9b:cb:d6:11:f4:68:be:2d:96:ce:42:a0:ee:0e:
    e7:14:5a:a4:38:80:c6:13:37:bb:dc:23:d7:e8:ea:
    e3:b7:49:af:74:21:6a:57:0d:d5:0a:18:a0:53:e8:
    e5:62:b5:b0:c0:36:82:f8:45:53:8b:ff:de:5e:1e:
    ef:dc:c3:e8:fa:69:ac:f6:1e:6a:18:f4:2f:43:98:
    c7:e0:e3:f9:ff:1a:d3:b4:9a:66:28:0c:de:aa:a9:
    60:a5:5b:eb:a2:a0:f7:9c:71:80:2b:26:76:1d:97:
    04:f3:4b:f6:3d:e0:77:ab:95:5b:47:14:04:3b:ad:
    54:8e:8d:84:1c:d5:0b:91:25:27:37:c2:2f:f9:0d:
    8c:73
publicExponent: 65537 (0x10001)

The public exponent is correct but the modulus has a spurious zero byte prepended to it in the display.  The modulus actually starts with 0xcd.  The private exponent and primes (not shown) exhibit a similar problem.  Was this the intention?

Regards,

George.

--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Problem displaying rsa private key.

OpenSSL - Dev mailing list
modulus:
    00:cd:a7:cc:46:17:97:e6:89:e7:bb:36:e2:4d:f0:

Without the leading zero, the 0xCD would be interpreted as a negative number according to ASN1/DER rules.
--
openssl-dev mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
Loading...