Public-key blobs (type PUBLICKEYBLOB) are used to store public keys. They have the following format:
BLOBHEADER blobheader;
RSAPUBKEY rsapubkey;
BYTE modulus[rsapubkey.bitlen/8];
The following table describes each public-key components. All values are in little endian format.
Field | Description |
---|---|
blobheader | A BLOBHEADER structure. The bType member must have a value of PUBLICKEYBLOB. |
rsapubkey | A RSAPUBKEY structure. The magic member should be set to "RSA1" (0x31415352) for public keys. Notice that the hex value is just an ASCII encoding of "RSA1." |
modulus | The public-key modulus data is located directly after the RSAPUBKEY structure. The size of this data will vary, depending on the size of the public key. The number of bytes can be determined by dividing the value of RSAPUBKEY's bitlen field by eight. |
Notice that public-key blobs are not encrypted, but contain public keys in plaintext form.