feat!: update key manager hasher labels #6329
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Updates key manager hasher labels used in cipher seeds. Improves the ordering of MAC input data.
Closes #6328.
Motivation and Context
The hasher labels used for cipher seeds are vaguely named, which seems like an unnecessary footgun. This PR updates them, incrementing to a new cipher seed version.
We also take the opportunity of a new version to reorganize how cipher seed MAC input data is ordered; specifically, we move the version byte to the front, which is more in line with its use elsewhere. This doesn't impose any particular security concerns (the MAC input data is never directly parsed), but had a bad smell.
How Has This Been Tested?
Tests pass.
What process can a PR reviewer use to test or verify this change?
Check that the naming change and reordering do what they say on the tin.
Breaking Changes
Because the library only supports the most recent cipher seed version, existing cipher seeds will fail to decrypt.
BREAKING CHANGE: Changes the construction of cipher seeds via a new version; older cipher seeds will fail to decrypt.