Remove unnecessary mask operation in Scalar32::from_bytes_wide().

The significant bits here can only be
This commit is contained in:
Isis Lovecruft 2017-10-31 00:00:11 +00:00
parent 6ed006abc1
commit f0102806a2
Failed to extract signature

View file

@ -106,7 +106,7 @@ impl Scalar32 {
hi[5] = ((words[12] >> 22) | (words[13] << 10)) & mask;
hi[6] = ((words[13] >> 19) | (words[14] << 13)) & mask;
hi[7] = ((words[14] >> 16) | (words[15] << 16)) & mask;
hi[8] = (words[15] >> 13) & mask;
hi[8] = words[15] >> 13 ;
lo = Scalar32::montgomery_mul(&lo, &constants::R); // (lo * R) / R = lo
hi = Scalar32::montgomery_mul(&hi, &constants::RR); // (hi * R^2) / R = hi * R