Skip to main content

canonical_y

Function canonical_y 

Source
pub fn canonical_y(words: [b64; 4]) -> bool
Expand description

y < p for a 32-byte encoding (sign bit ignored).

p = 2^255 - 19 has words ffff..ffed, ffff..ffff, ffff..ffff, 7fff..ffff (least significant first), so y < p unless the top three words are at their maximum and the low word is at least ffff..ffed.