AES DESUSECV variable-length symmetric key token
View a table showing the format of the DESUSECV variable-length symmetric key-token.
Offset (bytes) | Length (bytes) | Description |
---|---|---|
Header | ||
000 | 01 | Token identifier:
All unused values are reserved and undefined. |
001 | 01 | Reserved, binary zero. |
002 | 02 | Length in bytes of the overall token structure: 46 + (2 * kuf) + (2 * kmf) + kl + iead + uad + ((pl + 7) / 8) Key token Minimum and maximum token length External 46 + (2 * 1) + (2 * 1) + 0 + 11 + 0 + ((576 + 7) / 8) = 133 |
004 | 01 |
Token version number (identifies the format of this key token):
|
005 | 03 |
Reserved, binary zero. |
End of header | ||
Wrapping information section (all data related to wrapping the key) | ||
008 | 01 | Key material state:
All unused values are reserved and undefined. |
009 | 01 | Key verification pattern (KVP) type:
All unused values are reserved and undefined. |
010 | 16 | KVP:
The field contains the KVP of the key-encrypting key used to wrap the key. The 8-byte KEK KVP is left-aligned in the field and padded on the right low-order bytes with binary zeros. The key token is external. |
026 | 01 |
Encrypted section key-wrapping method (how data in the encrypted section is protected):
All unused values are reserved and undefined. |
027 | 01 | Hash algorithm used for wrapping key. The value indicates the algorithm used to calculate
the message digest of the associated data. The message digest is included in the wrapped payload and
is calculated starting at offset 30 for the length in bytes of all the associated data for the key
token (length value at offset 32).
All unused values are reserved and undefined. The key token is external. |
028 | 01 | Payload format version (identifies format of the payload):
All unused values are reserved and undefined. |
029 | 01 | Reserved, binary zero. |
End of wrapping information section | ||
AESKW components: (1) associated data section and (2) optional wrapped AESKW payload | ||
Associated data section | ||
030 | 01 | Associated data section version:
|
031 | 01 | Reserved, binary zero. |
032 | 02 | Length in bytes of all the associated data for thekey token: 31. |
034 | 01 | Length in bytes of the optional key label (kl): 0. |
035 | 01 | Length in bytes of the optional IBM extended associated data (iead): 11. |
036 | 01 | Length in bytes of the optional user-definable associated data (uad): 0. |
037 | 01 | Reserved, binary zero. |
038 | 02 | Length in bits of the wrapped payload (pl): 576.
For an AESKW formatted payload, pl is based on the key size of the algorithm type and the payload format version: DES algorithm (value at offset 41 is X'01') A DES key can have a length of 8, 16, or 24 bytes (64, 128, 192 bits). A DES key in an AESKW formatted payload is always wrapped with a V1 payload and has a fixed length payload of 576 bits. |
040 | 01 | Reserved, binary zero. |
041 | 01 | Algorithm type (algorithm for which the key can be used):
All unused values are reserved and undefined. |
042 | 02 | Key type (general class of the key):
All unused values are reserved and undefined. |
044 | 01 | Key usage fields count (kuf): 1. Key-usage field information defines restrictions
on the use of the key.
Each key-usage field is 2 bytes in length. The value in this field indicates how many 2-byte key usage fields follow. |
045 | 01 | Key-usage field 1, high-order byte (reserved).
All bits are reserved and must be zero. |
046 | 01 | Key-usage field 1, low-order byte (reserved).
All bits are reserved and must be zero. |
047 | 01 | Key management fields count (kmf): 1. Key-management field information describes
how the data is to be managed or helps with management of the key material.
Each key-management field is 2 bytes in length. The value in this field indicates how many 2-byte key management fields follow. |
048 | 01 | Key-management field 1, high-order byte (reserved).
All bits are reserved and must be zero. |
049 | 01 | Key-management field 1, low-order byte (reserved).
All bits are reserved and must be zero. |
050 | iead | IBM® extended associated data:
|
End of associated data section | ||
Optional wrapped AESKW formatted payload | ||
061 | 72 | Contents of payload: An encrypted payload which the Segment 2 code creates by wrapping the
unencrypted AESKW formatted payload. The payload is made up of the integrity check value, pad
length, length of hash options and hash, hash options, hash of the associated data, key material,
and padding. The key token is internal. A DES DESUSECV payload contains key material that is formatted. The key material is formatted as follows:
|
End of optional wrapped AESKW formatted payload | ||
End of AESKW components | ||
Note: All numbers are in big endian format.
|