arnaucube
arnaucube/gnark-plonky2-verifierPublic Self-hosted repository
fix for V-SCT-VUL-024
Kevin Jue kjue235@gmail.com
Tue, 19 Dec 2023 11:04:30 -0800
commit

7c7a01a3951876db1777ade08be3ed34c03c349a

parent

888b247e02007c70c00fa277bf96ae11c56773f0

2 files changed, 3 insertions(+), 2 deletions(-)

jump to
M challenger/challenger.go → challenger/challenger.go

@@ -111,7 +111,7 @@ return gl.QuadraticExtensionVariable{values[0], values[1]}

} func (c *Chip) GetHash() poseidon.GoldilocksHashOut { - return [4]gl.Variable{c.GetChallenge(), c.GetChallenge(), c.GetChallenge(), c.GetChallenge()} + return [poseidon.POSEIDON_GL_HASH_SIZE]gl.Variable{c.GetChallenge(), c.GetChallenge(), c.GetChallenge(), c.GetChallenge()} } func (c *Chip) GetFriChallenges(
M poseidon/goldilocks.go → poseidon/goldilocks.go

@@ -9,10 +9,11 @@ const HALF_N_FULL_ROUNDS = 4

const N_PARTIAL_ROUNDS = 22 const SPONGE_WIDTH = 12 const SPONGE_RATE = 8 +const POSEIDON_GL_HASH_SIZE = 4 type GoldilocksState = [SPONGE_WIDTH]gl.Variable type GoldilocksStateExtension = [SPONGE_WIDTH]gl.QuadraticExtensionVariable -type GoldilocksHashOut = [4]gl.Variable +type GoldilocksHashOut = [POSEIDON_GL_HASH_SIZE]gl.Variable type GoldilocksChip struct { api frontend.API `gnark:"-"`