You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the version prior to the fix, my approach to forgery was to modify the output in the witness data to the negative of the previous output, thereby generating a false proof.
the origin eff_ecdsa.circom is
pragma circom 2.0.2;
include "./secp256k1/mul.circom";
include "../node_modules/circomlib/circuits/bitify.circom";
/**
* EfficientECDSA
* ====================
*
* Converts inputted efficient ECDSA signature to an public key. There is no
* public key validation included.
*/
template EfficientECDSA() {
var bits = 256;
signal input s;
signal input Tx; // T = r^-1 * R
signal input Ty;
signal input Ux; // U = -(m * r^-1 * G)
signal input Uy;
signal output pubKeyX;
signal output pubKeyY;
// sMultT = s * T
component sMultT = Secp256k1Mul();
sMultT.scalar <== s;
sMultT.xP <== Tx;
sMultT.yP <== Ty;
// pubKey = sMultT + U
component pubKey = Secp256k1AddComplete();
pubKey.xP <== sMultT.outX;
pubKey.yP <== sMultT.outY;
pubKey.xQ <== Ux;
pubKey.yQ <== Uy;
pubKeyX <== pubKey.outX;
pubKeyY <== pubKey.outY;
}
component main = EfficientECDSA();
However,the forged witness does not pass verification. But I do not know why? I forged the witness based on the vulnerability's logic, so why did it fail?
snarkjs wtns check eff_ecdsa.r1cs exploit_witness.wtns
[INFO] snarkJS: ----------------------------
[INFO] snarkJS: > Checking witness correctness
[WARN] snarkJS: ··· aborting checking process at constraint 2
[WARN] snarkJS: WITNESS IS NOT CORRECT
[WARN] snarkJS: WITNESS CHECKING FINISHED UNSUCCESSFULLY
The text was updated successfully, but these errors were encountered:
In the version prior to the fix, my approach to forgery was to modify the output in the witness data to the negative of the previous output, thereby generating a false proof.
the origin eff_ecdsa.circom is
my input.json is
my witness.json is
The forged witness data (exploit_witness.json) is
However,the forged witness does not pass verification. But I do not know why? I forged the witness based on the vulnerability's logic, so why did it fail?
The text was updated successfully, but these errors were encountered: