curve25519

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(out, a, b *Bignum25519)

Add out = a + b

func AddAfterBasic

func AddAfterBasic(out, a, b *Bignum25519)

AddAfterBasic out = a + b

func AddReduce

func AddReduce(out, a, b *Bignum25519)

AddReduce out = a + b

func Contract

func Contract(out []byte, in *Bignum25519)

Contract out = []byte (in)

func Copy

func Copy(out, in *Bignum25519)

Copy out = in

func Expand

func Expand(out *Bignum25519, in []byte)

Expand out = bignum25519(in)

func Mul

func Mul(out, a, b *Bignum25519)

Mul out = a * b

func Neg

func Neg(out, a *Bignum25519)

Neg out = -a

func PowTwo252m3

func PowTwo252m3(two252m3, z *Bignum25519)

PowTwo252m3 z^((p-5)/8) = z^(2^252 - 3)

func Recip

func Recip(out, z *Bignum25519)

Recip z^(p - 2) = z(2^255 - 21)

func Square

func Square(out, in *Bignum25519)

Square out = in ^2

func SquareTimes

func SquareTimes(out, in *Bignum25519, count int)

SquareTimes out = in^2^count

func Sub

func Sub(out, a, b *Bignum25519)

Sub out = a - b

func SubAfterBasic

func SubAfterBasic(out, a, b *Bignum25519)

SubAfterBasic out = a -b

func SubReduce

func SubReduce(out, a, b *Bignum25519)

SubReduce out = a -b

func SwapConditional

func SwapConditional(a, b *Bignum25519, iswap uint64)

SwapConditional swap if iswap = true

Types

type Bignum25519

type Bignum25519 [10]uint32

Bignum25519 is Big num in ed25519 curve

func (*Bignum25519) Reset

func (out *Bignum25519) Reset()

Reset set 0 in bignum25519

Jump to

Keyboard shortcuts

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