Repository navigation
Feat: XTS-AES - #195
Closed
officialfrancismendoza wants to merge 18 commits into
Closed
Feat: XTS-AES#195officialfrancismendoza wants to merge 18 commits into
officialfrancismendoza wants to merge 18 commits into
Conversation
…compile-time length error message citation (bcgit#184)
officialfrancismendoza
marked this pull request as draft
November 18, 2026 23:27
Contributor
Author
|
Resolve merge conflict to include both x25519 and xts packages |
…/184-AES-XTS # Conflicts: # cli/src/main.rs
…ory tests only Since the digest crate took in the vector suites, the step ran tests that need bc-test-data, which the Build job does not check out, and the concatenation KDF's ACVP suite failed on the missing data. Assisted-by: Claude:claude-opus-5-5 (cherry picked from commit 98f284a)
hex moved into core on release. Assisted-by: Claude:claude-opus-5-5
The 41 vectors embedded in the test file are replaced by the ACVP-AES-XTS-1.0 and -2.0 sample sets in bc-test-data/crypto/acvp (ACVP-Server commit 975de31e). Every single-data-unit case of whole bytes runs, in both directions: 260 from 1.0 and 72 from 2.0. The bit-length and multiple-data-unit cases are counted and skipped, and the counts are asserted. Assisted-by: Claude:claude-fable-5-2
dghgit
self-requested a review
November 22, 2026 21:33
dghgit
requested changes
Nov 22, 2026
dghgit
left a comment
Contributor
There was a problem hiding this comment.
PR report sent via teams.
…crypt-only guard has a doctest first_mask built T = E_Key2(i) in a local Secret<Block> and returned it by value, which moves the mask out of a copy nothing wipes when the function is not inlined. encrypt and decrypt now declare the Secret and first_mask fills it through &mut. The output is unchanged. XTSKey::encrypt_inplace's const assertion on BlockPermutation::DECRYPT_ONLY had no test. Its docs gain a compile_fail,E0080 doctest over a decrypt-only wrapper of the toy permutation, and beside it the same key decrypting, so that the failure is known to be the guard's. Assisted-by: Claude:claude-fable-5-2
XTS_AES_128 was listed among the modes that the following sentence says are used through a key such as AES256Key<GCM> handing out encryptors and decryptors. XTS has its own key type and no workers; the sentence now says so. Assisted-by: Claude:claude-fable-5-2
…r points at the help An all-zero --key drew the block cipher loader's warning that it was proceeding and then XTS's refusal of equal halves, and a key with one all-zero half was refused with AES's InvalidKeyType debug message. The commands now load their key themselves, once, and refuse equal halves and an all-zero half with a message that names the cause, before the key is built; the halves are compared in constant time. The shared loader is unchanged. The module header repeated the subcommand help on data units and the tweak; it now points there. Assisted-by: Claude:claude-fable-5-2
…/officialfrancismendoza/184-AES-XTS # Conflicts: # .gitea/workflows/rust-build.yml # .github/workflows/rust-build.yml
…/officialfrancismendoza/184-AES-XTS
…/officialfrancismendoza/184-AES-XTS
dghgit
pushed a commit
that referenced
this pull request
Nov 23, 2026
XTS (NIST SP 800-38E) over a 128-bit block permutation, as bouncycastle_cipher::modes::XTSKey with the aliases XTS_AES_128 and XTS_AES_256: one data unit of 16 bytes to 2^20 blocks per call, in place, with ciphertext stealing, and a key whose halves must differ. The aes128-xts and aes256-xts CLI commands, benches and the stack harness. Tested against NIST's ACVP and CAVP vector sets. Reviewed before the merge; its six findings are fixed on the branch: the first mask is filled in the caller's Secret, the decrypt-only guard has a compile_fail doctest, the CLI names the keys XTS refuses, and two doc corrections. Open: the IEEE Std 1619-2007 citations were not checked against the standard, and no mutation run was made on the final code. Verified: workspace suite 4133 passed, 0 failed, 14 ignored before the last release merge; after it the cipher, aes and cli suites pass (790) and the workspace builds. Assisted-by: Claude:claude-fable-5-2
Contributor
|
Merged |
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.
Implement XTS-AES (outlined as part of the official NIST SP 800-38E). Solves (#184).