Documentation ¶
Index ¶
- Constants
- Variables
- func AssertSHA256(api frontend.API, c *Circuit) error
- func Compose(in BaseDec, base *big.Int) *big.Int
- func RandomGroupElement() *big.Int
- func RunBenchmark()
- func SquareModExtractLSBPlaintext(maxDepth int, in *big.Int, base *big.Int) ([]LayerPrecomputedValues, InputOutput)
- type BaseDec
- type Circuit
- type InputOutput
- type LayerPrecomputedValues
- type SHA256Witness
Constants ¶
View Source
const ( Layers = 98 WordSize = 120 ModulusSize = 2048 Words = (ModulusSize+ModulusSize)/WordSize + 2 )
Variables ¶
View Source
var ( N *big.Int Base *big.Int )
Functions ¶
func RandomGroupElement ¶
func RunBenchmark ¶
func RunBenchmark()
func SquareModExtractLSBPlaintext ¶
func SquareModExtractLSBPlaintext(maxDepth int, in *big.Int, base *big.Int) ([]LayerPrecomputedValues, InputOutput)
Types ¶
type Circuit ¶
type Circuit struct { N []frontend.Variable `gnark:",public"` U []frontend.Variable `gnark:",public"` In []frontend.Variable As [Layers][]frontend.Variable Bs [Layers][]frontend.Variable LSBHints [Layers - 2]frontend.Variable Ts [Layers][]frontend.Variable TNs [Layers][]frontend.Variable Hints [Layers][]frontend.Variable Carries [Layers][]frontend.Variable Hints2 [Layers][]frontend.Variable Carries2 [Layers][]frontend.Variable LSBs [Layers - 2]frontend.Variable // SHA256 Hash [8][32]frontend.Variable `gnark:",public"` Constants [8][32]frontend.Variable `gnark:",public"` K [64][32]frontend.Variable `gnark:",public"` Data [16][32]frontend.Variable State [8][32]frontend.Variable }
type InputOutput ¶
type LayerPrecomputedValues ¶
type SHA256Witness ¶
type SHA256Witness struct { Hash [8][32]frontend.Variable `gnark:",public"` Constants [8][32]frontend.Variable `gnark:",public"` K [64][32]frontend.Variable `gnark:",public"` Data [16][32]frontend.Variable State [8][32]frontend.Variable }
func PrepareSHA256Witness ¶
func PrepareSHA256Witness(preImage []byte, hash []byte) SHA256Witness
Click to show internal directories.
Click to hide internal directories.