File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -472,8 +472,10 @@ func (pk *P1Affine) KeyValidate() bool {
472472// always cryptographically safe, but application might want
473473// to guard against obviously bogus individual[!] signatures.
474474func (sig * P2Affine ) SigValidate (sigInfcheck bool ) bool {
475- return (sigInfcheck && ! bool (C .blst_p2_affine_is_inf (sig ))) ||
476- bool (C .blst_p2_affine_in_g2 (sig ))
475+ if sigInfcheck && bool (C .blst_p2_affine_is_inf (sig )) {
476+ return false
477+ }
478+ return bool (C .blst_p2_affine_in_g2 (sig ))
477479}
478480
479481//
@@ -1090,8 +1092,10 @@ func (pk *P2Affine) KeyValidate() bool {
10901092// always cryptographically safe, but application might want
10911093// to guard against obviously bogus individual[!] signatures.
10921094func (sig * P1Affine ) SigValidate (sigInfcheck bool ) bool {
1093- return (sigInfcheck && ! bool (C .blst_p1_affine_is_inf (sig ))) ||
1094- bool (C .blst_p1_affine_in_g1 (sig ))
1095+ if sigInfcheck && bool (C .blst_p1_affine_is_inf (sig )) {
1096+ return false
1097+ }
1098+ return bool (C .blst_p1_affine_in_g1 (sig ))
10951099}
10961100
10971101//
Original file line number Diff line number Diff line change @@ -24,8 +24,10 @@ func (pk *P1Affine) KeyValidate() bool {
2424// always cryptographically safe, but application might want
2525// to guard against obviously bogus individual[!] signatures.
2626func (sig *P2Affine) SigValidate(sigInfcheck bool) bool {
27- return (sigInfcheck && !bool(C.blst_p2_affine_is_inf(sig))) ||
28- bool(C.blst_p2_affine_in_g2(sig))
27+ if sigInfcheck && bool(C.blst_p2_affine_is_inf(sig)) {
28+ return false
29+ }
30+ return bool(C.blst_p2_affine_in_g2(sig))
2931}
3032
3133//
You can’t perform that action at this time.
0 commit comments