diff --git a/src/lib/nullifier.ts b/src/lib/nullifier.ts index 033187685d..c8e84984ef 100644 --- a/src/lib/nullifier.ts +++ b/src/lib/nullifier.ts @@ -5,7 +5,6 @@ import { Poseidon } from './hash.js'; import { MerkleMapWitness } from './merkle-map.js'; import { PrivateKey, PublicKey, scaleShifted } from './signature.js'; import { Provable } from './provable.js'; -import { Bool } from './bool.js'; export { Nullifier }; @@ -71,10 +70,7 @@ class Nullifier extends Struct({ // shifted scalar see https://github.com/o1-labs/o1js/blob/5333817a62890c43ac1b9cb345748984df271b62/src/lib/signature.ts#L220 // pk^c - let pk_c = scaleShifted( - this.publicKey, - Scalar.fromBits(c.toBits().concat(new Bool(false))) - ); + let pk_c = scaleShifted(this.publicKey, Scalar.fromBits(c.toBits())); // g^r = g^s / pk^c let g_r = G.scale(s).sub(pk_c); @@ -84,10 +80,7 @@ class Nullifier extends Struct({ // h_m_pk_r = h(m,pk)^s / nullifier^c let h_m_pk_s_div_nullifier_s = h_m_pk_s.sub( - scaleShifted( - nullifier, - Scalar.fromBits(c.toBits().concat(new Bool(false))) - ) + scaleShifted(nullifier, Scalar.fromBits(c.toBits())) ); // this is supposed to match the entries generated on "the other side" of the nullifier (mina-signer, in an wallet enclave)