We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would keep getting this error when trying to use the sign function: TypeError: "list" argument must be an Array of Buffers
sign
TypeError: "list" argument must be an Array of Buffers
Quick fix for the error by modifying lines 57 & 58 of eddsa.js
eddsa.js
function now looks like:
function sign(prv, msg) { const h1 = createBlakeHash("blake512").update(prv).digest(); const sBuff = pruneBuffer(h1.slice(0,32)); const s = utils.leBuff2int(sBuff); const A = babyJub.mulPointEscalar(babyJub.Base8, Scalar.shr(s, 3)); const rBuff = createBlakeHash("blake512").update(Buffer.concat([h1.slice(32,64), msg])).digest(); let r = utils.leBuff2int(rBuff); const Fr = new F1Field(babyJub.subOrder); r = Fr.e(r); const R8 = babyJub.mulPointEscalar(babyJub.Base8, r); const R8p = Buffer.from(babyJub.packPoint(R8)); //CHANGED from: const R8p = babyJub.packPoint(R8); const Ap = Buffer.from(babyJub.packPoint(A)); //CHANGED from: const Ap = babyJub.packPoint(A); const hmBuff = pedersenHash(Buffer.concat([R8p, Ap, msg])); const hm = utils.leBuff2int(hmBuff); const S = Fr.add(r , Fr.mul(hm, s)); return { R8: R8, S: S }; }
Not sure if this is a suitable fix to merge but it has worked for my needs so far.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Would keep getting this error when trying to use the
sign
function:TypeError: "list" argument must be an Array of Buffers
Quick fix for the error by modifying lines 57 & 58 of
eddsa.js
function now looks like:
Not sure if this is a suitable fix to merge but it has worked for my needs so far.
The text was updated successfully, but these errors were encountered: