The BCRYPT_DH_PARAMETER_HEADER structure is used to contain parameter header information for a Diffie-Hellman key. This structure is used with the BCRYPT_DH_PARAMETERS property in the BCryptSetProperty function.
typedef struct _BCRYPT_DH_PARAMETER_HEADER {
ULONG cbLength;
ULONG dwMagic;
ULONG cbKeyLength;
} BCRYPT_DH_PARAMETER_HEADER;
cbLength
The total size, in bytes, of this structure and the buffer that immediately follows this structure in memory.
dwMagic
The magic value for the key.
cbKeyLength
The size, in bytes, of the key that this structure applies to.
This structure is used as a header for a larger buffer. The single memory block consists of this structure followed by a buffer of cbKeyLength size that contains the Diffie-Hellman prime number, and another buffer of cbKeyLength size that contains the Diffie-Hellman generator number. Both of these numbers are in big-endian format.
The following example shows how to calculate the sizes needed for this buffer and how to fill in the members of this structure.
Header: Declared in bcrypt.h.
Library: Use bcrypt.lib.