BCRYPT_DH_KEY_BLOB 结构 (bcrypt.h)

BCRYPT_DH_KEY_BLOB 结构用作内存中 Diffie-Hellman 公钥私钥BLOB 的标头。

语法

typedef struct _BCRYPT_DH_KEY_BLOB {
  ULONG dwMagic;
  ULONG cbKey;
} BCRYPT_DH_KEY_BLOB, *PBCRYPT_DH_KEY_BLOB;

成员

dwMagic

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

含义
BCRYPT_DH_PUBLIC_MAGIC
0x42504844
结构表示 Diffie-Hellman 公钥。
BCRYPT_DH_PRIVATE_MAGIC
0x56504844
结构表示 Diffie-Hellman 私钥。

cbKey

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

注解

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


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

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


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

要求

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

另请参阅

BCryptExportKey

BCryptImportKey