次の方法で共有


BCRYPT_MLKEM_KEY_BLOB structure

Note

一部の情報は、市販される前に大幅に変更される可能性があるプレリリース製品に関連しています。 Microsoft は、ここで提供される情報に関して明示的または黙示的な保証を行いません。 このトピックで説明する機能は、Windows Insider Previewのプレリリース バージョンで使用できます。

The BCRYPT_MLKEM_KEY_BLOB structure is used as a header for an ML-KEM public key (byte-encoded encapsulation key) or private keyBLOB in memory.

Syntax

typedef struct _BCRYPT_MLKEM_KEY_BLOB {
  ULONG dwMagic;
  ULONG cbParameterSet;             // Byte size of parameterSet[]
  ULONG cbKey;                      // Byte size of key[]
  // WCHAR parameterSet[cbParameterSet / sizeof(WCHAR)];  // Including \0-terminated
  // BYTE key[cbKey];                                     // Key material
} BCRYPT_MLKEM_KEY_BLOB, *PBCRYPT_MLKEM_KEY_BLOB;

Fields

dwMagic

The dwMagic field is a 4-byte value that indicates the format of the key being used. 次の値が定義されています。

Value Meaning
BCRYPT_MLKEM_PUBLIC_MAGIC0x504B4C4D 構造体は公開キーを表します。
BCRYPT_MLKEM_PRIVATE_MAGIC0x524B4C4D この構造体は、展開された秘密キーを表します。
BCRYPT_MLKEM_PRIVATE_SEED_MAGIC0x534B4C4D 構造体はプライベート シードを表します。

cbParameterSet

The length, in bytes, of the buffer parameterSet directly following the struct. このバッファーには、キーのパラメーター セットを識別する null で終わる Unicode 文字列が含まれています。 The following values (per FIPS 203) are currently supported:

parameterSet cbParameterSet Meaning
BCRYPT_MLKEM_PARAMETER_SET_512L"512" 8 ML-KEM-512、セキュリティ カテゴリ 1。
BCRYPT_MLKEM_PARAMETER_SET_768L"768" 8 ML-KEM-768、セキュリティ カテゴリ 3。
BCRYPT_MLKEM_PARAMETER_SET_1024L"1024" 10 ML-KEM-1024、セキュリティ カテゴリ 5。

cbKey

The length, in bytes, of the buffer key directly following parameterSet. このサイズは静的であり、使用中のキーの形式とパラメーターセットによって異なります。

Remarks

BCRYPT_MLKEM_PRIVATE_SEED_BLOB supports import and export of ML-KEM seeds. The blob has dwMagic value BCRYPT_MLKEM_PRIVATE_SEED_MAGIC and the key field contains the KEM seed (defined as the 64-byte concatenation of d || z per FIPS 203), so cbKey is currently always 64.

BCRYPT_MLKEM_PRIVATE_BLOB (also aliased as BCRYPT_MLKEM_DECAPSULATION_BLOB) supports import and export of standard byte-encoded ML-KEM decapsulation keys per FIPS 203. The blob has dwMagic value BCRYPT_MLKEM_PRIVATE_MAGIC and the key field contains the byte-encoded key.

BCRYPT_MLKEM_PUBLIC_BLOB (also aliased as BCRYPT_MLKEM_ENCAPSULATION_BLOB) supports import and export of standard byte-encoded ML-KEM encapsulation keys per FIPS 203. The blob has dwMagic value BCRYPT_MLKEM_PUBLIC_MAGIC and the key field contains the byte-encoded key.

The byte sizes of the byte-encoded keys can be found in FIPS 203 Section 8 Table 3. Many callers can instead dynamically query the required blob sizes using BCryptExportKey with NULLpbOutput.

Requirements

Requirement Value
サポートされる最小クライアント Windows Insider (ビルド 27843): ML-KEM のサポートが開始されます。 [デスクトップ アプリのみ]
サポートされている最小のサーバー Windows Insider (ビルド 27843): ML-KEM のサポートが開始されます。 [デスクトップ アプリのみ]
Header bcrypt.h

See also

BCryptGenerateKeyPair

BCryptImportKeyPair

BCryptFinalizeKeyPair

BCryptExportKey

BCryptGetProperty

BCryptSetProperty

BCryptEncapsulate

BCryptDecapsulate