Skip to content
New issue

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

Pin libsodium 0.7.8, run eslint #8

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"env": {
"amd": true,
"node": true,
"es2021": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "commonjs"
},
"rules": {
"no-unused-vars": [
"error", {
"argsIgnorePattern": "_",
"varsIgnorePattern": "_"
}
]
}
}
1 change: 0 additions & 1 deletion lib/opaque.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ module.exports = (io, sodium, oprf) => {
throw new Error('client_authenticated_2 false');
}

const Pu = util.sodiumAeadDecrypt(rw, c.Pu);
const Ps = util.sodiumAeadDecrypt(rw, c.Ps);
const Xs = await get('Xs');
const K = util.KE(pu, xu, Ps, Xs, Xu);
Expand Down
2 changes: 1 addition & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = (sodium, oprf) => {
return new Uint8Array(32).fill(n);
};

const KE = (p, x, P, X, X1) => {
const KE = (p, x, P, X) => {
const kx = oprf.scalarMult(X, x);
const kp = oprf.scalarMult(P, p);
const k = genericHash(sodium.crypto_core_ristretto255_add(kx, kp));
Expand Down
Loading