Documentation
¶
Index ¶
- type AddGate
- func (a AddGate) Degrees() (degHL, degHR, degHPrime int)
- func (a AddGate) Eval(res, vL, vR *fr.Element)
- func (a AddGate) EvalManyVL(res []fr.Element, vLs []fr.Element, vR *fr.Element)
- func (a AddGate) EvalManyVR(res []fr.Element, vL *fr.Element, vRs []fr.Element)
- func (a AddGate) GnarkEval(cs frontend.API, vL, vR frontend.Variable) frontend.Variable
- func (a AddGate) ID() string
- type CipherGate
- func (c *CipherGate) Degree() (degHPrime int)
- func (c *CipherGate) Eval(res *fr.Element, xs ...*fr.Element)
- func (c *CipherGate) EvalBatch(res []fr.Element, xs ...[]fr.Element)
- func (c *CipherGate) GnarkEval(cs frontend.API, xs ...frontend.Variable) frontend.Variable
- func (c *CipherGate) ID() string
- type IdentityGate
- func (c IdentityGate) Degree() (degHPrime int)
- func (c IdentityGate) Eval(res *fr.Element, xs ...*fr.Element)
- func (c IdentityGate) EvalBatch(res []fr.Element, xs ...[]fr.Element)
- func (c IdentityGate) GnarkEval(cs frontend.API, x ...frontend.Variable) frontend.Variable
- func (c IdentityGate) ID() string
- type MulGate
- func (m MulGate) Degrees() (degHL, degHR, degHPrime int)
- func (m MulGate) Eval(res, vL, vR *fr.Element)
- func (m MulGate) EvalManyVL(res, vLs []fr.Element, vR *fr.Element)
- func (m MulGate) EvalManyVR(res []fr.Element, vL *fr.Element, vRs []fr.Element)
- func (m MulGate) GnarkEval(cs frontend.API, vL, vR frontend.Variable) frontend.Variable
- func (m MulGate) ID() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddGate ¶
type AddGate struct{}
AddGate performs an addition
func (AddGate) EvalManyVL ¶
EvalManyVL performs an element-wise addition of many vLs values by one vR value
func (AddGate) EvalManyVR ¶
EvalManyVR performs an element-wise addition of many vRs values by one vL value res must be initialized with the same size as vRs
type CipherGate ¶
CipherGate cipher gate returns vL + (vR + c)^7
func NewCipherGate ¶
func NewCipherGate(ark fr.Element) *CipherGate
NewCipherGate construct a new cipher gate given an ark CipherGate cipher gate returns vL + (vR + c)^7
func (*CipherGate) Degree ¶
func (c *CipherGate) Degree() (degHPrime int)
Degree returns the Degree of the gate on hL, hR and hPrime
func (*CipherGate) Eval ¶
func (c *CipherGate) Eval(res *fr.Element, xs ...*fr.Element)
Eval returns (vL + vR + c)^7
func (*CipherGate) EvalBatch ¶
func (c *CipherGate) EvalBatch(res []fr.Element, xs ...[]fr.Element)
Eval returns (vR + c + vL)^7, on the range of output
func (*CipherGate) ID ¶
func (c *CipherGate) ID() string
ID returns the id of the cipher gate and print the ark as well
type IdentityGate ¶
type IdentityGate struct{}
IdentityGate performs a copy of the vL value and ignores the vR value
func (IdentityGate) Degree ¶
func (c IdentityGate) Degree() (degHPrime int)
Degree returns the Degree of the gate on hL, hR and hPrime
func (IdentityGate) Eval ¶
func (c IdentityGate) Eval(res *fr.Element, xs ...*fr.Element)
Eval returns vL
func (IdentityGate) EvalBatch ¶
func (c IdentityGate) EvalBatch(res []fr.Element, xs ...[]fr.Element)
Eval returns for a range of inputs
func (IdentityGate) ID ¶
func (c IdentityGate) ID() string
ID returns "CopyGate" as an ID for CopyGate
type MulGate ¶
type MulGate struct{}
MulGate performs a multiplication
func (MulGate) EvalManyVL ¶
EvalManyVL performs an element-wise multiplication of many vLs values by one vR value
func (MulGate) EvalManyVR ¶
EvalManyVR performs an element-wise multiplication of many vRs values by one vL value