zkfold-base-0.1.0.0: ZkFold Symbolic compiler and zero-knowledge proof protocols
Safe HaskellSafe-Inferred
LanguageHaskell2010

ZkFold.Base.Algebra.EllipticCurve.Ed25519

Synopsis

Documentation

data Ed25519 a Source #

The Ed25519 curve used in EdDSA signature scheme. a represents the "computational backend" used to store and perform operations on curve points.

Instances

Instances details
EllipticCurve (Ed25519 Void) Source #

The purely mathematical implementation of Ed25519. It is available for use as-is and serves as "backend" for the UInt 256 (Zp p) implementation as well.

Instance details

Defined in ZkFold.Base.Algebra.EllipticCurve.Ed25519

Associated Types

type BaseField (Ed25519 Void) Source #

type ScalarField (Ed25519 Void) Source #

Finite (Zp p) => EllipticCurve (Ed25519 (Zp p) :: Type) Source #

Ed25519 with UInt 256 (Zp p) as computational backend

Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

Associated Types

type BaseField (Ed25519 (Zp p)) Source #

type ScalarField (Ed25519 (Zp p)) Source #

Methods

inf :: Point (Ed25519 (Zp p)) Source #

gen :: Point (Ed25519 (Zp p)) Source #

add :: Point (Ed25519 (Zp p)) -> Point (Ed25519 (Zp p)) -> Point (Ed25519 (Zp p)) Source #

mul :: ScalarField (Ed25519 (Zp p)) -> Point (Ed25519 (Zp p)) -> Point (Ed25519 (Zp p)) Source #

(Arithmetic a, SymbolicData a (UInt 256 (ArithmeticCircuit a)), FromConstant Natural (UInt 512 (ArithmeticCircuit a)), EuclideanDomain (UInt 512 (ArithmeticCircuit a)), BinaryExpansion (UInt 256 (ArithmeticCircuit a))) => EllipticCurve (Ed25519 (ArithmeticCircuit a) :: Type) Source #

Ed25519 with UInt 256 (ArithmeticCircuit a) as computational backend

Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

SymbolicData a (UInt 256 (ArithmeticCircuit a)) => SymbolicData a (Point (Ed25519 (ArithmeticCircuit a))) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

(Ring a, Eq (Bool a) (BaseField (Ed25519 a))) => Eq (Bool a) (Point (Ed25519 a)) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

Methods

(==) :: Point (Ed25519 a) -> Point (Ed25519 a) -> Bool a Source #

(/=) :: Point (Ed25519 a) -> Point (Ed25519 a) -> Bool a Source #

type BaseField (Ed25519 Void) Source # 
Instance details

Defined in ZkFold.Base.Algebra.EllipticCurve.Ed25519

type BaseField (Ed25519 (Zp p) :: Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

type BaseField (Ed25519 (Zp p) :: Type) = UInt 256 (Zp p)
type BaseField (Ed25519 (ArithmeticCircuit a) :: Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

type ScalarField (Ed25519 Void) Source # 
Instance details

Defined in ZkFold.Base.Algebra.EllipticCurve.Ed25519

type ScalarField (Ed25519 (Zp p) :: Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

type ScalarField (Ed25519 (Zp p) :: Type) = UInt 256 (Zp p)
type ScalarField (Ed25519 (ArithmeticCircuit a) :: Type) Source # 
Instance details

Defined in ZkFold.Symbolic.Data.Ed25519

type Ed25519_Scalar = 7237005577332262213973186563042994240857116359379907606001950938285454250989 Source #

2^252 + 27742317777372353535851937790883648493 is the order of the multiplicative group in Ed25519 with the generator point defined below in instance EllipticCurve (Ed25519 Void)

type Ed25519_Base = 57896044618658097711785492504343953926634992332820282019728792003956564819949 Source #

2^255 - 19 is the order of the base field from which point coordinates are taken.

Orphan instances

Prime Ed25519_Base Source # 
Instance details

Prime Ed25519_Scalar Source # 
Instance details