1

How to check following things using Solidity:

  • Password matching (hash formed)
  • if password matches then transfer take place
0

No data on the Ethereum blockchain should be considered private, so storing something like passwords is a bad idea, even in hashed form.

However, when a user sends a transaction to a smart contract, you can be ensured that it's actually coming from that user, since they need to have the private key in order to send a transaction.

In that way, Ethereum itself acts as an authentication layer, removing the need to store passwords for authentication.

You can combine this with some form of authorisation by storing a list or a mapping of Ethereum accounts that are authorised to send transactions or execute other operations on the smart contract.

  • Thank you... Totally agree with your answer that there is no need for password for Authentication. But I wanted to write a contract for Buyer - Seller, in which I want to use password, so whenever the product is delivered to Buyer he/she will send password to seller and then seller can release or withdraw predefined amount of payment. – Rudrika Jan 3 at 10:50
  • What I have to do to fulfill above procedure? – Rudrika Jan 3 at 12:07
  • What is the use case of the password in this scenario? The buyer can send a confirmation transaction to indicate that they received it, or something similar. However, the difficult thing in a dapp such as that will be conflict resolution, e.g. what happens when the seller says they sent the item, and the buyer says they never received it. I don't have a clear answer to creating a production-worthy marketplace dapp, but I don't see the use case of the password here. – Rosco Kalis Jan 3 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.