fix for V-SCT-VUL-027

This commit is contained in:
Kevin Jue
2023-12-19 12:22:19 -08:00
parent 40d71e9e29
commit f256ca69f3
6 changed files with 23 additions and 16 deletions

View File

@@ -151,7 +151,7 @@ func (g *RandomAccessGate) EvalUnfiltered(
y := listItems[i+1]
// This is computing `if b { x } else { y }`
// i.e. `bx - (by-y)`.
// i.e. `by - (bx - x)`.
mul1 := glApi.MulExtension(b, x)
sub1 := glApi.SubExtension(mul1, x)

View File

@@ -12,7 +12,7 @@ import (
var reducingExtensionGateRegex = regexp.MustCompile("ReducingExtensionGate { num_coeffs: (?P<numCoeffs>[0-9]+) }")
func deserializeReducingExtensionGate(parameters map[string]string) Gate {
// Has the format "ReducingGate { num_coeffs: 33 }"
// Has the format "ReducingExtensionGate { num_coeffs: 33 }"
numCoeffs, hasNumCoeffs := parameters["numCoeffs"]
if !hasNumCoeffs {
panic("Missing field num_coeffs in ReducingExtensionGate")