Skip to content

Commit afa4722

Browse files
authored
fix: Clarify things in the Hierarical Keyrings (#284)
A branch key version is a v4 UUID. As such it can be converted to 16 bytes. Also, the Encrypted Key is variable. It is whatever length the encryption key is for the given algorithm suite.
1 parent c594df9 commit afa4722

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

framework/aws-kms/aws-kms-hierarchical-keyring.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,25 @@ the [ciphertext](structures.md#ciphertext) field in
6969

7070
This structure is formed using the 16 byte `salt` used to derive the `derivedBranchKey`
7171
concatenated with the AES-GCM-256 12 byte `IV`
72-
concatenated with the byte representation of the UUID branch key version from the AWS DDB response `version` value
72+
concatenated with the byte representation of the UUID branch key version from the [branch key materials](../structures.md#branch-key-materials)
7373
concatenated with the AES Encryption output from the [branch key wrapping](#branch-key-wrapping).
7474

75+
The branch key version is a UUID. Converting the 36 characters UUID string into bytes yields 16 bytes.
76+
For details see [Branch Key and Beacon Key Creation](../branch-key-store.md#branch-key-and-beacon-key-creation).
77+
7578
The following table describes the fields that form the ciphertext for this keyring.
7679
The bytes are appended in the order shown.
80+
The Encryption Key is variable.
81+
It will be whatever length is represented by the algorithm suite.
82+
Because all the other values are constant,
83+
this variability in the encryption key does not impact the format.
7784

7885
| Field | Length (bytes) | Interpreted as |
7986
| ------------------ | -------------- | -------------- |
8087
| Salt | 16 | bytes |
8188
| IV | 12 | bytes |
8289
| Version | 16 | bytes |
83-
| Encrypted Key | 32 | bytes |
90+
| Encrypted Key | Variable | bytes |
8491
| Authentication Tag | 16 | bytes |
8592

8693
#### Authentication Tag

0 commit comments

Comments
 (0)