Function clearCofactor [src]
Multiply a point by the cofactor, returning WeakPublicKey if the element is in a small-order group.
Prototype
pub fn clearCofactor(p: Curve25519) WeakPublicKeyError!Curve25519
Parameters
p: Curve25519
Possible Errors
Source
pub fn clearCofactor(p: Curve25519) WeakPublicKeyError!Curve25519 {
const cofactor = [_]u8{8} ++ [_]u8{0} ** 31;
return ladder(p, cofactor, 4) catch return error.WeakPublicKey;
}