I would like to create a dapp where by users can call a function on a smart contract, proving that they know a secret phrase.
I am thinking that I would use web3.js to create an public / private key pair, using a predetermined phrase (e.g. "iamasecret").
The contract would already have the public key encoded. The user would sign a transaction using the private key generated from the secret, and invoke a smart contract function, which would then verify the signature.
Is this possible using web3.js?
Does anyone know how to do it?