3.6.2 Key Code Format
The key code includes a 128-bit header carrying a unique value and the context provided during the Wrap or Wrap Generated Random operation, a payload, and a 32-bit checksum checked for transfer errors.
The length of the key code in bytes is calculated through the key length in bits using
DRV_PUF_KEY_CODE_SIZE(keyLenBits) macro in the PUF driver. The size is
computed as: 36 bytes (base) + (keyLenBits / 8) bytes (key length in bytes) + 16 bytes for
each 384 bits in the key length (rounded up).
The length of the key code for the accepted key length is provided in the following table.
| Key Length (bits) | Key Code Length (bytes) |
|---|---|
| 64 | 60 |
| 128 | 68 |
| 192 | 76 |
| 256 | 84 |
| 320 | 92 |
| 384 | 100 |
| 448 | 124 |
| 512 | 132 |
| 576 | 140 |
| 640 | 148 |
| 704 | 156 |
| 768 | 164 |
| 832 | 188 |
| 896 | 196 |
| 960 | 204 |
| 1024 | 212 |
| 2048 | 388 |
| 3072 | 548 |
| 4096 | 724 |
