diff --git a/src/fr.rs b/src/fr.rs index 4495e3bd7..b8412c779 100644 --- a/src/fr.rs +++ b/src/fr.rs @@ -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 diff --git a/src/lib.rs b/src/lib.rs index 841948796..3de1a2d96 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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,