Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Rationale for this change
Writing an AES_GCM_CTR_V1 file with a plaintext footer currently records AES_GCM_V1 in the footer metadata. Readers then select GCM for the CTR data pages and fail to read them. This also reproduces with arrow-go v18.8.0.
Related to #566 and apache/arrow#54884.
What changes are included in this PR?
Serialize the configured file algorithm directly, preserving its AAD settings. Footer signing is unchanged.
Add a generated-file regression for both algorithms, encrypted and plaintext footers, and stored or externally supplied AAD prefixes. It checks serialized metadata and round-trip values, plus rejection of a corrupted plaintext-footer signature.
Are these changes tested?
The regression fails on the original code in all three CTR/plaintext cases and passes with the fix.
-race -tags assert. The focused regression also passes withassert,noasm.Are there any user-facing changes?
New CTR files with plaintext footers declare the correct cipher and can be read back. No API changes.
AI was used for the implementation, tests and PR description.