|
Algorithm 2: Algorithm for Sign-In/Login Process
|
Input: Ethereum Address and Password Initialization:
Function login(user_password)
account = web3.currentProvider.selectedAddress
user_exist = check(account).call()
if(user_exist) then
result = loginAuth(user_password)
if (result == true) then
//user is authenticated
//redirecting to Rest API server calls for ZKP verification
evaluate c’ = character_count(user_password)
and send c’ to server for ZKP verification
if (c == c’) then
print(“User is verified successfully”)
else
print (“User is not verified”)
else
print (“Password do not match”)
else
print(“User not registered”)
Function submitfunction(userpassword):
if (userpassword) then
login(userpassword)
else
print (“Enter Password”) |