Note
某些信息与预发行产品有关,该产品在商业发布之前可能会进行大幅修改。 Microsoft对此处提供的信息不作任何明示或暗示的保证。 本主题中所述的功能在 Windows Insider Preview的预发行版本中提供。
此结构用于导入和导出后量子数字签名算法(PQDSA)的密钥。 The BCRYPT_PQDSA_KEY_BLOB structure is used as a header for a Post-Quantum Digital Signature algorithm (PQDSA) public key (byte-encoded encapsulation key) or private keyBLOB in memory.
Syntax
typedef struct _BCRYPT_PQDSA_KEY_BLOB {
ULONG dwMagic;
ULONG cbParameterSet; // Byte size of parameterSet[]
ULONG cbKey; // Byte size of key[]
// WCHAR parameterSet[cbParameterSet / sizeof(WCHAR)]; // Including \0 terminator
// BYTE key[cbKey]; // Key material
} BCRYPT_PQDSA_KEY_BLOB, *PBCRYPT_PQDSA_KEY_BLOB;
Fields
dwMagic
The dwMagic field is a 4-byte value that indicates the format of the key being used. 定义了以下值:
| Value | Meaning |
|---|---|
BCRYPT_MLDSA_PUBLIC_MAGIC0x4B505344 |
结构表示公钥。 |
BCRYPT_MLDSA_PRIVATE_MAGIC0x4B535344 |
结构表示扩展的私钥。 |
BCRYPT_MLDSA_PRIVATE_SEED_MAGIC0x53535344 |
结构表示私有种子。 |
cbParameterSet
紧跟在结构后面的缓冲区 parameterSet 的长度(以字节为单位)。 此缓冲区包含一个以 null 结尾的 Unicode 字符串,用于标识密钥的参数集。 当前支持以下值:
| parameterSet | cbParameterSet | Meaning |
|---|---|---|
BCRYPT_MLDSA_PARAMETER_SET_44L"44" |
6 | ML-DSA-44,安全类别 2。 |
BCRYPT_MLDSA_PARAMETER_SET_65L"65" |
6 | ML-DSA-65,安全类别 3。 |
BCRYPT_MLDSA_PARAMETER_SET_87L"87" |
6 | ML-DSA-87,安全类别 5。 |
cbKey
The length, in bytes, of the buffer key directly following parameterSet. 此大小是静态的,取决于所使用的密钥格式和参数集。
Remarks
后量子数字签名算法的使用者将使用 BCrypt API 的子集与 CNG 支持的现有(非量子后)数字签名算法相同的子集来执行算法支持的作。 These are:
- Algorithm handle manipulation: BCryptOpenAlgorithmProvider, BCryptCloseAlgorithmProvider
- Key management: BCryptGenerateKeyPair, BCryptImportKeyPair, BCryptExportKey, BCryptDestroyKey, BCryptFinalizeKeyPair
- Signature generation/verification: BCryptSignHash, BCryptVerifySignature
- Updating/Querying properties: BCryptGetProperty, BCryptSetProperty
Requirements
| Requirement | Value |
|---|---|
| 最低支持的客户端 | Windows 预览体验成员(内部版本 27843): 开始对 ML-DSA 的支持。 [仅限桌面应用] |
| 支持的最低服务器 | Windows 预览体验成员(内部版本 27843): 开始对 ML-DSA 的支持。 [仅限桌面应用] |
| Header | bcrypt.h |