package elliptic

Import Path
	crypto/elliptic (on go.dev)

Dependency Relation
	imports 6 packages, and imported by 5 packages

Involved Source Files Package elliptic implements the standard NIST P-224, P-256, P-384, and P-521 elliptic curves over prime fields. p224.go p256_asm.go p384.go p521.go p256_asm_amd64.s
Package-Level Type Names (total 7, in which 2 are exported)
/* sort exporteds by: | */
A Curve represents a short-form Weierstrass curve with a=-3. The behavior of Add, Double, and ScalarMult when the input is not a point on the curve is undefined. Note that the conventional point at infinity (0, 0) is not considered on the curve, although it can be returned by Add, Double, ScalarMult, or ScalarBaseMult (but not the Unmarshal or UnmarshalCompressed functions). Add returns the sum of (x1,y1) and (x2,y2) Double returns 2*(x,y) IsOnCurve reports whether the given (x,y) lies on the curve. Params returns the parameters for the curve. ScalarBaseMult returns k*G, where G is the base point of the group and k is an integer in big-endian form. ScalarMult returns k*(Bx,By) where k is a number in big-endian form. *CurveParams crypto/ecdsa.PrivateKey crypto/ecdsa.PublicKey func P224() Curve func P256() Curve func P384() Curve func P521() Curve func GenerateKey(curve Curve, rand io.Reader) (priv []byte, x, y *big.Int, err error) func Marshal(curve Curve, x, y *big.Int) []byte func MarshalCompressed(curve Curve, x, y *big.Int) []byte func Unmarshal(curve Curve, data []byte) (x, y *big.Int) func UnmarshalCompressed(curve Curve, data []byte) (x, y *big.Int) func crypto/ecdsa.GenerateKey(c Curve, rand io.Reader) (*ecdsa.PrivateKey, error) func github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto.ECDSAKey(curve Curve, d []byte) *ecdsa.PrivateKey func github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto.ECDSAKeyFromPoint(curve Curve, d *big.Int) *ecdsa.PrivateKey func github.com/aws/aws-sdk-go-v2/internal/v4a/internal/crypto.ECDSAPublicKey(curve Curve, x, y []byte) (*ecdsa.PublicKey, error)
CurveParams contains the parameters of an elliptic curve and also provides a generic, non-constant time implementation of Curve. // the constant of the curve equation // the size of the underlying field // (x,y) of the base point // (x,y) of the base point // the order of the base point // the canonical name of the curve // the order of the underlying field (*CurveParams) Add(x1, y1, x2, y2 *big.Int) (*big.Int, *big.Int) (*CurveParams) Double(x1, y1 *big.Int) (*big.Int, *big.Int) (*CurveParams) IsOnCurve(x, y *big.Int) bool (*CurveParams) Params() *CurveParams (*CurveParams) ScalarBaseMult(k []byte) (*big.Int, *big.Int) (*CurveParams) ScalarMult(Bx, By *big.Int, k []byte) (*big.Int, *big.Int) *CurveParams : Curve func Curve.Params() *CurveParams func (*CurveParams).Params() *CurveParams
Package-Level Functions (total 49, in which 9 are exported)
GenerateKey returns a public/private key pair. The private key is generated using the given reader, which must return random data.
Marshal converts a point on the curve into the uncompressed form specified in SEC 1, Version 2.0, Section 2.3.3. If the point is not on the curve (or is the conventional point at infinity), the behavior is undefined.
MarshalCompressed converts a point on the curve into the compressed form specified in SEC 1, Version 2.0, Section 2.3.3. If the point is not on the curve (or is the conventional point at infinity), the behavior is undefined.
P224 returns a Curve which implements NIST P-224 (FIPS 186-3, section D.2.2), also known as secp224r1. The CurveParams.Name of this Curve is "P-224". Multiple invocations of this function will return the same value, so it can be used for equality checks and switch statements. The cryptographic operations are implemented using constant-time algorithms.
P256 returns a Curve which implements NIST P-256 (FIPS 186-3, section D.2.3), also known as secp256r1 or prime256v1. The CurveParams.Name of this Curve is "P-256". Multiple invocations of this function will return the same value, so it can be used for equality checks and switch statements. ScalarMult and ScalarBaseMult are implemented using constant-time algorithms.
P384 returns a Curve which implements NIST P-384 (FIPS 186-3, section D.2.4), also known as secp384r1. The CurveParams.Name of this Curve is "P-384". Multiple invocations of this function will return the same value, so it can be used for equality checks and switch statements. The cryptographic operations are implemented using constant-time algorithms.
P521 returns a Curve which implements NIST P-521 (FIPS 186-3, section D.2.5), also known as secp521r1. The CurveParams.Name of this Curve is "P-521". Multiple invocations of this function will return the same value, so it can be used for equality checks and switch statements. The cryptographic operations are implemented using constant-time algorithms.
Unmarshal converts a point, serialized by Marshal, into an x, y pair. It is an error if the point is not in uncompressed form, is not on the curve, or is the point at infinity. On error, x = nil.
UnmarshalCompressed converts a point, serialized by MarshalCompressed, into an x, y pair. It is an error if the point is not in compressed form, is not on the curve, or is the point at infinity. On error, x = nil.
Package-Level Variables (total 8, none are exported)