Squashed 'jubjub/' changes from ec85333e..38d38af3
38d38af3 Merge pull request #32 from kevaundray/patch-1 af5598da Merge pull request #33 from ZcashFoundation/scalar 109ec40d Add public Scalar type alias for Fr 8e9c5fe6 typo in Fr.rs 8e9337ee Merge pull request #30 from rex4539/typos 5f4374c8 Fix typo git-subtree-dir: jubjub git-subtree-split: 38d38af3b792d2c55d815d214a7cd157dc8f71ad
This commit is contained in:
parent
d029ddea83
commit
56da51f3ce
|
@ -139,7 +139,7 @@ const R2: Fr = Fr([
|
|||
0x04f6547b8d127688,
|
||||
]);
|
||||
|
||||
/// R^2 = 2^768 mod r
|
||||
/// R^3 = 2^768 mod r
|
||||
const R3: Fr = Fr([
|
||||
0xe0d6c6563d830544,
|
||||
0x323e3883598d0f85,
|
||||
|
@ -241,7 +241,7 @@ impl Fr {
|
|||
//
|
||||
// and computing their sum in the field. It remains to see that arbitrary 256-bit
|
||||
// numbers can be placed into Montgomery form safely using the reduction. The
|
||||
// reduction works so long as the product is less than R=2^256 multipled by
|
||||
// reduction works so long as the product is less than R=2^256 multiplied by
|
||||
// the modulus. This holds because for any `c` smaller than the modulus, we have
|
||||
// that (2^256 - 1)*c is an acceptable product for the reduction. Therefore, the
|
||||
// reduction always works so long as `c` is in the field; in this case it is either the
|
||||
|
|
|
@ -42,6 +42,9 @@ mod fr;
|
|||
pub use bls12_381::Scalar as Fq;
|
||||
pub use fr::Fr;
|
||||
|
||||
/// A better name than Fr.
|
||||
pub type Scalar = Fr;
|
||||
|
||||
const FR_MODULUS_BYTES: [u8; 32] = [
|
||||
183, 44, 247, 214, 94, 14, 151, 208, 130, 16, 200, 204, 147, 32, 104, 166, 0, 59, 52, 1, 1, 59,
|
||||
103, 6, 169, 175, 51, 101, 234, 180, 125, 14,
|
||||
|
|
Loading…
Reference in New Issue