edwards25519 library

Classes

affineCached
affineLookupTable
A dynamic lookup table for variable-base, constant-time scalar muls.
basepointNafTablePrecomp
basepointTablePrecomp
Bits
Element
nafLookupTable5
A dynamic lookup table for variable-base, constant-time scalar muls.
nafLookupTable8
A dynamic lookup table for variable-base, constant-time scalar muls.
Point
Point represents a point on the edwards25519 curve.
projCached
projLookupTable
A dynamic lookup table for variable-base, constant-time scalar muls.
projP1xP1
projP2
Scalar
A Scalar is an integer modulo
Uint128
uint128 holds a 128-bit number as two 64-bit limbs, for use with the bits.Mul64 and bits.Add64 intrinsics.

Properties

bigInt19 BigInt
final
maskLow51Bits BigInt
Element represents an element of the field GF(2^255-19). Note that this is not a cryptographically secure group, and should only be used to interact with edwards25519.Point coordinates.
final

Functions

checkOnCurve(List<Point> points) bool
constantTimeByteEq(int x, int y) int
constantTimeCompare(List<int> x, List<int> y) int
fiatScalarAdd(List<BigInt> out1, List<BigInt> arg1, List<BigInt> arg2) → void
fiatScalarAdd adds two field elements in the Montgomery domain.
fiatScalarCmovznzU64(BigInt arg1, BigInt arg2, BigInt arg3) BigInt
fiatScalarCmovznzU64 is a single-word conditional move.
fiatScalarFromBytes(List<BigInt> out1, List<int> arg1) → void
fiatScalarFromBytes deserializes a field element NOT in the Montgomery domain from bytes in little-endian order.
fiatScalarFromMontgomery(List<BigInt> out1, List<BigInt> arg1) → void
fiatScalarFromMontgomery translates a field element out of the Montgomery domain.
fiatScalarMul(List<BigInt> out1, List<BigInt> arg1, List<BigInt> arg2) → void
fiatScalarMul multiplies two field elements in the Montgomery domain.
fiatScalarNonzero(List<BigInt> arg1) BigInt
fiatScalarNonzero outputs a single non-zero word if the input is non-zero and zero otherwise.
fiatScalarOpp(List<BigInt> out1, List<BigInt> arg1) → void
fiatScalarOpp negates a field element in the Montgomery domain.
fiatScalarSub(List<BigInt> out1, List<BigInt> arg1, List<BigInt> arg2) → void
fiatScalarSub subtracts two field elements in the Montgomery domain.
fiatScalarToBytes(List<int> out1, List<BigInt> arg1) → void
fiatScalarToBytes serializes a field element NOT in the Montgomery domain to bytes in little-endian order.
fiatScalarToMontgomery(List<BigInt> out1, List<BigInt> arg1) → void
fiatScalarToMontgomery translates a field element into the Montgomery domain.