Add curve448 (Goldilocks) curve support#61
Open
sridhar-panigrahi wants to merge 2 commits intoLFDT-Lockness:mfrom
Open
Add
curve448 (Goldilocks) curve support#61sridhar-panigrahi wants to merge 2 commits intoLFDT-Lockness:mfrom
sridhar-panigrahi wants to merge 2 commits intoLFDT-Lockness:mfrom
Conversation
Adds Curve448 as a new curve backend using ed448-goldilocks-plus. Follows the same manual trait implementation approach as Ed25519 since Curve448 uses Edwards encoding rather than SEC1. - 57-byte compressed point encoding (CompressedEdwardsY) - 56-byte scalar encoding with Reduce<56> and Reduce<112> - Cofactor-4 torsion checking via CofactorGroup - All existing tests instantiated for the new curve Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com> Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Author
|
@survived , please let me know you thoughts on this ! |
Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com> Signed-off-by: Shridhar Panigrahi <sridharpanigrahi2006@gmail.com>
96ef316 to
e963cf0
Compare
Contributor
|
Hey @sridhar-panigrahi, sorry, it will take me some time to review the PR as I'm pressed by some other work. I should be able to get on this in a couple of weeks unless @maurges gets to it first! |
Contributor
Author
|
it's ok @survived , I'll try to find and work on something even more valuable on this repo . |
Contributor
Author
|
@maurges , please let me know your thoughts on this ! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey @survived! Following up on #58 — here's Curve448 support as discussed.
Closes #58 (partially — P-521 still remains)
Overview
This adds Curve448 (Goldilocks) using ed448-goldilocks-plus as the backend. I went with the same approach as Ed25519 (manual trait impls in its own module) since Curve448 uses Edwards encoding, not SEC1.
The implementation handles the quirk where
ed448-goldilocks-plususes 57-byte scalar representations internally (RFC 8032 convention) while the actual scalar fits in 56 bytes — so there's some padding logic for the conversions.Changes
generic-ec-curves/src/curve448.rswith allgeneric_ec_coretrait implsCompressedEdwardsYReduce<56>andReduce<112>CofactorGroupFromUniformByteswith 72-byte input per RFC 9380Testing
All 22 curve448-specific tests pass and the full workspace suite has zero regressions. Clippy is clean too.
Happy to tackle P-521 next if that's still useful!