Skip to content

Switch to little endian#72

Merged
ebfull merged 3 commits into
zcash:masterfrom
ebfull:little-endian
May 17, 2018
Merged

Switch to little endian#72
ebfull merged 3 commits into
zcash:masterfrom
ebfull:little-endian

Conversation

@ebfull
Copy link
Copy Markdown
Collaborator

@ebfull ebfull commented May 17, 2018

This correctly implements little endian encoding for everything in the circuit and outside abstractions.

Copy link
Copy Markdown
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.

ut(ACK+cov), modulo the URL of the pairing crate.

Copy link
Copy Markdown
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.

ut(ACK+cov).

Comment thread src/primitives/mod.rs
// Drop the first five bits, so it can be interpreted as a scalar.
h[0] &= 0b0000_0111;
// Drop the most significant five bits, so it can be interpreted as a scalar.
h[31] &= 0b0000_0111;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Spec says to interpret the BLAKE2s output as a 256-bit integer mod 2livk, and livk = 251, so this is indeed equivalent to truncating by 5 bits.

@ebfull ebfull merged commit eb409fa into zcash:master May 17, 2018
stefandeml pushed a commit to stefandeml/sapling-crypto that referenced this pull request Jul 5, 2019
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.

3 participants