BCRYPT_DSA_KEY_BLOB 结构 (bcrypt.h)

BCRYPT_DSA_KEY_BLOB 结构用作数字签名算法的标头, (内存中的 DSA) 公钥私钥BLOB

语法

typedef struct _BCRYPT_DSA_KEY_BLOB {
  ULONG dwMagic;
  ULONG cbKey;
  UCHAR Count[4];
  UCHAR Seed[20];
  UCHAR q[20];
} BCRYPT_DSA_KEY_BLOB, *PBCRYPT_DSA_KEY_BLOB;

成员

dwMagic

确定此结构表示的键的类型。 这可以是以下值之一。

含义
BCRYPT_DSA_PUBLIC_MAGIC
0x42505344
结构表示 DSA 公钥。
BCRYPT_DSA_PRIVATE_MAGIC
0x56505344
结构表示 DSA 私钥。

cbKey

密钥的长度(以字节为单位)。

Count[4]

用于生成 q 的迭代次数(采用 big-endian 格式)。

Seed[20]

用于生成 q 的种子值(采用 big-endian 格式)。

q[20]

160 位质因子,采用 big-endian 格式。

注解

结构适用于长度等于或超过 512 位但小于或等于 1024 位的 DSA 键。

此结构用作较大缓冲区的标头。 DSA 公钥 BLOB (BCRYPT_DSA_PUBLIC_BLOB) 在连续内存中采用以下格式。 模数、生成器和公共数字采用 big-endian 格式。


BCRYPT_DSA_KEY_BLOB
Modulus[cbKey]    // Big-endian.
Generator[cbKey]  // Big-endian.
Public[cbKey]     // Big-endian.

DSA 私钥 BLOB (BCRYPT_DSA_PRIVATE_BLOB) 在连续内存中采用以下格式。 Modulus、Generator、Public 和 PrivateExponent 数字采用 big-endian 格式。


BCRYPT_DSA_KEY_BLOB
Modulus[cbKey]        // Big-endian.
Generator[cbKey]      // Big-endian.
Public[cbKey]         // Big-endian.
PrivateExponent[20]   // Big-endian.

要求

要求
最低受支持的客户端 Windows Vista [仅限桌面应用]
最低受支持的服务器 Windows Server 2008 [仅限桌面应用]
标头 bcrypt.h

另请参阅

BCryptExportKey

BCryptImportKeyPair