tags:

views:

37

answers:

1

Is there any documentation on what the bignums in the body are?

Like here is an example pubkey.

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIBMgigwcBaB3sqogC/yVPANQJKjMwOvrdOKhBIVlI2eOIq6FEyzNI8cbRDbHo5muipun922bLoV+p/dPZ2/8wJ+zugLM8eCdsr+VbYZ3T5wb7bjd2swePOWtffnsXnHiP8aWyRj64vd/mRPR1gYErg8vb7vM5c4B2ANKHs/rP65Bw== rsa-key-20100514

It contains 3 bignums with the sizes 7, 1, 128. Now I am assuming the 128 is the key while the 7 is the shared. But what about the other one? Also the privkey contains a lot more bignums which I have no idea what they are.

Edit:

So apparently what I am looking for is the format of the private key blob. I have searched and all I have found are references to the name and not the actual format.

A: 

The number with size 1 is the "version". What you observe is the encoding of a structure which contains the key elements. The structure follows ASN.1 conventions and encoding rules. In the case of RSA, the contents of the public and private keys are specified by PKCS#1 (see annex C for the ASN.1 specification, and section 3 for the human readable text).

Thomas Pornin
Where in the PKCS does it say what the different bignums are?
In annex C for the ASN.1 specification, in section 3 for the human readable text.
Thomas Pornin
I meant in the above structure. Like how am I supposed to know which ones in the ssh private key are which?