zkey verify well when L section is empty

This commit is contained in:
Jordi Baylina 2020-08-12 23:51:58 +02:00
parent 1bc2f585f8
commit 7a220d7833
No known key found for this signature in database
GPG Key ID: 7480C80C1BE43112
5 changed files with 10 additions and 2 deletions

@ -4989,6 +4989,8 @@ async function phase2verify(r1csFileName, pTauFileName, zkeyFileName, logger) {
await endReadSection$1(fd1); await endReadSection$1(fd1);
await endReadSection$1(fd2); await endReadSection$1(fd2);
if (nPoints == 0) return true;
sr = await sameRatio$2(curve, R1, R2, g2sp, g2spx); sr = await sameRatio$2(curve, R1, R2, g2sp, g2spx);
if (sr !== true) return false; if (sr !== true) return false;

@ -5231,6 +5231,8 @@ async function phase2verify(r1csFileName, pTauFileName, zkeyFileName, logger) {
await endReadSection(fd1); await endReadSection(fd1);
await endReadSection(fd2); await endReadSection(fd2);
if (nPoints == 0) return true;
sr = await sameRatio$2(curve, R1, R2, g2sp, g2spx); sr = await sameRatio$2(curve, R1, R2, g2sp, g2spx);
if (sr !== true) return false; if (sr !== true) return false;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -246,6 +246,8 @@ export default async function phase2verify(r1csFileName, pTauFileName, zkeyFileN
await binFileUtils.endReadSection(fd1); await binFileUtils.endReadSection(fd1);
await binFileUtils.endReadSection(fd2); await binFileUtils.endReadSection(fd2);
if (nPoints == 0) return true;
sr = await sameRatio(curve, R1, R2, g2sp, g2spx); sr = await sameRatio(curve, R1, R2, g2sp, g2spx);
if (sr !== true) return false; if (sr !== true) return false;