Package-Level Type Names (total 24, in which 4 are exported)
/* sort exporteds by: | */
P224Element is an integer modulo 2^224 - 2^96 + 1.
The zero value is a valid zero element. Values are represented internally always in the Montgomery domain, and
converted in Bytes and SetBytes. Add sets e = t1 + t2, and returns e. Bytes returns the 28-byte big-endian encoding of e. Equal returns 1 if e == t, and zero otherwise. Invert sets e = 1/x, and returns e.
If x == 0, Invert returns e = 0. IsZero returns 1 if e == 0, and zero otherwise. Mul sets e = t1 * t2, and returns e. One sets e = 1, and returns e. Select sets v to a if cond == 1, and to b if cond == 0. Set sets e = t, and returns e. SetBytes sets e = v, where v is a big-endian 28-byte encoding, and returns e.
If v is not 28 bytes or it encodes a value higher than 2^224 - 2^96 + 1,
SetBytes returns nil and an error, and e is unchanged. Square sets e = t * t, and returns e. Sub sets e = t1 - t2, and returns e.(*P224Element) bytes(out *[28]byte) []byte
func (*P224Element).Add(t1, t2 *P224Element) *P224Element
func (*P224Element).Invert(x *P224Element) *P224Element
func (*P224Element).Mul(t1, t2 *P224Element) *P224Element
func (*P224Element).One() *P224Element
func (*P224Element).Select(a, b *P224Element, cond int) *P224Element
func (*P224Element).Set(t *P224Element) *P224Element
func (*P224Element).SetBytes(v []byte) (*P224Element, error)
func (*P224Element).Square(t *P224Element) *P224Element
func (*P224Element).Sub(t1, t2 *P224Element) *P224Element
func crypto/internal/nistec.p224B() *P224Element
func crypto/internal/nistec.p224Polynomial(y2, x *P224Element) *P224Element
func (*P224Element).Add(t1, t2 *P224Element) *P224Element
func (*P224Element).Equal(t *P224Element) int
func (*P224Element).Invert(x *P224Element) *P224Element
func (*P224Element).Mul(t1, t2 *P224Element) *P224Element
func (*P224Element).Select(a, b *P224Element, cond int) *P224Element
func (*P224Element).Set(t *P224Element) *P224Element
func (*P224Element).Square(t *P224Element) *P224Element
func (*P224Element).Sub(t1, t2 *P224Element) *P224Element
func crypto/internal/nistec.p224CheckOnCurve(x, y *P224Element) error
func crypto/internal/nistec.p224Polynomial(y2, x *P224Element) *P224Element
func crypto/internal/nistec.p224Sqrt(e, x *P224Element) (isSquare bool)
func crypto/internal/nistec.p224SqrtCandidate(r, x *P224Element)
var crypto/internal/nistec._p224B *fiat.P224Element
P256Element is an integer modulo 2^256 - 2^224 + 2^192 + 2^96 - 1.
The zero value is a valid zero element. Values are represented internally always in the Montgomery domain, and
converted in Bytes and SetBytes. Add sets e = t1 + t2, and returns e. Bytes returns the 32-byte big-endian encoding of e. Equal returns 1 if e == t, and zero otherwise. Invert sets e = 1/x, and returns e.
If x == 0, Invert returns e = 0. IsZero returns 1 if e == 0, and zero otherwise. Mul sets e = t1 * t2, and returns e. One sets e = 1, and returns e. Select sets v to a if cond == 1, and to b if cond == 0. Set sets e = t, and returns e. SetBytes sets e = v, where v is a big-endian 32-byte encoding, and returns e.
If v is not 32 bytes or it encodes a value higher than 2^256 - 2^224 + 2^192 + 2^96 - 1,
SetBytes returns nil and an error, and e is unchanged. Square sets e = t * t, and returns e. Sub sets e = t1 - t2, and returns e.(*P256Element) bytes(out *[32]byte) []byte
func (*P256Element).Add(t1, t2 *P256Element) *P256Element
func (*P256Element).Invert(x *P256Element) *P256Element
func (*P256Element).Mul(t1, t2 *P256Element) *P256Element
func (*P256Element).One() *P256Element
func (*P256Element).Select(a, b *P256Element, cond int) *P256Element
func (*P256Element).Set(t *P256Element) *P256Element
func (*P256Element).SetBytes(v []byte) (*P256Element, error)
func (*P256Element).Square(t *P256Element) *P256Element
func (*P256Element).Sub(t1, t2 *P256Element) *P256Element
func (*P256Element).Add(t1, t2 *P256Element) *P256Element
func (*P256Element).Equal(t *P256Element) int
func (*P256Element).Invert(x *P256Element) *P256Element
func (*P256Element).Mul(t1, t2 *P256Element) *P256Element
func (*P256Element).Select(a, b *P256Element, cond int) *P256Element
func (*P256Element).Set(t *P256Element) *P256Element
func (*P256Element).Square(t *P256Element) *P256Element
func (*P256Element).Sub(t1, t2 *P256Element) *P256Element
P384Element is an integer modulo 2^384 - 2^128 - 2^96 + 2^32 - 1.
The zero value is a valid zero element. Values are represented internally always in the Montgomery domain, and
converted in Bytes and SetBytes. Add sets e = t1 + t2, and returns e. Bytes returns the 48-byte big-endian encoding of e. Equal returns 1 if e == t, and zero otherwise. Invert sets e = 1/x, and returns e.
If x == 0, Invert returns e = 0. IsZero returns 1 if e == 0, and zero otherwise. Mul sets e = t1 * t2, and returns e. One sets e = 1, and returns e. Select sets v to a if cond == 1, and to b if cond == 0. Set sets e = t, and returns e. SetBytes sets e = v, where v is a big-endian 48-byte encoding, and returns e.
If v is not 48 bytes or it encodes a value higher than 2^384 - 2^128 - 2^96 + 2^32 - 1,
SetBytes returns nil and an error, and e is unchanged. Square sets e = t * t, and returns e. Sub sets e = t1 - t2, and returns e.(*P384Element) bytes(out *[48]byte) []byte
func (*P384Element).Add(t1, t2 *P384Element) *P384Element
func (*P384Element).Invert(x *P384Element) *P384Element
func (*P384Element).Mul(t1, t2 *P384Element) *P384Element
func (*P384Element).One() *P384Element
func (*P384Element).Select(a, b *P384Element, cond int) *P384Element
func (*P384Element).Set(t *P384Element) *P384Element
func (*P384Element).SetBytes(v []byte) (*P384Element, error)
func (*P384Element).Square(t *P384Element) *P384Element
func (*P384Element).Sub(t1, t2 *P384Element) *P384Element
func crypto/internal/nistec.p384B() *P384Element
func crypto/internal/nistec.p384Polynomial(y2, x *P384Element) *P384Element
func (*P384Element).Add(t1, t2 *P384Element) *P384Element
func (*P384Element).Equal(t *P384Element) int
func (*P384Element).Invert(x *P384Element) *P384Element
func (*P384Element).Mul(t1, t2 *P384Element) *P384Element
func (*P384Element).Select(a, b *P384Element, cond int) *P384Element
func (*P384Element).Set(t *P384Element) *P384Element
func (*P384Element).Square(t *P384Element) *P384Element
func (*P384Element).Sub(t1, t2 *P384Element) *P384Element
func crypto/internal/nistec.p384CheckOnCurve(x, y *P384Element) error
func crypto/internal/nistec.p384Polynomial(y2, x *P384Element) *P384Element
func crypto/internal/nistec.p384Sqrt(e, x *P384Element) (isSquare bool)
func crypto/internal/nistec.p384SqrtCandidate(z, x *P384Element)
var crypto/internal/nistec._p384B *fiat.P384Element
P521Element is an integer modulo 2^521 - 1.
The zero value is a valid zero element. Values are represented internally always in the Montgomery domain, and
converted in Bytes and SetBytes. Add sets e = t1 + t2, and returns e. Bytes returns the 66-byte big-endian encoding of e. Equal returns 1 if e == t, and zero otherwise. Invert sets e = 1/x, and returns e.
If x == 0, Invert returns e = 0. IsZero returns 1 if e == 0, and zero otherwise. Mul sets e = t1 * t2, and returns e. One sets e = 1, and returns e. Select sets v to a if cond == 1, and to b if cond == 0. Set sets e = t, and returns e. SetBytes sets e = v, where v is a big-endian 66-byte encoding, and returns e.
If v is not 66 bytes or it encodes a value higher than 2^521 - 1,
SetBytes returns nil and an error, and e is unchanged. Square sets e = t * t, and returns e. Sub sets e = t1 - t2, and returns e.(*P521Element) bytes(out *[66]byte) []byte
func (*P521Element).Add(t1, t2 *P521Element) *P521Element
func (*P521Element).Invert(x *P521Element) *P521Element
func (*P521Element).Mul(t1, t2 *P521Element) *P521Element
func (*P521Element).One() *P521Element
func (*P521Element).Select(a, b *P521Element, cond int) *P521Element
func (*P521Element).Set(t *P521Element) *P521Element
func (*P521Element).SetBytes(v []byte) (*P521Element, error)
func (*P521Element).Square(t *P521Element) *P521Element
func (*P521Element).Sub(t1, t2 *P521Element) *P521Element
func crypto/internal/nistec.p521B() *P521Element
func crypto/internal/nistec.p521Polynomial(y2, x *P521Element) *P521Element
func (*P521Element).Add(t1, t2 *P521Element) *P521Element
func (*P521Element).Equal(t *P521Element) int
func (*P521Element).Invert(x *P521Element) *P521Element
func (*P521Element).Mul(t1, t2 *P521Element) *P521Element
func (*P521Element).Select(a, b *P521Element, cond int) *P521Element
func (*P521Element).Set(t *P521Element) *P521Element
func (*P521Element).Square(t *P521Element) *P521Element
func (*P521Element).Sub(t1, t2 *P521Element) *P521Element
func crypto/internal/nistec.p521CheckOnCurve(x, y *P521Element) error
func crypto/internal/nistec.p521Polynomial(y2, x *P521Element) *P521Element
func crypto/internal/nistec.p521Sqrt(e, x *P521Element) (isSquare bool)
func crypto/internal/nistec.p521SqrtCandidate(z, x *P521Element)
var crypto/internal/nistec._p521B *fiat.P521Element
The type p224NonMontgomeryDomainFieldElement is a field element NOT in the Montgomery domain.
Bounds: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
func p224FromMontgomery(out1 *p224NonMontgomeryDomainFieldElement, arg1 *p224MontgomeryDomainFieldElement)
func p224ToMontgomery(out1 *p224MontgomeryDomainFieldElement, arg1 *p224NonMontgomeryDomainFieldElement)
The type p256NonMontgomeryDomainFieldElement is a field element NOT in the Montgomery domain.
Bounds: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
func p256FromMontgomery(out1 *p256NonMontgomeryDomainFieldElement, arg1 *p256MontgomeryDomainFieldElement)
func p256ToMontgomery(out1 *p256MontgomeryDomainFieldElement, arg1 *p256NonMontgomeryDomainFieldElement)
The type p384NonMontgomeryDomainFieldElement is a field element NOT in the Montgomery domain.
Bounds: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff]]
func p384FromMontgomery(out1 *p384NonMontgomeryDomainFieldElement, arg1 *p384MontgomeryDomainFieldElement)
func p384ToMontgomery(out1 *p384MontgomeryDomainFieldElement, arg1 *p384NonMontgomeryDomainFieldElement)
Package-Level Functions (total 48, none are exported)
p224Add adds two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p224FromBytes deserializes a field element NOT in the Montgomery domain from bytes in little-endian order.
Preconditions:
0 ≤ bytes_eval arg1 < m
Postconditions:
eval out1 mod m = bytes_eval arg1 mod m
0 ≤ eval out1 < m
Input Bounds:
arg1: [[0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff], [0x0 ~> 0xff]]
Output Bounds:
out1: [[0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffffffffffff], [0x0 ~> 0xffffffff]]
p224FromMontgomery translates a field element out of the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^4) mod m
0 ≤ eval out1 < m
p224Mul multiplies two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p224SetOne returns the field element one in the Montgomery domain.
Postconditions:
eval (from_montgomery out1) mod m = 1 mod m
0 ≤ eval out1 < m
p224Square squares a field element in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
0 ≤ eval out1 < m
p224Sub subtracts two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p224ToMontgomery translates a field element into the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = eval arg1 mod m
0 ≤ eval out1 < m
p256Add adds two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p256FromMontgomery translates a field element out of the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^4) mod m
0 ≤ eval out1 < m
p256Mul multiplies two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p256SetOne returns the field element one in the Montgomery domain.
Postconditions:
eval (from_montgomery out1) mod m = 1 mod m
0 ≤ eval out1 < m
p256Square squares a field element in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
0 ≤ eval out1 < m
p256Sub subtracts two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p256ToMontgomery translates a field element into the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = eval arg1 mod m
0 ≤ eval out1 < m
p384Add adds two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p384FromMontgomery translates a field element out of the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^6) mod m
0 ≤ eval out1 < m
p384Mul multiplies two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p384SetOne returns the field element one in the Montgomery domain.
Postconditions:
eval (from_montgomery out1) mod m = 1 mod m
0 ≤ eval out1 < m
p384Square squares a field element in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
0 ≤ eval out1 < m
p384Sub subtracts two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p384ToMontgomery translates a field element into the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = eval arg1 mod m
0 ≤ eval out1 < m
p521Add adds two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) + eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p521FromMontgomery translates a field element out of the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval out1 mod m = (eval arg1 * ((2^64)⁻¹ mod m)^9) mod m
0 ≤ eval out1 < m
p521Mul multiplies two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p521SetOne returns the field element one in the Montgomery domain.
Postconditions:
eval (from_montgomery out1) mod m = 1 mod m
0 ≤ eval out1 < m
p521Square squares a field element in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg1)) mod m
0 ≤ eval out1 < m
p521Sub subtracts two field elements in the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
0 ≤ eval arg2 < m
Postconditions:
eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) - eval (from_montgomery arg2)) mod m
0 ≤ eval out1 < m
p521ToMontgomery translates a field element into the Montgomery domain.
Preconditions:
0 ≤ eval arg1 < m
Postconditions:
eval (from_montgomery out1) mod m = eval arg1 mod m
0 ≤ eval out1 < m
Package-Level Constants (total 4, none are exported)
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.