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 decaf448 #59

Merged
merged 4 commits into from
Jun 26, 2023
Merged

Add decaf448 #59

merged 4 commits into from
Jun 26, 2023

Conversation

stknob
Copy link
Contributor

@stknob stknob commented Jun 24, 2023

Based on draft-irtf-cfrg-ristretto255-decaf448-07, draft-irtf-cfrg-hash-to-curve-16 and the ristretto255 implementation.

@sublimator
Copy link
Contributor

nice :)

'f063769e4241e76d815800e4933a3a144327a30ec40758ad3723a788388399f7b3f5d45b6351eb8eddefda7d5bff4ee920d338a8b89d8b63',
'5a0104f1f55d152ceb68bc138182499891d90ee8f09b40038ccc1e07cb621fd462f781d045732a4f0bda73f0b2acf94355424ff0388d4b9c',
];
for (const badBytes of badEncodings) {
Copy link
Contributor

Choose a reason for hiding this comment

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

there's nothing like a should.each ?

Copy link
Owner

Choose a reason for hiding this comment

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

nah, no need to complicate it

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess if you really wanted to, you can just do "arr.forEach((e, i) => should(something - ${i} - ${e}, " but then again "throws(() => something(b), badBytes)" will report the exact culprit. So yeah

deepStrictEqual(point.toHex(), encodedHashToPoints[i]);
}
});
should('have proper equality testing', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just for testing DecafPoint#equals ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Jup, basic testing of the equals method (based on the RistrettoPoint one).

@paulmillr
Copy link
Owner

This is great!

@paulmillr
Copy link
Owner

Tests seem to be failing.

@stknob
Copy link
Contributor Author

stknob commented Jun 25, 2023

Tests seem to be failing.

Forgot to run prettier on the files, should be fixed now.

@paulmillr
Copy link
Owner

Add benchmarks please and we're good to go.

@paulmillr
Copy link
Owner

Also, README docs.

Based on draft-irtf-cfrg-ristretto255-decaf448-07,
draft-irtf-cfrg-hash-to-curve-16 and the ristretto255 implementation.

Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
@stknob stknob requested a review from paulmillr June 26, 2023 20:51
@paulmillr paulmillr merged commit af8c1ee into paulmillr:main Jun 26, 2023
2 checks passed
@paulmillr
Copy link
Owner

Thanks!

In the future, please don't force-push: this requires me to re-review all files for the second time, instead of just watching new/diff commits.

If you wanted to ensure history cleanliness, it's good, but no need: I can always squash-merge a PR if it gets too messy.

@sublimator
Copy link
Contributor

Nice! can use this for voprf

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.

None yet

3 participants