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 iso-Pallas, SWU hash-to-curve, and Sinsemilla #17

Merged
merged 28 commits into from
Apr 29, 2021

Conversation

defuse
Copy link
Collaborator

@defuse defuse commented Mar 30, 2021

No description provided.

Co-authored-by: Kris Nuttycombe <kris.nuttycombe@gmail.com>
@defuse defuse mentioned this pull request Mar 30, 2021
@defuse
Copy link
Collaborator Author

defuse commented Mar 30, 2021

I tried reducing the duplication between Pallas and iso-Pallas using inheritance or ownership but it turned out to be too error-prone, i.e. hard to be sure that neither curve wasn't accidentally using the operations of the other, so I left the duplication in.

orchard_iso_pallas.py Outdated Show resolved Hide resolved
orchard_pallas.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
…nsemilla.py executable.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
…aHash.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
orchard_sinsemilla.py Outdated Show resolved Hide resolved
@dconnolly
Copy link
Contributor

Can we use render_* in __main__ to make it easy to get the Rust/zcash/json renderings of these values in a reproducible way? 🙏

orchard_pallas.py Outdated Show resolved Hide resolved
@defuse
Copy link
Collaborator Author

defuse commented Apr 6, 2021

utACK @daira's changes aside from the Fp.ZERO suggested change

Replace 0 with Fp.ZERO in `extract`.

Co-authored-by: Taylor Hornby <taylor@defuse.ca>
@str4d
Copy link
Contributor

str4d commented Apr 20, 2021

Can we use render_* in __main__ to make it easy to get the Rust/zcash/json renderings of these values in a reproducible way? 🙏

Agreed; we shouldn't be doing any non-trivial assertions in __main__ here, since this is where we generate the test vectors.

@str4d str4d mentioned this pull request Apr 20, 2021
@str4d str4d added this to the Core Sprint 2021-14 milestone Apr 20, 2021
orchard_sinsemilla.py Outdated Show resolved Hide resolved
daira
daira previously approved these changes Apr 20, 2021
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

ACK

Base automatically changed from orchard to master April 21, 2021 00:09
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

Reviewed with @therealyingtong.

orchard_iso_pallas.py Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
orchard_sinsemilla.py Outdated Show resolved Hide resolved
@daira daira dismissed their stale review April 21, 2021 11:42

Dismissing my review while I check against @str4d's comments.

Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

Confirmed @str4d's comments.

Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

utACK once the bug below is fixed.

orchard_pallas.py Outdated Show resolved Hide resolved
Co-authored-by: str4d <jack@z.cash>
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

utACK

orchard_group_hash.py Outdated Show resolved Hide resolved
orchard_group_hash.py Outdated Show resolved Hide resolved
…mple_swu.

Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

utACK with minor comments.

I added three commits for direct testing of map_to_curve_simple_swu; these should also be reviewed.

orchard_group_hash.py Outdated Show resolved Hide resolved
orchard_group_hash.py Outdated Show resolved Hide resolved
orchard_group_hash.py Outdated Show resolved Hide resolved
The test vector generators in this repository are meant to output data
that can be copy-pasted or piped to a file. Generating multiple sets of
test vectors from a single file interferes with this.
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

utACK with comments.

Existing test vector generators are adjusted to use Rand.i8() so they
generate the same test vectors. We should evaluate these later to
determine whether they should actually use Rand.u8() (and update the
test vectors across the ecosystem).
Comments and a minor refactor for consistency.
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

ACK f8008a0

@str4d
Copy link
Contributor

str4d commented Apr 29, 2021

I'm happy that the few remaining open comment threads have resolutions.

@str4d str4d merged commit 0cc3147 into master Apr 29, 2021
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.

6 participants