Not on the following:
This is a TEST key; I'm never going to use it for anything.  Please
don't flame me to tell me
1) That I must always store my private key encrypted
2) That I should never publish my private key in a newsgroup mailing

That said, here's my question:
I'm using OpenSSL 0.9.3a on Linux v 2.0.36
I generated an RSA key and stored it in mykey.pem (unencrypted)
I  generated a certificate request (to stdout, so I could see the
results) with the following command line

openssl req -new -key mykey.pem -text

after answering the questions about country, state, name, etc, I
received output below, which clearly includes ALL of my RSA key.  I
expected the cert to contain (besides the header information) only
1) my modulus and public exponent
2) a digest signed with my private key

I'm sure that openssl can parse an RSA keyfile and select out the public
key portion, so I'm guessing that I executed the command incorrectly.

What's wrong?

A related question:
What's the command line to convert to/from plaintext/base64?


TIA

Mike Slass
WRQ, Inc.


Certificate Request:
    Data:
        Version: 0 (0x0)
        Subject: C=us, ST=a, L=b, O=c, OU=d, CN=e [EMAIL PROTECTED]
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
            RSA Public Key: (512 bit)
                Private-Key: (512 bit)
                modulus:
                    00:bf:1e:8c:45:f5:82:55:81:5f:26:29:02:3f:20:
                    34:fc:9d:00:b2:0d:f0:62:de:12:cf:ea:3c:bb:4e:
                    2e:e2:f9:1b:8a:f4:41:e6:63:fe:d8:12:f8:6b:55:
                    d4:fc:ae:2b:af:26:c9:f6:46:ec:36:e4:4c:64:97:
                    6f:4e:4f:8b:9b
                publicExponent: 65537 (0x10001)
                privateExponent:
                    50:91:a4:38:e9:e2:e4:01:02:07:a8:4a:16:2a:91:
                    ab:dc:d4:2a:3b:ce:17:1f:df:76:5f:1c:f3:29:66:
                    82:b0:1d:d2:8d:bb:ad:92:b7:0c:4c:88:22:f2:ba:
                    a0:0f:87:93:6c:f9:7a:61:b0:94:0b:55:d4:73:48:
                    f3:83:95:21
                prime1:
                    00:f7:2a:d8:76:8d:5f:d8:25:f1:ce:36:2b:77:83:
                    d3:97:af:86:25:f9:96:f4:ff:63:b1:ca:db:b9:3c:
                    fd:8f:cf
                prime2:
                    00:c5:f2:f5:ac:09:02:a0:33:43:8e:5b:e8:60:7c:
                    47:e1:fd:95:79:d9:f7:5c:3c:9e:33:57:b6:52:ee:
                    d8:8e:75
                exponent1:
                    00:b9:be:07:01:c0:68:40:64:f3:7c:46:15:10:31:
                    8e:f7:34:be:99:17:21:ac:67:a8:21:da:12:98:f8:
                    0e:8c:dd
                exponent2:
                    50:8f:80:cc:73:1e:4e:74:8e:99:f1:6d:b1:56:e3:
                    2a:66:39:df:4d:86:0e:53:dd:4e:a7:f3:db:ec:b8:
                    d5:c1
                coefficient:
                    78:bf:77:29:d6:87:a4:bc:93:de:b8:dd:e1:6d:78:
                    c8:e5:39:1c:8e:40:5d:55:d7:72:eb:e7:10:00:3d:
                    5a:0b
        Attributes:
            a0:00
    Signature Algorithm: md5WithRSAEncryption
        67:51:20:97:6d:b0:ff:49:a5:19:a3:3f:9e:fb:4b:0d:d5:1c:
        40:e9:54:9f:63:f9:fd:f7:34:bd:6d:52:89:ce:26:de:a2:b8:
        b8:ee:76:0b:92:80:35:e3:cf:f2:a6:8d:93:19:fb:8a:cb:ea:
        b5:16:06:ac:a2:ea:0b:95:8e:71
-----BEGIN CERTIFICATE REQUEST-----
MIIBHTCByAIBADBjMQswCQYDVQQGEwJ1czEKMAgGA1UECBMBYTEKMAgGA1UEBxMB
YjEKMAgGA1UEChMBYzEKMAgGA1UECxMBZDEMMAoGA1UEAxMDZSBmMRYwFAYJKoZI
hvcNAQkBFgdnQGguY29tMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAL8ejEX1glWB
XyYpAj8gNPydALIN8GLeEs/qPLtOLuL5G4r0QeZj/tgS+GtV1PyuK68myfZG7Dbk
TGSXb05Pi5sCAwEAAaAAMA0GCSqGSIb3DQEBBAUAA0EAZ1Egl22w/0mlGaM/nvtL
DdUcQOlUn2P5/fc0vW1Sic4m3qK4uO52C5KANePP8qaNkxn7isvqtRYGrKLqC5WO
cQ==
-----END CERTIFICATE REQUEST-----
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to