Skip to content

Commit 533c17c

Browse files
authored
Specify origin of the offset parameter
1 parent af50d6e commit 533c17c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

specification/structured-encryption/encrypt-structure.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,16 @@ and an info as calculated [above](#calculate-info)
205205

206206
The `FieldRootKey` MUST be generated with the plaintext data key in the encryption materials
207207
and the Message ID generated for this Encrypted Structured Data.
208+
208209
The `FieldRootKey` is combined with the ordinal position of a field within a record
209210
to generate a unique `FieldKey` for encrypting that field.
210211

212+
The ordinal position is calculated by sorting the
213+
[canonical path](./header.md#canonical-path)
214+
of all of the [ENCRYPT_AND_SIGN](./structures.md#encryptandsign) fields,
215+
sorting those paths in ascending order,
216+
and taking the zero-based position of the field in that sorted list.
217+
211218
The calculated Field Root MUST have length equal to the
212219
[algorithm suite's encryption key length](../../submodules/MaterialProviders/aws-encryption-sdk-specification/framework/algorithm-suites.md#algorithm-suites-encryption-settings).
213220

0 commit comments

Comments
 (0)