Documentation ¶
Overview ¶
Package decaf448 implements the Decaf448 group of prime order
l = 2^446 - 13818066809895115352007386748515426880336692474882178609894547503885
as specified in https://datatracker.ietf.org/doc/draft-irtf-cfrg-ristretto255-decaf448.
Index ¶
- Variables
- type DecafElement
- type Element
- func (e *Element) AbsoluteCT(u *Element) *Element
- func (e *Element) Add(u, v *Element) *Element
- func (e *Element) Bytes() []byte
- func (e *Element) Compare(u *Element) int
- func (e *Element) Exp(u, v *Element) *Element
- func (e *Element) Invert(u, exp *Element) *Element
- func (e *Element) IsEqualCT(u *Element) int
- func (e *Element) IsNegative() int
- func (e *Element) IsSquareCT() bool
- func (e *Element) IsZero() int
- func (e *Element) Multiply(u, v *Element) *Element
- func (e *Element) Negate(u *Element) *Element
- func (e *Element) One() *Element
- func (e *Element) Random(order *Element) *Element
- func (e *Element) SelectCT(u, v *Element, cond int) *Element
- func (e *Element) Set(u *Element) *Element
- func (e *Element) SetBytesBig(u []byte) (*Element, error)
- func (e *Element) SetBytesLittle(u []byte) (*Element, error)
- func (e *Element) SetInt(u *big.Int) *Element
- func (e *Element) SetString(u string, base int) (*Element, error)
- func (e *Element) SqrtRatio(u, v *Element) (wasSquare int, fe *Element)
- func (e *Element) Square(u *Element) *Element
- func (e *Element) Subtract(u, v *Element) *Element
- func (e *Element) SwapCT(u *Element, condition bool)
- func (e *Element) Zero() *Element
- type Point
- func (p *Point) Add(q *Point) *Point
- func (p *Point) Add2(q *Point) *Point
- func (p *Point) Copy() *Point
- func (p *Point) Double() *Point
- func (p *Point) IsEqual(q *Point) int
- func (p *Point) IsInfinity() int
- func (p *Point) Negate(q *Point) *Point
- func (p *Point) ScalarMult(s *Element, q *Point) *Point
- func (p *Point) Set(q *Point) *Point
- func (p *Point) Subtract(q *Point) *Point
Constants ¶
This section is empty.
Variables ¶
View Source
var (
// D = -39081
D, _ = newElement().SetString("726838724295606890549323807888004534353641360687318060281490199180612328166730772686396383698676545930088884461843637361053498018326358", 10)
)
Functions ¶
This section is empty.
Types ¶
type DecafElement ¶
type DecafElement struct {
// contains filtered or unexported fields
}
func NewGroupElement ¶
func NewGroupElement() *DecafElement
func (*DecafElement) Decode ¶
func (e *DecafElement) Decode(input []byte) *DecafElement
func (*DecafElement) Encode ¶
func (e *DecafElement) Encode() []byte
func (*DecafElement) OneWayMap ¶
func (e *DecafElement) OneWayMap(input []byte) *DecafElement
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
func (*Element) AbsoluteCT ¶
func (*Element) IsNegative ¶
func (*Element) IsSquareCT ¶
type Point ¶
type Point struct {
/*
Extended Twisted Edwards Coordinates System
"Twisted Edwards Curves Revisited" - 2008
https://link.springer.com/content/pdf/10.1007/978-3-540-89255-7_20.pdf
*/
X, Y, T, Z Element
}
func (*Point) IsInfinity ¶
Click to show internal directories.
Click to hide internal directories.