package curve25519

Import Path
	golang.org/x/crypto/curve25519 (on go.dev)

Dependency Relation
	imports one package, and imported by one package

Involved Source Files Package curve25519 provides an implementation of the X25519 function, which performs scalar multiplication on the elliptic curve known as Curve25519. See RFC 7748. Starting in Go 1.20, this package is a wrapper for the X25519 implementation in the crypto/ecdh package. curve25519_go120.go
Package-Level Functions (total 3)
ScalarBaseMult sets dst to the product scalar * base where base is the standard generator. It is recommended to use the X25519 function with Basepoint instead, as copying into fixed size arrays can lead to unexpected bugs.
ScalarMult sets dst to the product scalar * point. Deprecated: when provided a low-order point, ScalarMult will set dst to all zeroes, irrespective of the scalar. Instead, use the X25519 function, which will return an error.
X25519 returns the result of the scalar multiplication (scalar * point), according to RFC 7748, Section 5. scalar, point and the return value are slices of 32 bytes. scalar can be generated at random, for example with crypto/rand. point should be either Basepoint or the output of another X25519 call. If point is Basepoint (but not if it's a different slice with the same contents) a precomputed implementation might be used for performance.
Package-Level Variables (only one)
Basepoint is the canonical Curve25519 generator.
Package-Level Constants (total 2)
PointSize is the size of the point input to X25519.
ScalarSize is the size of the scalar input to X25519.