- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for fieldReduceOnce (0.12 sec)
-
lib/fips140/v1.0.0.zip
field element") } return fieldElement(a), nil } // fieldReduceOnce reduces a value a < 2q. func fieldReduceOnce(a uint16) fieldElement { x := a - q // If x underflowed, then x >= 2¹⁶ - q > 2¹⁵, so the top bit is set. x += (x >> 15) * q return fieldElement(x) } func fieldAdd(a, b fieldElement) fieldElement { x := uint16(a + b) return fieldReduceOnce(x) } func fieldSub(a, b fieldElement) fieldElement { x := uint16(a - b + q) return fieldReduceOnce(x) } const ( barrettMultiplier = 5039 // 2¹² * 2¹²...
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Jan 29 15:10:35 UTC 2025 - 635K bytes - Viewed (0)