Skip to content

crypto: Add unit tests#3202

Merged
smalis-msft merged 4 commits intomicrosoft:mainfrom
smalis-msft:crypto-unit-tests
Apr 7, 2026
Merged

crypto: Add unit tests#3202
smalis-msft merged 4 commits intomicrosoft:mainfrom
smalis-msft:crypto-unit-tests

Conversation

@smalis-msft
Copy link
Copy Markdown
Contributor

Add some publicly documented test vectors to make sure we have our algos wired up right.

@smalis-msft smalis-msft requested a review from a team as a code owner April 6, 2026 16:53
Copilot AI review requested due to automatic review settings April 6, 2026 16:53
Copy link
Copy Markdown
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

Adds unit tests to the support/crypto crate using published crypto test vectors to validate AES-256-GCM and XTS-AES-256 implementations across backends.

Changes:

  • Add an AES-256-GCM unit test based on a NIST GCM test case.
  • Add an XTS-AES-256 unit test intended to be based on IEEE Std 1619-2007 vectors.
  • Add hex as a dev-dependency for decoding vector inputs in tests.

Reviewed changes

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

File Description
support/crypto/src/xts_aes_256/mod.rs Adds an XTS-AES-256 unit test (currently round-trip based).
support/crypto/src/aes_256_gcm/mod.rs Adds an AES-256-GCM unit test using a NIST vector (ciphertext asserted).
support/crypto/Cargo.toml Adds hex under dev-dependencies for test vector decoding.
Cargo.lock Records hex as a dependency of the crypto crate for tests.

Copilot AI review requested due to automatic review settings April 6, 2026 17:43
Copy link
Copy Markdown
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 3 out of 4 changed files in this pull request and generated 2 comments.

@smalis-msft smalis-msft enabled auto-merge (squash) April 7, 2026 14:45
@smalis-msft smalis-msft merged commit b47499e into microsoft:main Apr 7, 2026
61 checks passed
@smalis-msft smalis-msft deleted the crypto-unit-tests branch April 7, 2026 20:13
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