Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This structure, also known as the BLOBHEADERstructure, indicates a key's BLOB (Cryptography)type and the algorithm that the key uses. It is located at the beginning of the pbDatamember of every key BLOB.

This structure is not limited to the key BLOBstructures generated by the PROV_RSA_BASE and PROV_RSA_SIG provider types. The pbDataof any new key BLOBstructure type must begin with this structure.

Syntax

typedef struct _PUBLICKEYSTRUC {
  BYTE 
bType;
  BYTE 
bVersion;
  WORD 
reserved;
  ALG_ID 
aiKeyAlg;
} BLOBHEADER, PUBLICKEYSTRUC;

Members

bType

Key BLOBtype. The only BLOBtypes currently defined are PUBLICKEYBLOB, PRIVATEKEYBLOB, and SIMPLEBLOB. Other key BLOBtypes will be defined as needed.

PUBLICKEYBLOB types are used to transport public keys, PRIVATEKEYBLOBs are used to transport public/private key pairs, and SIMPLEBLOBs are used to transport session keys.

bVersion

Version number of the key BLOBformat. This member currently must always have a value of 0x02.

reserved

DWORDreserved for future use. This member must be set to zero.

aiKeyAlg

Algorithm identifier for the key contained by the key BLOBstructure. Some examples are CALG_RSA_SIGN, CALG_RSA_KEYX, CALG_RC2, and CALG_RC4.

Not all algorithm identifiers are valid with all BLOBtypes. For example, because an RC4 key is a session key, it cannot be exported into a PUBLICKEYBLOB.

Requirements

Header wincrypt.h
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also