zkpasswords
v1.0.3
Published
Zero Knowledge Password Authentication using Snarkjs, Plonk
Downloads
6
Maintainers
Readme
This is my readme: Zero-Knowledge Authentication
Using a ZK-Snark, this password verification handles authentication without storing your password.
Methods (Accounts will be handled in a generated directory called zkpasswordsaccounts):
- setPassword(newEmail, newPassword): Creates a directory to handle authentication for a new user.
- checkPassword(emailAttempt, passwordAttempt): Checks if a given username and password match a user.
- changePassword(email, password): Changes the credentials for an existing user.
More on ZK-Snarks: https://z.cash/learn/what-are-zk-snarks/
More on Plonk: https://eprint.iacr.org/2019/953.pdf
Example:
const ZKPasswords = require('zkpasswords');
const zk = new ZKPasswords();
const response = await zk.setPassword(newEmail, newPassword);