xanderbailey opened a new pull request, #3780: URL: https://github.com/apache/iceberg-rust/pull/3780
## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Working towards https://github.com/apache/iceberg-rust/issues/3506 ## What changes are included in this PR? Adds `AesGcmCipher` and `encrypt_ags1` / `decrypt_ags1` to the `pyiceberg_core.encryption` module, so PyIceberg can drop its own implementations from https://github.com/apache/iceberg-python/pull/3963 and https://github.com/apache/iceberg-python/pull/3969. The AGS1 functions work on whole files since that's how PyIceberg reads and writes Avro. `decrypt_ags1` takes `file_length` as a required keyword and rejects data of any other length, since a stream cut at a block boundary still decrypts. <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> ## Are these changes tested? Yes, unit tests in `bindings/python/tests/test_encryption.py`, including decrypting AGS1 streams written by Java. I also ran PyIceberg's encryption tests against a local build. <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? --> ## AI Disclosure Used to write the bindings and tests <!-- https://iceberg.apache.org/contribute/#guidelines-for-ai-assisted-contributions --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
