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

ZkFold.Base.Protocol.NonInteractiveProof.Internal

Documentation

class Monoid ts => ToTranscript ts a where Source #

Methods

toTranscript :: a -> ts Source #

Instances

Instances details
Binary a => ToTranscript ByteString a Source # 
Instance details

Defined in ZkFold.Base.Protocol.NonInteractiveProof.Internal

transcript :: ToTranscript ts a => ts -> a -> ts Source #

class Monoid ts => FromTranscript ts a where Source #

Methods

fromTranscript :: ts -> a Source #

Instances

Instances details
Binary a => FromTranscript ByteString a Source # 
Instance details

Defined in ZkFold.Base.Protocol.NonInteractiveProof.Internal

challenge :: forall ts a. FromTranscript ts a => ts -> a Source #

challenges :: (ToTranscript ts Word8, FromTranscript ts a) => ts -> Natural -> ([a], ts) Source #

class NonInteractiveProof a core where Source #

Associated Types

type Transcript a Source #

type SetupProve a Source #

type SetupVerify a Source #

type Witness a Source #

type Input a Source #

type Proof a Source #

Instances

Instances details
(KZG c1 c2 d ~ kzg, ScalarField c1 ~ f, Point c1 ~ g1, KnownNat d, Ord (ScalarField c1), Binary (ScalarField c1), FiniteField (ScalarField c1), AdditiveGroup (BaseField c1), Binary (Point c1), Pairing c1 c2, CoreFunction c1 core) => NonInteractiveProof (KZG c1 c2 d) (core :: k) Source # 
Instance details

Defined in ZkFold.Base.Protocol.KZG

Associated Types

type Transcript (KZG c1 c2 d) Source #

type SetupProve (KZG c1 c2 d) Source #

type SetupVerify (KZG c1 c2 d) Source #

type Witness (KZG c1 c2 d) Source #

type Input (KZG c1 c2 d) Source #

type Proof (KZG c1 c2 d) Source #

Methods

setupProve :: KZG c1 c2 d -> SetupProve (KZG c1 c2 d) Source #

setupVerify :: KZG c1 c2 d -> SetupVerify (KZG c1 c2 d) Source #

prove :: SetupProve (KZG c1 c2 d) -> Witness (KZG c1 c2 d) -> (Input (KZG c1 c2 d), Proof (KZG c1 c2 d)) Source #

verify :: SetupVerify (KZG c1 c2 d) -> Input (KZG c1 c2 d) -> Proof (KZG c1 c2 d) -> Bool Source #

(NonInteractiveProof (Plonkup p i n l c1 c2 ts) core, SetupProve (Plonkup p i n l c1 c2 ts) ~ PlonkupProverSetup p i n l c1 c2, SetupVerify (Plonkup p i n l c1 c2 ts) ~ PlonkupVerifierSetup p i n l c1 c2, Witness (Plonkup p i n l c1 c2 ts) ~ (PlonkupWitnessInput p i c1, PlonkupProverSecret c1), Input (Plonkup p i n l c1 c2 ts) ~ PlonkupInput l c1, Proof (Plonkup p i n l c1 c2 ts) ~ PlonkupProof c1, KnownNat n, Ord (BaseField c1), AdditiveGroup (BaseField c1), Pairing c1 c2, Arithmetic (ScalarField c1), ToTranscript ts Word8, ToTranscript ts (ScalarField c1), ToTranscript ts (PointCompressed c1), FromTranscript ts (ScalarField c1), CoreFunction c1 core) => NonInteractiveProof (Plonk p i n l c1 c2 ts) (core :: k3) Source # 
Instance details

Defined in ZkFold.Base.Protocol.Plonk

Associated Types

type Transcript (Plonk p i n l c1 c2 ts) Source #

type SetupProve (Plonk p i n l c1 c2 ts) Source #

type SetupVerify (Plonk p i n l c1 c2 ts) Source #

type Witness (Plonk p i n l c1 c2 ts) Source #

type Input (Plonk p i n l c1 c2 ts) Source #

type Proof (Plonk p i n l c1 c2 ts) Source #

Methods

setupProve :: Plonk p i n l c1 c2 ts -> SetupProve (Plonk p i n l c1 c2 ts) Source #

setupVerify :: Plonk p i n l c1 c2 ts -> SetupVerify (Plonk p i n l c1 c2 ts) Source #

prove :: SetupProve (Plonk p i n l c1 c2 ts) -> Witness (Plonk p i n l c1 c2 ts) -> (Input (Plonk p i n l c1 c2 ts), Proof (Plonk p i n l c1 c2 ts)) Source #

verify :: SetupVerify (Plonk p i n l c1 c2 ts) -> Input (Plonk p i n l c1 c2 ts) -> Proof (Plonk p i n l c1 c2 ts) -> Bool Source #

(KnownNat i, KnownNat n, KnownNat l, Representable p, Ord (BaseField c1), AdditiveGroup (BaseField c1), Pairing c1 c2, Arithmetic (ScalarField c1), ToTranscript ts Word8, ToTranscript ts (ScalarField c1), ToTranscript ts (PointCompressed c1), FromTranscript ts (ScalarField c1), CoreFunction c1 core) => NonInteractiveProof (Plonkup p i n l c1 c2 ts) (core :: k3) Source #

Based on the paper https://eprint.iacr.org/2022/086.pdf

Instance details

Defined in ZkFold.Base.Protocol.Plonkup

Associated Types

type Transcript (Plonkup p i n l c1 c2 ts) Source #

type SetupProve (Plonkup p i n l c1 c2 ts) Source #

type SetupVerify (Plonkup p i n l c1 c2 ts) Source #

type Witness (Plonkup p i n l c1 c2 ts) Source #

type Input (Plonkup p i n l c1 c2 ts) Source #

type Proof (Plonkup p i n l c1 c2 ts) Source #

Methods

setupProve :: Plonkup p i n l c1 c2 ts -> SetupProve (Plonkup p i n l c1 c2 ts) Source #

setupVerify :: Plonkup p i n l c1 c2 ts -> SetupVerify (Plonkup p i n l c1 c2 ts) Source #

prove :: SetupProve (Plonkup p i n l c1 c2 ts) -> Witness (Plonkup p i n l c1 c2 ts) -> (Input (Plonkup p i n l c1 c2 ts), Proof (Plonkup p i n l c1 c2 ts)) Source #

verify :: SetupVerify (Plonkup p i n l c1 c2 ts) -> Input (Plonkup p i n l c1 c2 ts) -> Proof (Plonkup p i n l c1 c2 ts) -> Bool Source #

class EllipticCurve curve => CoreFunction curve core where Source #

Methods

msm :: f ~ ScalarField curve => Vector (Point curve) -> PolyVec f size -> Point curve Source #

polyMul :: (f ~ ScalarField curve, Field f, Eq f) => Poly f -> Poly f -> Poly f Source #

Instances

Instances details
(EllipticCurve curve, f ~ ScalarField curve) => CoreFunction (curve :: k) HaskellCore Source # 
Instance details

Defined in ZkFold.Base.Protocol.NonInteractiveProof.Internal

Methods

msm :: forall f (size :: Natural). f ~ ScalarField curve => Vector (Point curve) -> PolyVec f size -> Point curve Source #

polyMul :: (f ~ ScalarField curve, Field f, Eq f) => Poly f -> Poly f -> Poly f Source #

data HaskellCore Source #

Instances

Instances details
(EllipticCurve curve, f ~ ScalarField curve) => CoreFunction (curve :: k) HaskellCore Source # 
Instance details

Defined in ZkFold.Base.Protocol.NonInteractiveProof.Internal

Methods

msm :: forall f (size :: Natural). f ~ ScalarField curve => Vector (Point curve) -> PolyVec f size -> Point curve Source #

polyMul :: (f ~ ScalarField curve, Field f, Eq f) => Poly f -> Poly f -> Poly f Source #