curve25519

package
v0.0.0-...-29f6767 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(out, a, b *Bignum25519)

out = a + b

func AddAfterBasic

func AddAfterBasic(out, a, b *Bignum25519)

out = a + b, where a and/or b are the result of a basic op (add,sub)

func AddReduce

func AddReduce(out, a, b *Bignum25519)

func Contract

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

Take a fully reduced polynomial form number and contract it into a little-endian, 32-byte array

func Copy

func Copy(out, in *Bignum25519)

out = in

func Expand

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

Take a little-endian, 32-byte number and expand it into polynomial form

func Mul

func Mul(out, in2, in *Bignum25519)

out = a * b

func Neg

func Neg(out, a *Bignum25519)

out = -a

func PowTwo252m3

func PowTwo252m3(two252m3, z *Bignum25519)

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

func Recip

func Recip(out, z *Bignum25519)

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

func Square

func Square(out, in *Bignum25519)

func SquareTimes

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

out = in^(2 * count)

func Sub

func Sub(out, a, b *Bignum25519)

out = a - b

func SubAfterBasic

func SubAfterBasic(out, a, b *Bignum25519)

out = a - b, where a and/or b are the result of a basic op (add,sub)

func SubReduce

func SubReduce(out, a, b *Bignum25519)

func SwapConditional

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

if (iswap) swap(a, b)

Types

type Bignum25519

type Bignum25519 [5]uint64

func (*Bignum25519) Reset

func (out *Bignum25519) Reset()

out = 0

Jump to

Keyboard shortcuts

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