Fix bug where ciphertexts could end up negative
This commit is contained in:
1 parent
474fe9f70a
commit
9d1d64f1d9
4 files changed
+119
-38
No files matched your search
@@ -76,12 +76,12 @@ class Strength {
|
||||
const data = ev.detail;
|
||||
|
||||
if (data.region === region && data.stage === "PROOF") {
|
||||
if (proofSessionVerifier.verify(BigInt(data.z))) {
|
||||
console.log("verified");
|
||||
let result = proofSessionVerifier.verify(BigInt(data.z));
|
||||
if (result > 0) {
|
||||
this.assumedStrength = plainText;
|
||||
controller.abort();
|
||||
} else {
|
||||
console.warn("Failed to verify ciphertext!");
|
||||
console.warn(`Failed to verify ciphertext! ${result}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user