Involved Source Filesp224.gop384.go
Package nistec implements the NIST P elliptic curves from FIPS 186-4.
This package uses fiat-crypto for its backend field arithmetic (not math/big)
and exposes constant-time, heap allocation-free, byte slice-based safe APIs.
Group operations use modern and safe complete addition formulas. The point at
infinity is handled and encoded according to SEC 1, Version 2.0, and invalid
curve points can't be represented.
Package-Level Type Names (total 3, all are exported)
/* sort exporteds by: | */
P224Point is a P-224 point. The zero value is NOT valid.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
Add sets q = p1 + p2, and returns q. The points may overlap.
Bytes returns the uncompressed or infinity encoding of p, as specified in
SEC 1, Version 2.0, Section 2.3.3. Note that the encoding of the point at
infinity is shorter than all other encodings.
Double sets q = p + p, and returns q. The points may overlap.
ScalarMult sets p = scalar * q, and returns p.
Select sets q to p1 if cond == 1, and to p2 if cond == 0.
Set sets p = q and returns p.
SetBytes sets p to the compressed, uncompressed, or infinity value encoded in
b, as specified in SEC 1, Version 2.0, Section 2.3.4. If the point is not on
the curve, it returns nil and an error, and the receiver is unchanged.
Otherwise, it returns p.
(*P224Point) bytes(out *[133]byte) []byte
func NewP224Generator() *P224Point
func NewP224Point() *P224Point
func (*P224Point).Add(p1, p2 *P224Point) *P224Point
func (*P224Point).Double(p *P224Point) *P224Point
func (*P224Point).ScalarMult(q *P224Point, scalar []byte) *P224Point
func (*P224Point).Select(p1, p2 *P224Point, cond int) *P224Point
func (*P224Point).Set(q *P224Point) *P224Point
func (*P224Point).SetBytes(b []byte) (*P224Point, error)
func crypto/elliptic.p224PointFromAffine(x, y *big.Int) (p *P224Point, ok bool)
func (*P224Point).Add(p1, p2 *P224Point) *P224Point
func (*P224Point).Double(p *P224Point) *P224Point
func (*P224Point).ScalarMult(q *P224Point, scalar []byte) *P224Point
func (*P224Point).Select(p1, p2 *P224Point, cond int) *P224Point
func (*P224Point).Set(q *P224Point) *P224Point
func crypto/elliptic.p224PointToAffine(p *P224Point) (x, y *big.Int)
var p224G *P224Point
P384Point is a P-384 point. The zero value is NOT valid.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
Add sets q = p1 + p2, and returns q. The points may overlap.
Bytes returns the uncompressed or infinity encoding of p, as specified in
SEC 1, Version 2.0, Section 2.3.3. Note that the encoding of the point at
infinity is shorter than all other encodings.
Double sets q = p + p, and returns q. The points may overlap.
ScalarMult sets p = scalar * q, and returns p.
Select sets q to p1 if cond == 1, and to p2 if cond == 0.
Set sets p = q and returns p.
SetBytes sets p to the compressed, uncompressed, or infinity value encoded in
b, as specified in SEC 1, Version 2.0, Section 2.3.4. If the point is not on
the curve, it returns nil and an error, and the receiver is unchanged.
Otherwise, it returns p.
(*P384Point) bytes(out *[133]byte) []byte
func NewP384Generator() *P384Point
func NewP384Point() *P384Point
func (*P384Point).Add(p1, p2 *P384Point) *P384Point
func (*P384Point).Double(p *P384Point) *P384Point
func (*P384Point).ScalarMult(q *P384Point, scalar []byte) *P384Point
func (*P384Point).Select(p1, p2 *P384Point, cond int) *P384Point
func (*P384Point).Set(q *P384Point) *P384Point
func (*P384Point).SetBytes(b []byte) (*P384Point, error)
func crypto/elliptic.p384PointFromAffine(x, y *big.Int) (p *P384Point, ok bool)
func (*P384Point).Add(p1, p2 *P384Point) *P384Point
func (*P384Point).Double(p *P384Point) *P384Point
func (*P384Point).ScalarMult(q *P384Point, scalar []byte) *P384Point
func (*P384Point).Select(p1, p2 *P384Point, cond int) *P384Point
func (*P384Point).Set(q *P384Point) *P384Point
func crypto/elliptic.p384PointToAffine(p *P384Point) (x, y *big.Int)
var p384G *P384Point
P521Point is a P-521 point. The zero value is NOT valid.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
The point is represented in projective coordinates (X:Y:Z),
where x = X/Z and y = Y/Z.
Add sets q = p1 + p2, and returns q. The points may overlap.
Bytes returns the uncompressed or infinity encoding of p, as specified in
SEC 1, Version 2.0, Section 2.3.3. Note that the encoding of the point at
infinity is shorter than all other encodings.
Double sets q = p + p, and returns q. The points may overlap.
ScalarMult sets p = scalar * q, and returns p.
Select sets q to p1 if cond == 1, and to p2 if cond == 0.
Set sets p = q and returns p.
SetBytes sets p to the compressed, uncompressed, or infinity value encoded in
b, as specified in SEC 1, Version 2.0, Section 2.3.4. If the point is not on
the curve, it returns nil and an error, and the receiver is unchanged.
Otherwise, it returns p.
(*P521Point) bytes(out *[133]byte) []byte
func NewP521Generator() *P521Point
func NewP521Point() *P521Point
func (*P521Point).Add(p1, p2 *P521Point) *P521Point
func (*P521Point).Double(p *P521Point) *P521Point
func (*P521Point).ScalarMult(q *P521Point, scalar []byte) *P521Point
func (*P521Point).Select(p1, p2 *P521Point, cond int) *P521Point
func (*P521Point).Set(q *P521Point) *P521Point
func (*P521Point).SetBytes(b []byte) (*P521Point, error)
func crypto/elliptic.p521PointFromAffine(x, y *big.Int) (p *P521Point, ok bool)
func (*P521Point).Add(p1, p2 *P521Point) *P521Point
func (*P521Point).Double(p *P521Point) *P521Point
func (*P521Point).ScalarMult(q *P521Point, scalar []byte) *P521Point
func (*P521Point).Select(p1, p2 *P521Point, cond int) *P521Point
func (*P521Point).Set(q *P521Point) *P521Point
func crypto/elliptic.p521PointToAffine(p *P521Point) (x, y *big.Int)
var p521G *P521Point
Package-Level Functions (total 9, in which 6 are exported)
NewP224Generator returns a new P224Point set to the canonical generator.
NewP224Point returns a new P224Point representing the point at infinity point.
NewP384Generator returns a new P384Point set to the canonical generator.
NewP384Point returns a new P384Point representing the point at infinity point.
NewP521Generator returns a new P521Point set to the canonical generator.
NewP521Point returns a new P521Point representing the point at infinity point.