Skip to content

Add more testing for AES XTS#217

Merged
kenneth-tucker merged 7 commits intomainfrom
user/v-ktucker/200-more-testing-aes-xts
Mar 12, 2026
Merged

Add more testing for AES XTS#217
kenneth-tucker merged 7 commits intomainfrom
user/v-ktucker/200-more-testing-aes-xts

Conversation

@kenneth-tucker
Copy link
Contributor

Issue:
#200

Note: this change is based on AES GCM changes because of shared test utilities. I'll rebase this on main once that is merged. See #210

@kenneth-tucker kenneth-tucker self-assigned this Feb 26, 2026
@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch 2 times, most recently from ea90eb2 to 3f5c76a Compare February 26, 2026 22:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands AES-XTS test coverage in the C++ test suite and refactors shared AES test utilities so CBC/GCM/XTS tests can reuse common helper routines. It also adds an AES-XTS unwrap/unmask precheck at the Rust DDI layer to fail earlier on unusable XTS key pairs.

Changes:

  • Added extensive AES-XTS encryption/decryption correctness, validation, and malformed-input coverage in C++ tests.
  • Introduced shared AES C++ test helpers (helpers.hpp/.cpp) and updated CBC/GCM/XTS tests to use them; removed the old kat.cpp/hpp.
  • Added a minimal XTS “operability” precheck during unwrap/unmask in aes_xts_key.rs.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
api/tests/cpp/handle_mgmt_tests.cpp Switches AES key generation helper used by handle-management tests to the new CBC helper.
api/tests/cpp/algo/aes/xts_enc_dec_tests.cpp Major expansion of AES-XTS test coverage plus new blob-wrap/unmask/unwrap negative tests.
api/tests/cpp/algo/aes/helpers.hpp Adds shared test helper declarations/types (crypt wrappers, generators, sweeps, KAT structs).
api/tests/cpp/algo/aes/helpers.cpp Implements shared AES test helpers and key generators; migrates KAT import helper here.
api/tests/cpp/algo/aes/gcm_enc_dec_tests.cpp Refactors to use shared helpers and adds more AES-GCM coverage.
api/tests/cpp/algo/aes/cbc_enc_dec_tests.cpp Refactors to use shared helpers; adjusts KAT import call to new signature.
api/tests/cpp/algo/aes/kat.hpp Deleted (KAT structs/utilities moved into shared helpers).
api/tests/cpp/algo/aes/kat.cpp Deleted (KAT import helper moved into shared helpers implementation).
api/tests/cpp/CMakeLists.txt Replaces kat.cpp with helpers.cpp in the test build.
api/lib/src/ddi/aes_xts_key.rs Adds unwrap/unmask XTS pair operability precheck; introduces new helper function.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch 2 times, most recently from ceeca14 to 6c32ee2 Compare March 2, 2026 18:57
Copilot AI review requested due to automatic review settings March 2, 2026 18:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from 0cca762 to 90dcaba Compare March 2, 2026 19:53
Copilot AI review requested due to automatic review settings March 2, 2026 21:08
@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from 90dcaba to 06c2b01 Compare March 2, 2026 21:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Copilot AI review requested due to automatic review settings March 6, 2026 17:16
@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from c9b0cdc to 59245d9 Compare March 6, 2026 17:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from 59245d9 to 279e9be Compare March 6, 2026 17:58
Copilot AI review requested due to automatic review settings March 6, 2026 18:41
@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from 279e9be to 7f80b61 Compare March 6, 2026 18:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Copy link
Contributor

@mhatrevi mhatrevi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕐

@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from 7f80b61 to f21e8a2 Compare March 10, 2026 00:18
Copilot AI review requested due to automatic review settings March 10, 2026 18:47
@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from f21e8a2 to 2644ac6 Compare March 10, 2026 18:47
@kenneth-tucker kenneth-tucker enabled auto-merge (squash) March 10, 2026 18:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

@kenneth-tucker kenneth-tucker force-pushed the user/v-ktucker/200-more-testing-aes-xts branch from 2644ac6 to ca026d9 Compare March 11, 2026 17:49
Copilot AI review requested due to automatic review settings March 12, 2026 17:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

@kenneth-tucker kenneth-tucker merged commit 470fcf6 into main Mar 12, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants