- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for SubOne (0.07 seconds)
-
lib/fips140/v1.26.0.zip
underflow := x.sub(y) // If the subtraction underflowed, add m. t := NewNat().set(x) t.add(m.nat) x.assign(choice(underflow), t) return x } // SubOne computes x = x - 1 mod m. // // The length of x must be the same as the modulus. func (x *Nat) SubOne(m *Modulus) *Nat { one := NewNat().ExpandFor(m) one.limbs[0] = 1 // Sub asks for x to be reduced modulo m, while SubOne doesn't, but when // y = 1, it works, and this is an internal use. return x.Sub(one, m) } // Add computes x = x + y mod m. // // The length...
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Thu Jan 08 17:58:32 GMT 2026 - 660.3K bytes - Click Count (0) -
lib/fips140/v1.0.0-c2097c7c.zip
underflow := x.sub(y) // If the subtraction underflowed, add m. t := NewNat().set(x) t.add(m.nat) x.assign(choice(underflow), t) return x } // SubOne computes x = x - 1 mod m. // // The length of x must be the same as the modulus. func (x *Nat) SubOne(m *Modulus) *Nat { one := NewNat().ExpandFor(m) one.limbs[0] = 1 // Sub asks for x to be reduced modulo m, while SubOne doesn't, but when // y = 1, it works, and this is an internal use. return x.Sub(one, m) } // Add computes x = x + y mod m. // // The length...
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Thu Sep 25 19:53:19 GMT 2025 - 642.7K bytes - Click Count (0)