Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test vectors from Project Wycheproof for secp256r1 #2007

Merged
merged 3 commits into from
Jan 26, 2024

Conversation

webmaster128
Copy link
Member

2k additional tests for secp256r1 🔥

@webmaster128 webmaster128 mentioned this pull request Jan 24, 2024
13 tasks
Copy link
Contributor

@maurolacy maurolacy left a comment

Choose a reason for hiding this comment

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

LGTM.

packages/crypto/testdata/wycheproof/README.md Outdated Show resolved Hide resolved
packages/crypto/tests/wycheproof_secp256r1.rs Show resolved Hide resolved
packages/crypto/tests/wycheproof_secp256r1.rs Outdated Show resolved Hide resolved
packages/crypto/tests/wycheproof_secp256r1.rs Outdated Show resolved Hide resolved
packages/crypto/tests/wycheproof_secp256r1.rs Outdated Show resolved Hide resolved
packages/crypto/tests/wycheproof_secp256r1.rs Show resolved Hide resolved
assert_eq!(tested, number_of_tests);
}

fn from_der(data: &[u8]) -> Result<[u8; 64], String> {
Copy link
Contributor

@maurolacy maurolacy Jan 25, 2024

Choose a reason for hiding this comment

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

This can be part of the toolset in the future I guess.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. Getting this DER encoding right is actually hard. I already created a point in #2001 for potentially adding a standardized DER decoder for signatures.

@webmaster128 webmaster128 merged commit 7d74266 into secp256r1-support Jan 26, 2024
29 checks passed
@webmaster128 webmaster128 deleted the secp256r1-wycheproof branch January 26, 2024 08:06
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.

2 participants