Module sodiumoxide::crypto::scalarmult::curve25519 [] [src]

crypto_scalarmult_curve25519 specified in Cryptography in NaCl, Sections 2, 3, and 4. This function is conjectured to be strong. For background see Bernstein, "Curve25519: new Diffie-Hellman speed records," Lecture Notes in Computer Science 3958 (2006), 207–228, http://cr.yp.to/papers.html#curve25519.

Structs

GroupElement

GroupElement

Scalar

Scalar value (integer in byte representation)

Constants

GROUPELEMENTBYTES

Number of bytes in a GroupElement.

SCALARBYTES

Number of bytes in a Scalar.

Functions

scalarmult

scalarmult() multiplies a group element p by an integer n. It returns the resulting group element Ok(q). If the the GroupElement is all zero, scalarmult() returns Err(()) since the resulting GroupElement would be all zero, no matter the Scalar.

scalarmult_base

scalarmult_base() computes the scalar product of a standard group element and an integer n. It returns the resulting group element q/