Function clamp [src]
Perform the X25519 "clamping" operation.
The scalar is then guaranteed to be a multiple of the cofactor.
Prototype
pub inline fn clamp(s: *CompressedScalar) void
Parameters
s: *CompressedScalar
Source
pub inline fn clamp(s: *CompressedScalar) void {
s[0] &= 248;
s[31] = (s[31] & 127) | 64;
}