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

ZkFold.Symbolic.Algorithms.RSA

Documentation

sign :: forall ctx msgLen. RSA ctx msgLen => ByteString msgLen ctx -> PrivateKey ctx -> Signature ctx Source #

verify :: forall ctx msgLen. RSA ctx msgLen => ByteString msgLen ctx -> Signature ctx -> PublicKey ctx -> Bool ctx Source #

data PublicKey ctx Source #

Constructors

PublicKey 

Fields

Instances

Instances details
Generic (PublicKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Associated Types

type Rep (PublicKey context) :: Type -> Type #

Methods

from :: PublicKey context -> Rep (PublicKey context) x #

to :: Rep (PublicKey context) x -> PublicKey context #

(Show (context (Vector (NumberOfRegisters (BaseField context) KeyLength 'Auto))), Show (context (Vector (NumberOfRegisters (BaseField context) 32 'Auto))), Show (BaseField context)) => Show (PublicKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

showsPrec :: Int -> PublicKey context -> ShowS #

show :: PublicKey context -> String #

showList :: [PublicKey context] -> ShowS #

(NFData (context (Vector (NumberOfRegisters (BaseField context) KeyLength 'Auto))), NFData (context (Vector (NumberOfRegisters (BaseField context) 32 'Auto)))) => NFData (PublicKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

rnf :: PublicKey context -> () #

(Eq (context (Vector (NumberOfRegisters (BaseField context) KeyLength 'Auto))), Eq (context (Vector (NumberOfRegisters (BaseField context) 32 'Auto)))) => Eq (PublicKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

(==) :: PublicKey context -> PublicKey context -> Bool #

(/=) :: PublicKey context -> PublicKey context -> Bool #

(Symbolic ctx, KnownRegisters ctx 32 'Auto, KnownRegisters ctx KeyLength 'Auto) => SymbolicData (PublicKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Associated Types

type Context (PublicKey ctx) :: (Type -> Type) -> Type Source #

type Support (PublicKey ctx) Source #

type Layout (PublicKey ctx) :: Type -> Type Source #

type Payload (PublicKey ctx) :: Type -> Type Source #

(Symbolic ctx, KnownRegisters ctx 32 'Auto, KnownRegisters ctx KeyLength 'Auto) => SymbolicInput (PublicKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

isValid :: PublicKey ctx -> Bool (Context (PublicKey ctx)) Source #

type Rep (PublicKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Rep (PublicKey context) = D1 ('MetaData "PublicKey" "ZkFold.Symbolic.Algorithms.RSA" "symbolic-base-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PublicKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "pubE") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UInt 32 'Auto context)) :*: S1 ('MetaSel ('Just "pubN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UInt KeyLength 'Auto context))))
type Context (PublicKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Context (PublicKey ctx) = GContext (Rep (PublicKey ctx))
type Layout (PublicKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Layout (PublicKey ctx) = GLayout (Rep (PublicKey ctx))
type Payload (PublicKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Payload (PublicKey ctx) = GPayload (Rep (PublicKey ctx))
type Support (PublicKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Support (PublicKey ctx) = GSupport (Rep (PublicKey ctx))

data PrivateKey ctx Source #

Constructors

PrivateKey 

Fields

Instances

Instances details
Generic (PrivateKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Associated Types

type Rep (PrivateKey context) :: Type -> Type #

Methods

from :: PrivateKey context -> Rep (PrivateKey context) x #

to :: Rep (PrivateKey context) x -> PrivateKey context #

(Show (BaseField context), Show (context (Vector (NumberOfRegisters (BaseField context) KeyLength 'Auto)))) => Show (PrivateKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

showsPrec :: Int -> PrivateKey context -> ShowS #

show :: PrivateKey context -> String #

showList :: [PrivateKey context] -> ShowS #

NFData (context (Vector (NumberOfRegisters (BaseField context) KeyLength 'Auto))) => NFData (PrivateKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

rnf :: PrivateKey context -> () #

Eq (context (Vector (NumberOfRegisters (BaseField context) KeyLength 'Auto))) => Eq (PrivateKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

(==) :: PrivateKey context -> PrivateKey context -> Bool #

(/=) :: PrivateKey context -> PrivateKey context -> Bool #

(Symbolic ctx, KnownRegisters ctx KeyLength 'Auto) => SymbolicData (PrivateKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Associated Types

type Context (PrivateKey ctx) :: (Type -> Type) -> Type Source #

type Support (PrivateKey ctx) Source #

type Layout (PrivateKey ctx) :: Type -> Type Source #

type Payload (PrivateKey ctx) :: Type -> Type Source #

(Symbolic ctx, KnownRegisters ctx KeyLength 'Auto) => SymbolicInput (PrivateKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

Methods

isValid :: PrivateKey ctx -> Bool (Context (PrivateKey ctx)) Source #

type Rep (PrivateKey context) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Rep (PrivateKey context) = D1 ('MetaData "PrivateKey" "ZkFold.Symbolic.Algorithms.RSA" "symbolic-base-0.1.0.0-inplace" 'False) (C1 ('MetaCons "PrivateKey" 'PrefixI 'True) (S1 ('MetaSel ('Just "prvD") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UInt KeyLength 'Auto context)) :*: S1 ('MetaSel ('Just "prvN") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (UInt KeyLength 'Auto context))))
type Context (PrivateKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Layout (PrivateKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Layout (PrivateKey ctx) = GLayout (Rep (PrivateKey ctx))
type Payload (PrivateKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type Support (PrivateKey ctx) Source # 
Instance details

Defined in ZkFold.Symbolic.Algorithms.RSA

type KeyLength = 512 Source #