Repository navigation
Benchmark AES-GCM encryption from two pieces, as TLS 1.3 records - #1339
Merged
Merged
Conversation
`AesGcm::encrypt` from a payload and one more byte, the content type of a TLS 1.3 record, next to OpenSSL (two updates) and aws-lc-rs (`seal_out_of_place_scatter` with the byte as `extra_in`), at the one-shot sizes. This is how rustls's verified-garbage provider (#991) seals records, and gives the optimizations of `vg_aes_gcm_seal_gather` (#1228) a base to compare with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FoYWDDEDFq1DFev5X7n2aq
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.
Adds an
aes-128-gcm-encrypt-two-piecesgroup tobench/benches/primitives/aes_gcm.rs:AesGcm::encryptfrom a payload ofnbytes and one more byte (the content type of a TLS 1.3 record), at the one-shot sizes. It runs next to OpenSSL (twoupdates) and aws-lc-rs (seal_out_of_place_scatterwith the byte asextra_in). A setup assertion checks that the ciphertext and tag match aws-lc-rs's.This comes from the rustls provider analysis in #991. The provider seals records with
AesGcm::encryptin exactly this shape, and on x86-64 that is slower than copying into the output and callingencrypt_in_place(#1228). This PR only adds the benchmark, so that the PRs optimizingvg_aes_gcm_seal_gatherget a base for the Benchmarks check to compare against.Validation:
cargo benchon this group (the assertion holds at every size),cargo clippy --all-targets -- -D warningsandcargo fmt --checkinbench/, andci/check_arch_gates.py.🤖 Generated with Claude Code
https://claude.ai/code/session_01FoYWDDEDFq1DFev5X7n2aq
Generated by Claude Code