decaf448

package module
v0.0.0-...-8bf74c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2022 License: MIT Imports: 4 Imported by: 0

README

decaf448

Implements Decaf448 as specified in https://datatracker.ietf.org/doc/draft-irtf-cfrg-ristretto255-decaf448.

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

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 (e *Element) AbsoluteCT(u *Element) *Element

func (*Element) Add

func (e *Element) Add(u, v *Element) *Element

func (*Element) Bytes

func (e *Element) Bytes() []byte

func (*Element) Compare

func (e *Element) Compare(u *Element) int

func (*Element) Exp

func (e *Element) Exp(u, v *Element) *Element

func (*Element) Invert

func (e *Element) Invert(u, exp *Element) *Element

func (*Element) IsEqualCT

func (e *Element) IsEqualCT(u *Element) int

func (*Element) IsNegative

func (e *Element) IsNegative() int

func (*Element) IsSquareCT

func (e *Element) IsSquareCT() bool

func (*Element) IsZero

func (e *Element) IsZero() int

func (*Element) Multiply

func (e *Element) Multiply(u, v *Element) *Element

func (*Element) Negate

func (e *Element) Negate(u *Element) *Element

func (*Element) One

func (e *Element) One() *Element

func (*Element) Random

func (e *Element) Random(order *Element) *Element

func (*Element) SelectCT

func (e *Element) SelectCT(u, v *Element, cond int) *Element

func (*Element) Set

func (e *Element) Set(u *Element) *Element

func (*Element) SetBytesBig

func (e *Element) SetBytesBig(u []byte) (*Element, error)

func (*Element) SetBytesLittle

func (e *Element) SetBytesLittle(u []byte) (*Element, error)

func (*Element) SetInt

func (e *Element) SetInt(u *big.Int) *Element

func (*Element) SetString

func (e *Element) SetString(u string, base int) (*Element, error)

func (*Element) SqrtRatio

func (e *Element) SqrtRatio(u, v *Element) (wasSquare int, fe *Element)

func (*Element) Square

func (e *Element) Square(u *Element) *Element

func (*Element) Subtract

func (e *Element) Subtract(u, v *Element) *Element

func (*Element) SwapCT

func (e *Element) SwapCT(u *Element, condition bool)

func (*Element) Zero

func (e *Element) Zero() *Element

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) Add

func (p *Point) Add(q *Point) *Point

func (*Point) Add2

func (p *Point) Add2(q *Point) *Point

func (*Point) Copy

func (p *Point) Copy() *Point

func (*Point) Double

func (p *Point) Double() *Point

func (*Point) IsEqual

func (p *Point) IsEqual(q *Point) int

func (*Point) IsInfinity

func (p *Point) IsInfinity() int

func (*Point) Negate

func (p *Point) Negate(q *Point) *Point

func (*Point) ScalarMult

func (p *Point) ScalarMult(s *Element, q *Point) *Point

func (*Point) Set

func (p *Point) Set(q *Point) *Point

func (*Point) Subtract

func (p *Point) Subtract(q *Point) *Point

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL