PQC key token
The format of PQC public and private key tokens.
| Size of matrix (n x n) | NIST Round | Size of t1 in bits | OID in dot notation |
|---|---|---|---|
| CRYSTALS-Dilithium (6 x 5) | Round 2 | 13824 | 1.3.6.1.4.1.2.267.1.6.5 |
| CRYSTALS-Dilithium (8 x 7) | Round 2 | 18432 | 1.3.6.1.4.1.2.267.1.8.7 |
| CRYSTALS-Dilithium (6 x 5) | Round 3 | 15360 | 1.3.6.1.4.1.2.267.7.6.5 |
| CRYSTALS-Dilithium (8 x 7) | Round 3 | 20480 | 1.3.6.1.4.1.2.267.7.8.7 |
| CRYSTALS-Kyber (1024) | Round 2 | 12288 | 1.3.6.1.4.1.2.267.5.4.4 |
| Size of matrix (n x n) | OID in dot notation |
|---|---|
| ML-DSA pure (4,4) | 2.16.840.1.101.3.4.3.17 |
| ML-DSA pure (6,5) | 2.16.840.1.101.3.4.3.18 |
| ML-DSA pure (8,7) | 2.16.840.1.101.3.4.3.19 |
| ML-DSA pre-hash (4,4) | 2.16 .840.1.101.3.4.3.32 |
| ML-DSA pre-hash (6,5) | 2.16.840.1.101.3.4.3.33 |
| ML-DSA pre-hash (8,7) | 2.16.840.1.101.3.4.3.34 |
| ML-KEM (768) | 2.16.840.1.101.3.4.4.2 |
| ML-KEM (1024) | 2.16.840.1.101.3.4.4.3 |
A PQC key token is the concatenation of these ordered sections:
- A token header (required):
- An external header (first byte X'1E'). CCA does not support key export.
- An internal header (first byte X'1F'). Internal tokens are encrypted under the APKA MK-derived for PQC.
Supported CRYSTALS-Dilithium strengths
PKA key-token Header (8 bytes) 0 1 Token identifier (a flag that indicates token type): X'00' PKA null key-token. X'1E' PKA external key-token; the optional private-key is either in cleartext or enciphered by a transport key-encrypting key. X'1F' PKA internal key-token; the private key is enciphered by a master key.1 1 Token version number (X'00'). 2 2 Length in bytes of the token structure (big endian). 4 4 Reserved, binary zero. - PQC private-key (optional) section in one of the token types.
X’50’: PQC private key and OPK: SHA-256, AESKW encryption.
- PQC public-key (required) section.
X'51': PQC public key section
- PKA private-key name (optional) section (section identifier X'10') .
This section may be used on a CRYSTALS-Dilithium, CRYSTALS-Kyber, ML-KEM or ML-DSA key.
- PKA public-key certificate section (section identifier X'40' with subsidiary sections) .
NOT USABLE with CRYSTALS-Dilithium, CRYSTALS-Kyber, ML-KEM or ML-DSA keys. There is no certificate format defined.
PQC token sizes
CRYSTALS-Kyber (1024 Round 2) PQC token:
- header: 8 B
- private section: 1776 B
- public section: 1592 B
- Total (no extra sections) : 3376 B
CRYSTALS-Dilithium (8,7 Round 2) PQC token:
- header: 8 B
- private section: 5280 B
- public section: 2360 B
- Total (no extra sections) : 7648 B
CRYSTALS-Dilithium (8,7 Round 3) PQC token:
- header: 8 B
- private section: 5008 B
- public section: 2616 B
- Total (no extra sections) : 7632 B
CRYSTALS-Dilithium (6,5 Round 2) PQC token:
- header: 8 B
- private section: 4000 B
- public section: 1784 B
- Total (no extra sections) : 5792 B
CRYSTALS-Dilithium (6,5 Round 3) PQC token:
- header: 8 B
- private section: 4144 B
- public section: 1976 B
- Total (no extra sections) : 6128 B
| Offset (bytes) | Length (bytes) | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 000 | 001 | Section Identifier:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 001 | 001 | Section version number: X'00'. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 002 | 002 | Section length in bytes: 128 + ppp. X'00' (Clear key)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 002 (cont'd) | 002 (cont'd) | Section length in bytes: 128 + ppp. X'01' (Encrypted key)
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 004 | 002 | Length of associated data section in bytes: 54. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 006 | 002 | Reserved, binary zero. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 008 | 001 | Associated data section version number: X'01'. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 009 | 001 | Algorithm identifier:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 010 | 002 | Algorithm parameters: When 'Algorithm identifier' is X'01', allowed values are:
When 'Algorithm identifier' is X'02', allowed values are:
When 'Algorithm identifier' is X'03', allowed values are:
When 'Algorithm identifier' is X'04', allowed values are:
When 'Algorithm identifier' is X'05', allowed values are:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 010 (cont'd) | 002 (cont'd) | Algorithm parameters: When 'Algorithm identifier' is X'06', allowed values are:
When 'Algorithm identifier' is X'07', allowed values are:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 012 | 001 | Key format: External token:
Internal token:
All other values are reserved and undefined. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 013 | 001 | Key source flag byte: External token:
Internal token:
All other values are reserved and undefined. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 014 | 001 | Compliance and export control byte:
All other values are reserved and undefined. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 015 | 001 | Hash type:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 016 | 002 | Usage bytes, based on RFC 5280
(page 29: Bits in the KeyUsage type are used as follows): Byte 48, bit number definitions, mapping to X.509, mapping to CCA CSNDPKB keywords, mapping to CCA services: dl
Byte 2:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 018 | 032 | SHA-256 hash value of:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 050 | 002 | 'aaa' = PQC payload component 1 length. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | aaa item description | aaa value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0605' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0807' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'0768' | length of secret polynomial vector | 1152 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'1024' | length of secret polynomial vector | 1536 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0605' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0807' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'0768' | length of secret polynomial vector | 1152 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'1024' | length of secret polynomial vector | 1536 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0404' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0605' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0807' | length of key D, also called 'seed' | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'1024' | length of secret polynomial vector | 1536 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'0768' | length of secret polynomial vector | 1152 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 052 | 002 | 'bbb' = PQC payload component 2 length. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | bbb item description | bbb value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0605' | length of tr T : prf output | 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0807' | length of tr T : prf output | 48 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'0768' | length of public key integrity check | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'1024' | length of public key integrity check | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0605' | length of tr T : prf output | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0807' | length of tr T : prf output | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'0768' | length of public key integrity check | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'1024' | length of public key integrity check | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0404' | length of tr T : prf output | 64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0605' | length of tr T : prf output | 64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0807' | length of tr T : prf output | 64 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'1024' | length of public key integrity check | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'0768' | length of public key integrity check | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 054 | 002 | 'ccc' = PQC payload component 3 length. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | ccc item description | ccc value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0605' | length of vector 's1', of L elements | 480 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0807' | length of vector 's1', of L elements | 672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'0768' | length of random data | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'1024' | length of random data | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0605' | length of vector 's1', of L elements | 640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0807' | length of vector 's1', of L elements | 672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'0768' | length of random data | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'1024' | length of random data | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0404' | length of vector 's1', of L elements | 384 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0605' | length of vector 's1', of L elements | 640 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0807' | length of vector 's1', of L elements | 672 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'1024' | length of random data | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'0768' | length of random data | 32 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 056 | 002 | 'ddd' = PQC payload component 4 length. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | ddd item description | ddd value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0605' | length of vector 's2', of K elements | 576 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0807' | length of vector 's2', of K elements | 768 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'0768' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'1024' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0605' | length of vector 's2', of K elements | 768 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0807' | length of vector 's2', of K elements | 768 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'0768' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'1024' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0404' | length of vector 's2', of K elements | 384 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0605' | length of vector 's2', of K elements | 768 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0807' | length of vector 's2', of K elements | 768 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'1024' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'0768' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 058 | 002 | 'eee' = PQC payload component 5 length. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | eee item description | eee value | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0605' | length of 't0', K * high bits (vector) | 2688 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'01' | X'0807' | length of 't0', K * high bits (vector) | 3584 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'0768' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'02' | X'1024' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0605' | length of 't0', K * high bits (vector) | 2496 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'03' | X'0807' | length of 't0', K * high bits (vector) | 3328 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'0768' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'04' | X'1024' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0404' | length of 't0', K * high bits (vector) | 1664 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0605' | length of 't0', K * high bits (vector) | 2496 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'05'/X'07' | X'0807' | length of 't0', K * high bits (vector) | 3328 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'1024' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| X'06' | X'0768' | not used | 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 060 | 002 | Reserved, binary zero. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 062 | 056 | Object Protection key (OPK) data: The OPK consists of a 16-byte
confounder and a 256-bit AES key, followed by 8 bytes of AESKW overhead. External token:
Internal token
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 118 | 008 | Key verification pattern (KVP): When 'Key format' (offset 12) is:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 126 | 002 | Reserved, binary zero | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 | ppp = (6 + 1 + 1 + 4 + 32 = 44) + (padlen>>3) + aaa + bbb + ccc + ddd + eee | Formatted section (payload), including private key payload
fields:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 128 (cont'd) | ppp = (6 + 1 + 1 + 4 + 32 = 44) + (padlen>>3) + aaa + bbb + ccc + ddd + eee (cont'd) |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Offset (bytes) | Length (bytes) | Description | |||
|---|---|---|---|---|---|
| 000 | 001 | Section Identifier:
|
|||
| 001 | 001 | Section version number: X'00'. | |||
| 002 | 002 | Section length: 24 + aaa + bbb
|
|||
| 004 | 001 | Key format:
|
|||
| 005 | 001 | Algorithm identifier:
|
|||
| 006 | 002 | Algorithm parameters: When 'Algorithm identifier' is X'01', allowed values are:
When 'Algorithm identifier' is X'02', allowed values are:
When 'Algorithm identifier' is X'03', allowed values are:
When 'Algorithm identifier' is X'04', allowed values are:
When 'Algorithm identifier' is X'05', allowed values are:
|
|||
| 006 (cont'd) | 002 (cont'd) | Algorithm parameters: When 'Algorithm identifier' is X'06', allowed values are:
When 'Algorithm identifier' is X'07', allowed values are:
|
|||
| 008 | 002 | Usage bytes, based on RFC 5280
(page 29: Bits in the KeyUsage type are used as follows): bit number definitions, mapping to X.509, mapping to CCA CSNDPKB keywords, mapping to CCA services: Byte 8:,
Byte 9:,
|
|||
| 010 | 002 | 'aaa' = PQC public component 1 length. | |||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | aaa item description | aaa value | ||
| X'01' | X'0605' | length of 'rho', also called 'nonce' | 32 | ||
| X'01' | X'0807' | length of 'rho', also called 'nonce' | 32 | ||
| X'02' | X'0768' | length of public polynomial vector | 1152 | ||
| X'02' | X'1024' | length of public polynomial vector | 1536 | ||
| X'03' | X'0605' | length of 'rho', also called 'nonce' | 32 | ||
| X'03' | X'0807' | length of 'rho', also called 'nonce' | 32 | ||
| X'04' | X'0768' | length of public polynomial vector | 1152 | ||
| X'04' | X'1024' | length of public polynomial vector | 1536 | ||
| X'05'/X'07' | X'0404' | length of 'rho', also called 'nonce' | 32 | ||
| X'05'/X'07' | X'0605' | length of 'rho', also called 'nonce' | 32 | ||
| X'05'/X'07' | X'0807' | length of 'rho', also called 'nonce' | 32 | ||
| X'06' | X'1024' | length of public polynomial vector | 1536 | ||
| X'06' | X'0768' | length of public polynomial vector | 1152 | ||
| 012 | 002 | 'bbb' = PQC public component 2 length. | |||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | bbb item description | bbb value | ||
| X'01' | X'0605' | length of 't1' : K*low bits (vector) | 1728 | ||
| X'01' | X'0807' | length of 't1' : K*low bits (vector) | 2304 | ||
| X'02' | X'0768' | length of public seed | 32 | ||
| X'02' | X'1024' | length of public seed | 32 | ||
| X'03' | X'0605' | length of 't1' : K*low bits (vector) | 1920 | ||
| X'03' | X'0807' | length of 't1' : K*low bits (vector) | 2560 | ||
| X'04' | X'0768' | length of public seed | 32 | ||
| X'04' | X'1024' | length of public seed | 32 | ||
| X'05'/X'07' | X'0404' | length of 't1' : K*low bits (vector) | 1280 | ||
| X'05'/X'07' | X'0605' | length of 't1' : K*low bits (vector) | 1920 | ||
| X'05'/X'07' | X'0807' | length of 't1' : K*low bits (vector) | 2560 | ||
| X'06' | X'1024' | length of public seed | 32 | ||
| X'06' | X'0768' | length of public seed | 32 | ||
| 014 | 010 | Reserved, binary zero. | |||
| 024 | aaa | PQA public component 1 | |||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | aaa item description | aaa length | ||
| X'01' | X'0605' | rho', also called 'nonce' | 32 | ||
| X'01' | X'0807' | rho', also called 'nonce' | 32 | ||
| X'02' | X'1024' | public polynomial vector | 1536 | ||
| X'03' | X'0605' | rho', also called 'nonce' | 32 | ||
| X'03' | X'0807' | rho', also called 'nonce' | 32 | ||
| X'05'/X'07' | X'0404' | 'rho', also called 'nonce' | 32 | ||
| X'05'/X'07' | X'0605' | 'rho', also called 'nonce' | 32 | ||
| X'05'/X'07' | X'0807' | 'rho', also called 'nonce' | 32 | ||
| X'06' | X'1024' | length of public polynomial vector | 1536 | ||
| X'06' | X'0768' | length of public polynomial vector | 1152 | ||
| 024 + aaa | bbb | PQA public component 2 | |||
| Algorithm identifier (offset 9) | Algorithm parameter (offset 10) | bbb item description | bbb length | ||
| X'01' | X'0605' | 't1' : K*low bits (vector) | 1728 | ||
| X'01' | X'0807' | 't1' : K*low bits (vector) | 2304 | ||
| X'02' | X'1024' | public seed | 32 | ||
| X'03' | X'0605' | 't1' : K*low bits (vector) | 1920 | ||
| X'03' | X'0807' | 't1' : K*low bits (vector) | 2560 | ||
| X'05'/X'07' | X'0404' | 't1' : K*low bits (vector) | 1280 | ||
| X'05'/X'07' | X'0605' | 't1' : K*low bits (vector) | 1920 | ||
| X'05'/X'07' | X'0807' | 't1' : K*low bits (vector) | 2560 | ||
| X'06' | X'1024' | public seed | 32 | ||
| X'06' | X'0768' | public seed | 32 | ||