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

Support P-521 curve #521

Merged
merged 3 commits into from
Nov 20, 2021
Merged

Support P-521 curve #521

merged 3 commits into from
Nov 20, 2021

Conversation

cplussharp
Copy link
Contributor

implementation for #519

@fpedrei
Copy link

fpedrei commented Nov 13, 2021

Great work! Did you test the new (and modified) algorithm against some test vectors (e.g. http://point-at-infinity.org/ecc/nisttv)?

@cplussharp
Copy link
Contributor Author

No I didn't. I just used the existing tests.
That are a lot of test vectors. Should they all be added to the unit tests? I think I don't understand what should be tested with them. The key generation?

@fpedrei
Copy link

fpedrei commented Nov 13, 2021

No I didn't. I just used the existing tests. That are a lot of test vectors. Should they all be added to the unit tests?

I don't know, what the acceptance criterias are here, but "Better safe than sorry ..."

I think I don't understand what should be tested with them. The key generation?

The test vectors are for the underlying mathematical primitives:

"For a given curve and a given base point P the point Q = kP was calcaluted for
several values k."

BTW: I suppose, that key generation for P521 is suffering from "getBigRandom() is incorrect #221". A test could verify that.

- make ECDSA public key generation an own method so we can test it
- test against the testvectors
@cplussharp
Copy link
Contributor Author

I added the tests for these vectors, but they only test if the public key is created correctly. I think more important would be test vectors for signing and verification! @fpedrei Do you also know test-vectors for that?

@fpedrei
Copy link

fpedrei commented Nov 15, 2021

This project has a number of test vectors: https://github.com/google/wycheproof

@cplussharp
Copy link
Contributor Author

That are a lot of test vectors. They should probably be added in an own PR. If @kjur wants them?

@kjur
Copy link
Owner

kjur commented Nov 16, 2021

That are a lot of test vectors. They should probably be added in an own PR. If @kjur wants them?

Hi @cplussharp , thank you kindly. I think I'll merge your PR this weekend. Of course, your test codes are very helpful for me. If possible, I'm happy to have P-521 test code with a separate file such as "qunit-do-crypto-ec-p521.html".

@kjur kjur merged commit 4af3e98 into kjur:master Nov 20, 2021
@kjur
Copy link
Owner

kjur commented Nov 21, 2021

Hi @cplussharp , thank you indeed for your effort. I've released 10.5.0 with your PR today.

@cplussharp cplussharp deleted the p521 branch November 21, 2021 16:12
@augjoh
Copy link
Contributor

augjoh commented Dec 23, 2021

@cplussharp: If you're still looking for test vectors (signing and verification), there are some at the bottom of this page: https://csrc.nist.gov/Projects/cryptographic-algorithm-validation-program/digital-signatures

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.

4 participants