BCRYPT_ECCKEY_BLOB structure

The BCRYPT_ECCKEY_BLOB structure is used as a header for an elliptic curve public key or private key BLOB in memory.

Syntax


typedef struct _BCRYPT_ECCKEY_BLOB {
  ULONG Magic;
  ULONG cbKey;
} BCRYPT_ECCKEY_BLOB, *PBCRYPT_ECCKEY_BLOB;

Members

Magic

Specifies the type of key this BLOB represents. The possible values for this member depend on the type of BLOB this structure represents. The following keys use the NIST 256-bit prime curve defined in FIPS 186-2.

ValueMeaning
BCRYPT_ECDH_PUBLIC_P256_MAGIC

The key is a 256 bit elliptic curve Diffie-Hellman public key.

BCRYPT_ECDH_PRIVATE_P256_MAGIC

The key is a 256 bit elliptic curve Diffie-Hellman private key.

BCRYPT_ECDH_PUBLIC_P384_MAGIC

The key is a 384 bit elliptic curve Diffie-Hellman public key.

BCRYPT_ECDH_PRIVATE_P384_MAGIC

The key is a 384 bit elliptic curve Diffie-Hellman private key.

BCRYPT_ECDH_PUBLIC_P521_MAGIC

The key is a 521 bit elliptic curve Diffie-Hellman public key.

BCRYPT_ECDH_PRIVATE_P521_MAGIC

The key is a 521 bit elliptic curve Diffie-Hellman private key.

BCRYPT_ECDSA_PUBLIC_P256_MAGIC

The key is a 256 bit elliptic curve DSA public key.

BCRYPT_ECDSA_PRIVATE_P256_MAGIC

The key is a 256 bit elliptic curve DSA private key.

BCRYPT_ECDSA_PUBLIC_P384_MAGIC

The key is a 384 bit elliptic curve DSA public key.

BCRYPT_ECDSA_PRIVATE_P384_MAGIC

The key is a 384 bit elliptic curve DSA private key.

BCRYPT_ECDSA_PUBLIC_P521_MAGIC

The key is a 521 bit elliptic curve DSA public key.

BCRYPT_ECDSA_PRIVATE_P521_MAGIC

The key is a 521 bit elliptic curve DSA private key.

 

cbKey

The length, in bytes, of the key.

Remarks

This structure is used as a header for a larger buffer. An elliptic curve public key BLOB (BCRYPT_ECCPUBLIC_BLOB) has the following format in contiguous memory. The X and Y coordinates are unsigned integers encoded in big-endian format.


BCRYPT_ECCKEY_BLOB
BYTE X[cbKey] // Big-endian.
BYTE Y[cbKey] // Big-endian.


An elliptic curve private key BLOB (BCRYPT_ECCPRIVATE_BLOB) has the following format in contiguous memory. The X and Y coordinates and d value are unsigned integers encoded in big-endian format.


BCRYPT_ECCKEY_BLOB
BYTE X[cbKey] // Big-endian.
BYTE Y[cbKey] // Big-endian.
BYTE d[cbKey] // Big-endian.


Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Bcrypt.h

See also

BCRYPT_KEY_BLOB
BCryptExportKey
BCryptImportKey

 

 

Show: