Skip to content

Adds error vector validation and EC key support#88

Merged
johnnyt merged 1 commit intomainfrom
77-negative-test-cases
Feb 1, 2026
Merged

Adds error vector validation and EC key support#88
johnnyt merged 1 commit intomainfrom
77-negative-test-cases

Conversation

@johnnyt
Copy link
Member

@johnnyt johnnyt commented Feb 1, 2026

  • Implements comprehensive error test vector suite validating 4,240 negative test cases (bit flip, truncation, API mismatch)
  • Adds EC point decompression for compressed P-256 and P-384 public keys using simplified modular square root
  • Updates signature verification to support both P-256 (SHA-256/secp256r1) and P-384 (SHA-384/secp384r1) curves
  • Enables API mismatch test using fail_on_signed streaming option
  • All error vectors correctly return {:error, _} as expected
  • Maintains 100% success vector compatibility (2,861 tests pass)

Closes #77

- Implements comprehensive error test vector suite validating
  4,240 negative test cases (bit flip, truncation, API mismatch)
- Adds EC point decompression for compressed P-256 and P-384
  public keys using simplified modular square root
- Updates signature verification to support both P-256
  (SHA-256/secp256r1) and P-384 (SHA-384/secp384r1) curves
- Enables API mismatch test using fail_on_signed streaming option
- All error vectors correctly return {:error, _} as expected
- Maintains 100% success vector compatibility (2,861 tests pass)

Closes #77
@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 87.75510% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lib/aws_encryption_sdk/crypto/ecdsa.ex 91.17% 3 Missing ⚠️
lib/aws_encryption_sdk/decrypt.ex 80.00% 3 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   92.66%   93.07%   +0.41%     
==========================================
  Files          40       40              
  Lines        1472     1516      +44     
==========================================
+ Hits         1364     1411      +47     
+ Misses        108      105       -3     
Files with missing lines Coverage Δ
lib/aws_encryption_sdk/crypto/ecdsa.ex 88.09% <91.17%> (+10.31%) ⬆️
lib/aws_encryption_sdk/decrypt.ex 94.36% <80.00%> (-2.31%) ⬇️

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@johnnyt johnnyt merged commit cfdd10a into main Feb 1, 2026
6 checks passed
@johnnyt johnnyt deleted the 77-negative-test-cases branch February 1, 2026 21:51
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.

Implement Negative Test Case Validation (Error Vectors)

1 participant