Documentation
¶
Index ¶
- Constants
- func AreVarsEquals(api frontend.API, a, b []frontend.Variable) frontend.Variable
- func AssertFpInFpSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrint[FR])
- func AssertFpInSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrintBytes)
- func AssertFpWitness[FR emulated.FieldParams](api frontend.API, fp FingerPrint[FR], els []emulated.Element[FR], ...)
- func AssertValsVSWtnsElements[FR emulated.FieldParams](api frontend.API, vars []frontend.Variable, ...)
- func ElementsLessEq[T emulated.FieldParams](api frontend.API, a, b emulated.Element[T], nbSkipLimbs ...int) frontend.Variable
- func InCircuitFingerPrint[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT](api frontend.API, vk *plonk.VerifyingKey[FR, G1El, G2El]) (frontend.Variable, error)
- func IsEqual(api frontend.API, a, b frontend.Variable) frontend.Variable
- func RetrieveU254ValueFromElement[FR emulated.FieldParams](api frontend.API, e emulated.Element[FR]) frontend.Variable
- func RetrieveU32ValueFromElement[FR emulated.FieldParams](api frontend.API, e emulated.Element[FR]) frontend.Variable
- func RetrieveU8ValueFromElement[FR emulated.FieldParams](api frontend.API, e emulated.Element[FR]) frontend.Variable
- func RetrieveVarsFromElements[FR emulated.FieldParams](api frontend.API, witnessValues []emulated.Element[FR], ...) []frontend.Variable
- func TestFpInFpSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrint[FR]) frontend.Variable
- func TestFpInSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrintBytes) frontend.Variable
- func TestFpWitness[FR emulated.FieldParams](api frontend.API, fp FingerPrint[FR], els []emulated.Element[FR], ...) frontend.Variable
- func TestValsVSWtnsElements[FR emulated.FieldParams](api frontend.API, vars []frontend.Variable, ...) frontend.Variable
- func UnsafeFingerPrintFromVk[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](vk native_plonk.VerifyingKey) ([]byte, error)
- func UnsafeFingerPrintFromVkFile[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, ...](vkFile string) ([]byte, error)
- func ValsFromBytes(data []byte, bitsPerVar int) []frontend.Variable
- func VerifyingKeyMiMCHash[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT](h hash.Hash, vk plonk.VerifyingKey[FR, G1El, G2El]) ([]byte, error)
- type FingerPrint
- type FingerPrintBytes
- type Hash
Constants ¶
View Source
const HashSize = 32
Variables ¶
This section is empty.
Functions ¶
func AreVarsEquals ¶
func AssertFpInFpSet ¶ added in v0.2.0
func AssertFpInFpSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrint[FR])
func AssertFpInSet ¶
func AssertFpInSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrintBytes)
func AssertFpWitness ¶
func AssertFpWitness[FR emulated.FieldParams]( api frontend.API, fp FingerPrint[FR], els []emulated.Element[FR], nbMaxBitsPerVar ...uint, )
func ElementsLessEq ¶ added in v0.2.3
func ElementsLessEq[T emulated.FieldParams](api frontend.API, a, b emulated.Element[T], nbSkipLimbs ...int) frontend.Variable
*
- a, b should be already strictly reduced, so that we can employ nbSkipLimbs *
func InCircuitFingerPrint ¶ added in v0.2.4
func InCircuitFingerPrint[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT]( api frontend.API, vk *plonk.VerifyingKey[FR, G1El, G2El]) (frontend.Variable, error)
FingerPrint() returns the MiMc hash of the VerifyingKey. It could be used to identify a VerifyingKey during recursive verification.
func RetrieveU254ValueFromElement ¶ added in v0.1.5
func RetrieveU32ValueFromElement ¶
func RetrieveU32ValueFromElement[FR emulated.FieldParams](api frontend.API, e emulated.Element[FR]) frontend.Variable
assuming e has been reduced
func RetrieveU8ValueFromElement ¶ added in v0.1.5
func RetrieveU8ValueFromElement[FR emulated.FieldParams](api frontend.API, e emulated.Element[FR]) frontend.Variable
assuming e has been reduced
func RetrieveVarsFromElements ¶ added in v0.2.6
func TestFpInFpSet ¶ added in v0.2.0
func TestFpInFpSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrint[FR]) frontend.Variable
func TestFpInSet ¶ added in v0.1.1
func TestFpInSet[FR emulated.FieldParams](api frontend.API, fp frontend.Variable, fpSet []FingerPrintBytes) frontend.Variable
func TestFpWitness ¶ added in v0.1.1
func TestFpWitness[FR emulated.FieldParams]( api frontend.API, fp FingerPrint[FR], els []emulated.Element[FR], nbMaxBitsPerVar ...uint, ) frontend.Variable
func TestValsVSWtnsElements ¶
func UnsafeFingerPrintFromVk ¶
func UnsafeFingerPrintFromVk[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT](vk native_plonk.VerifyingKey) ([]byte, error)
func UnsafeFingerPrintFromVkFile ¶
func UnsafeFingerPrintFromVkFile[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT, GtEl algebra.GtElementT](vkFile string) ([]byte, error)
func VerifyingKeyMiMCHash ¶
func VerifyingKeyMiMCHash[FR emulated.FieldParams, G1El algebra.G1ElementT, G2El algebra.G2ElementT](h hash.Hash, vk plonk.VerifyingKey[FR, G1El, G2El]) ([]byte, error)
Types ¶
type FingerPrint ¶
type FingerPrint[FR emulated.FieldParams] struct { Val frontend.Variable }
*
- FingerPrint[FR] is computed as MiMc(VerifyingKey[FR, ...]), and should be only one field long.
- When it is used in another field other than where it is computed, it appear as a witness and we should deal with witness in other ways.
func FingerPrintFromBytes ¶
func FingerPrintFromBytes[FR emulated.FieldParams](data FingerPrintBytes) FingerPrint[FR]
func FpValueOf ¶
func FpValueOf[FR emulated.FieldParams](api frontend.API, v frontend.Variable) FingerPrint[FR]
func NewFingerPrint ¶
func NewFingerPrint[FR emulated.FieldParams](v frontend.Variable) FingerPrint[FR]
func (FingerPrint[FR]) AssertIsEqual ¶
func (fp FingerPrint[FR]) AssertIsEqual(api frontend.API, other FingerPrint[FR])
func (FingerPrint[FR]) IsEqual ¶
func (fp FingerPrint[FR]) IsEqual(api frontend.API, other FingerPrint[FR]) frontend.Variable
type FingerPrintBytes ¶
type FingerPrintBytes []byte
type Hash ¶ added in v0.1.4
func FromBytesHash ¶ added in v0.1.4
func (Hash) AssertIsEqual ¶ added in v0.1.4
Click to show internal directories.
Click to hide internal directories.