BCRYPT_DSA_PARAMETER_HEADER structure (bcrypt.h)

The BCRYPT_DSA_PARAMETER_HEADER structure is used as a header for a Digital Signature Algorithm (DSA) parameters BLOB containing information for generating a DSA key. This structure is used with the BCRYPT_DSA_PARAMETERS property in the BCryptSetProperty function.

Syntax

typedef struct _BCRYPT_DSA_PARAMETER_HEADER {
  ULONG cbLength;
  ULONG dwMagic;
  ULONG cbKeyLength;
  UCHAR Count[4];
  UCHAR Seed[20];
  UCHAR q[20];
} BCRYPT_DSA_PARAMETER_HEADER;

Members

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.

This member must be the following value.

BCRYPT_DSA_PARAMETERS_MAGIC (0x4d505344)

cbKeyLength

The size, in bytes, of the key that this structure applies to.

Count[4]

The number of iterations performed to generate the prime number q from the seed.

Seed[20]

The seed value, in big-endian format, used to generate q.

q[20]

The 160-bit prime factor, in big-endian format.

Remarks

When using this structure in a BCryptSetProperty call, to set the parameters for a DSA key created in a BCryptGenerateKeyPair call, (cbKeyLength*8) must equal the previously set dwLength.

The structure applies to DSA keys that equal or exceed 512 bits in length but are less than or equal to 1024 bits.

This structure is used as a header for a larger buffer. The DSA parameters blob has the following format in contiguous memory. The Modulus and Generator are in big-endian format.


BCRYPT_DSA_PARAMETER_HEADER
Modulus[cbKeyLength]    // Big-endian.
Generator[cbKeyLength]  // Big-endian.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header bcrypt.h

See also

BCryptGenerateKeyPair

BCryptSetProperty

Cryptography Primitive Property Identifiers