Skip to content

fix(test-server): sort the raw AES wrapping AAD by UTF-8 bytes - #1719

Merged
lucasmcdonald3 merged 2 commits into
kessplas/bug-configfrom
lucmcdon/test-server-raw-aes-utf8-sorting
Oct 29, 2026
Merged

lucasmcdonald3 merged 2 commits into
kessplas/bug-configfrom
lucmcdon/test-server-raw-aes-utf8-sorting

Conversation

@lucasmcdonald3

Copy link
Copy Markdown
Contributor

Issue #, if available:

Description of changes:

Build the test server's raw AES keyring with utf8Sorting: true.

The raw AES keyring defaults to sorting the encryption context in locale order when it builds the wrapping AAD, so it disagrees with every other ESDK whenever a key sorts differently in locale and UTF-8 byte order (e.g. \u00a0, or aws-crypto-public-key next to \u0100).
JS's own cross-language vector runner (integration-node) already sets utf8Sorting: true.

Raw AES between JS and any other server, with such an encryption context

  • Before: neither side can unwrap the other's data key.
  • After: round-trips in both directions.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

@lucasmcdonald3
lucasmcdonald3 marked this pull request as ready for review October 29, 2026 22:14
@lucasmcdonald3
lucasmcdonald3 requested a review from a team as a code owner October 29, 2026 22:14
@lucasmcdonald3
lucasmcdonald3 merged commit 7946c20 into kessplas/bug-config Oct 29, 2026
14 of 25 checks passed
@lucasmcdonald3
lucasmcdonald3 deleted the lucmcdon/test-server-raw-aes-utf8-sorting branch October 29, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant