Skip to content

Commit

Permalink
Merge branch 'master' into trie-store-channels
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams committed Dec 11, 2024
2 parents e13ab68 + 3afdc81 commit dfa7370
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ private PairingCheckPrecompile() { }
var acc = GT.One(buf.AsSpan());
GT p = new(buf.AsSpan()[GT.Sz..]);

bool hasInf = false;
for (int i = 0; i < inputData.Length / PairSize; i++)
{
int offset = i * PairSize;
Expand All @@ -61,14 +62,15 @@ private PairingCheckPrecompile() { }
// x == inf || y == inf -> e(x, y) = 1
if (x.IsInf() || y.IsInf())
{
hasInf = true;
continue;
}

p.MillerLoop(y, x);
acc.Mul(p);
}

bool verified = acc.FinalExp().IsOne();
bool verified = hasInf || acc.FinalExp().IsOne();
byte[] res = new byte[32];
if (verified)
{
Expand Down

0 comments on commit dfa7370

Please sign in to comment.