mirror of
https://github.com/arnaucube/gnark-plonky2-verifier.git
synced 2026-01-11 08:31:34 +01:00
fix for V-SCT-VUL-016
This commit is contained in:
@@ -38,9 +38,6 @@ var POWER_OF_TWO_GENERATOR goldilocks.Element = goldilocks.NewElement(1753635133
|
||||
// The modulus of the field.
|
||||
var MODULUS *big.Int = emulated.Goldilocks{}.Modulus()
|
||||
|
||||
// The threshold maximum number of bits at which we must reduce the element.
|
||||
var REDUCE_NB_BITS_THRESHOLD uint8 = 254 - 64
|
||||
|
||||
// The number of bits to use for range checks on inner products of field elements.
|
||||
var RANGE_CHECK_NB_BITS int = 140
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
|
||||
const HALF_N_FULL_ROUNDS = 4
|
||||
const N_PARTIAL_ROUNDS = 22
|
||||
const MAX_WIDTH = 12
|
||||
const SPONGE_WIDTH = 12
|
||||
const SPONGE_RATE = 8
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
package types
|
||||
|
||||
func ReductionArityBits(
|
||||
arityBits uint64,
|
||||
finalPolyBits uint64,
|
||||
degreeBits uint64,
|
||||
rateBits uint64,
|
||||
capHeight uint64,
|
||||
) []uint64 {
|
||||
returnArr := make([]uint64, 0)
|
||||
|
||||
for degreeBits > finalPolyBits && degreeBits+rateBits-arityBits >= capHeight {
|
||||
returnArr = append(returnArr, arityBits)
|
||||
if degreeBits < arityBits {
|
||||
panic("degreeBits < arityBits")
|
||||
}
|
||||
degreeBits -= arityBits
|
||||
}
|
||||
|
||||
return returnArr
|
||||
}
|
||||
@@ -12,18 +12,6 @@ type OpeningSet struct {
|
||||
QuotientPolys []gl.QuadraticExtensionVariable // Length = CommonCircuitData.NumChallenges * CommonCircuitData.QuotientDegreeFactor
|
||||
}
|
||||
|
||||
func NewOpeningSet(numConstants uint64, numRoutedWires uint64, numWires uint64, numChallenges uint64, numPartialProducts uint64, quotientDegreeFactor uint64) OpeningSet {
|
||||
return OpeningSet{
|
||||
Constants: make([]gl.QuadraticExtensionVariable, numConstants),
|
||||
PlonkSigmas: make([]gl.QuadraticExtensionVariable, numRoutedWires),
|
||||
Wires: make([]gl.QuadraticExtensionVariable, numWires),
|
||||
PlonkZs: make([]gl.QuadraticExtensionVariable, numChallenges),
|
||||
PlonkZsNext: make([]gl.QuadraticExtensionVariable, numChallenges),
|
||||
PartialProducts: make([]gl.QuadraticExtensionVariable, numChallenges*numPartialProducts),
|
||||
QuotientPolys: make([]gl.QuadraticExtensionVariable, numChallenges*quotientDegreeFactor),
|
||||
}
|
||||
}
|
||||
|
||||
type ProofChallenges struct {
|
||||
PlonkBetas []gl.Variable
|
||||
PlonkGammas []gl.Variable
|
||||
|
||||
Reference in New Issue
Block a user