diff --git a/bindings/go/blst.go b/bindings/go/blst.go index 2e5119cf..77f22419 100644 --- a/bindings/go/blst.go +++ b/bindings/go/blst.go @@ -928,6 +928,15 @@ func (agg *P2Aggregate) Aggregate(elmts []*P2Affine, return agg.coreAggregate(getter, groupcheck, len(elmts)) } +func (agg *P2Aggregate) AggregateWithRandomness(pointsIf interface{}, + scalarsIf interface{}, nbits int, groupcheck bool) bool { + if groupcheck && !P2AffinesValidate(pointsIf) { + return false + } + agg.v = P2AffinesMult(pointsIf, scalarsIf, nbits) + return true +} + // Aggregate compressed elements func (agg *P2Aggregate) AggregateCompressed(elmts [][]byte, groupcheck bool) bool { @@ -1519,6 +1528,15 @@ func (agg *P1Aggregate) Aggregate(elmts []*P1Affine, return agg.coreAggregate(getter, groupcheck, len(elmts)) } +func (agg *P1Aggregate) AggregateWithRandomness(pointsIf interface{}, + scalarsIf interface{}, nbits int, groupcheck bool) bool { + if groupcheck && !P1AffinesValidate(pointsIf) { + return false + } + agg.v = P1AffinesMult(pointsIf, scalarsIf, nbits) + return true +} + // Aggregate compressed elements func (agg *P1Aggregate) AggregateCompressed(elmts [][]byte, groupcheck bool) bool { diff --git a/bindings/go/blst_minpk.tgo b/bindings/go/blst_minpk.tgo index b1eead55..7d329bbc 100644 --- a/bindings/go/blst_minpk.tgo +++ b/bindings/go/blst_minpk.tgo @@ -458,6 +458,15 @@ func (agg *P2Aggregate) Aggregate(elmts []*P2Affine, return agg.coreAggregate(getter, groupcheck, len(elmts)) } +func (agg *P2Aggregate) AggregateWithRandomness(pointsIf interface{}, + scalarsIf interface{}, nbits int, groupcheck bool) bool { + if groupcheck && !P2AffinesValidate(pointsIf) { + return false + } + agg.v = P2AffinesMult(pointsIf, scalarsIf, nbits) + return true +} + // Aggregate compressed elements func (agg *P2Aggregate) AggregateCompressed(elmts [][]byte, groupcheck bool) bool {