Repository navigation
Add AES-GCM segment ciphers, key config, and CipherResolver - #12786
robert3005 wants to merge 2 commits into
Conversation
Signed-off-by: Robert Kruszewski <github@robertk.io>
roborev: Combined Review (
|
| let mut key = vec![0u8; len]; | ||
| fill_random(&mut key)?; | ||
| let result = Self::try_from_slice(&key); |
There was a problem hiding this comment.
Medium: EncryptionKey::generate can panic instead of returning an invalid-length error.
EncryptionKey::generate(usize::MAX)Length validation happens after allocation and random filling, so this input causes capacity overflow; other large unsupported lengths waste memory and randomness before rejection.
Fix: Validate len against KEY_LENGTHS before allocating or requesting randomness, rejecting unsupported lengths while preserving generation for 16, 24, and 32 bytes.
Signed-off-by: Robert Kruszewski <github@robertk.io>
Merging this PR will regress 1 benchmark
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Stacked on Add encryption metadata fields to the file footer FlatBuffer schema #12785.
Introduce
EncryptionKey,KeyConfig,KeyRetriever,FileEncryption,FileDecryption,EncryptionSpec, AES-GCM segment encryption/decryption with per-file/per-segment AAD, and the deduplicatingCipherResolver.Split from #10968.
Developed with AI assistance.