What sort of RSA private key format is this and how are they generared



  • I am used to seeing a regular private key, with the standard key block, but I just came across this type which carries extra information as you can see. What format is this and how are these generated (openssl CLI syntax)?

    • if not obvious,
      <snip>
      

      is my way of just reducing the size for easier reading.

    Public Key Info:
        Public Key Algorithm: RSA
        Key Security Level: High (3072 bits)
    
    modulus:
        00:d5:1a:d1:1e:1e:25:0e:70:9c:34:dc:49:04:1c:78
        <snip>
        b7:
    
    public exponent:
        01:00:01:
    
    private exponent:
        00:b7:1b:ab:c3:ad:33:3a:0d:18:ab:72:fc:6a:43:ec
        <snip>
        81:
    
    prime1:
        00:d6:d0:2f:95:b1:3f:33:35:f7:f7:52:3c:c1:a4:52
        <snip>
        39:
    
    prime2:
        <snip>
        f0:28:45:e5:7c:41:41:4a:e5:0e:bc:9f:6f:a8:10:5c
        6f:
    
    coefficient:
        <snip>
        43:7a:c8:13:bd:68:92:be:73:25:30:2f:96:47:4d:84
        
    
    exp1:
        7c:c9:6d:8b:20:ef:1c:d9:b2:15:8b:41:5e:20:0e:26
        <snip>
    
    
    exp2:
        <snip>
        87:64:0d:2c:85:48:9e:90:17:f3:7c:ef:a4:37:ff:f5
    
    
    Public Key PIN:
        pin-sha256:BKhVmaG9E0fMyBvVzuYbAHBezlvd7CxlF01wvtDdc0Y=
    Public Key ID:
        sha256:04a85599a1bd1347ccc81bd5cee61b00705ece5bddec2c65174d70bed0dd7346
        sha1:ebe2a85eb1bc413e57c30a08f6af9acc2c1441b5
    
    -----BEGIN RSA PRIVATE KEY-----
    MIIG4wIBAAKCAYEA1RrRHh4lDnCcNNxJBBx4satUlsqqKu6mBUObRqEZ125cOq7E
    <snip>
    -----END RSA PRIVATE KEY-----
    


  • OK, figured this out. Its from a standard ASN.1 structured RSA key. Turns out these extra components are built in and the following extras them.

    openssl rsa -text -in priv.key

    A breakdown here: https://etherhack.co.uk/asymmetric/docs/rsa_key_breakdown.html


Log in to reply
 

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2