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

Consume gridiron 0.4 #21

Merged
merged 7 commits into from Dec 10, 2018
Merged

Consume gridiron 0.4 #21

merged 7 commits into from Dec 10, 2018

Conversation

clintfred
Copy link
Contributor

@clintfred clintfred commented Dec 6, 2018

Brings in the gridiron 0.4 and it's 31-bit (constant time!) implementations.

There are no changes to the public interface and bulk of the changes were switching over to hex for constants and test values from limbs.

Other changes

  • upgrade to Rust 1.31.0
  • depend on a rand-0.6 compatible fork of ed25519-dalek

TODO

  • - depend on a released version of gridiron

@clintfred clintfred changed the title Consume gridiron 0.3 Consume gridiron 0.4 Dec 10, 2018
Copy link
Member

@coltfred coltfred left a comment

Choose a reason for hiding this comment

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

The NonAdjacentForm trait isn't actually non adjacent form anymore. It's just the bit form of the value. We should change that name.

src/api.rs Outdated
y * x
}
}
// ///Duplicated here for the generate plaintext test
Copy link
Member

Choose a reason for hiding this comment

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

Delete this, if you would.

src/api.rs Outdated
let rth_pow = pow_for_square(fp12, curve_order);
assert_eq!(rth_pow, Fp12Elem::one());
}
// #[test]
Copy link
Member

Choose a reason for hiding this comment

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

We should just delete this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a comment about rth roots for plaintext to gen_plaintext

///
/// Arguments:
/// `hex_str` - need to be 63 or 64 bytes. Do not include a leading '0x'
pub fn fp256_unsafe_from(hex_str: &str) -> fp_256::Fp256 {
Copy link
Member

Choose a reason for hiding this comment

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

Should we call this fp256_unsafe_from_hex?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the param name hex_str is a good enough hint.

* renamed NonAdjacentForm to BitRepr
@clintfred clintfred merged commit 3f2c23a into master Dec 10, 2018
@ernieturner ernieturner deleted the gridiron-0.3 branch December 13, 2018 15:56
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