P224Element is an integer modulo 2^224 - 2^96 + 1.
The zero value is a valid zero element. 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.
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 (*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
P256Element is an integer modulo 2^256 - 2^224 + 2^192 + 2^96 - 1.
The zero value is a valid zero element. 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.
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. 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.
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 (*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
P521Element is an integer modulo 2^521 - 1.
The zero value is a valid zero element. 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.
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 (*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
The pages are generated with Goldsv0.7.3-preview. (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 @zigo_101 (reachable from the left QR code) to get the latest news of Golds.