Function mul [src]
Multiply a Curve25519 point by a scalar without clamping it.
Return error.IdentityElement if the resulting point is
the identity element or error.WeakPublicKey if the public
key is a low-order point.
Prototype
pub fn mul(p: Curve25519, s: [32]u8) (IdentityElementError || WeakPublicKeyError)!Curve25519
Parameters
p: Curve25519
s: [32]u8
Source
pub fn mul(p: Curve25519, s: [32]u8) (IdentityElementError || WeakPublicKeyError)!Curve25519 {
_ = try p.clearCofactor();
return try ladder(p, s, 256);
}