Hey everyone, i've been thinking of implementing the following custom authentication scheme:
- User generates a public and private key pair
- when creating a new user, the user name is as usual but the password is the public key (in clear hex)
- For login:
- the user asks the server to generate a challenge string
- the user signs the challenge string and passes it to the server
- the user is considered logged in if the returned signed challenge can be verified by the server.
How i propose to do that: The user sends a GET request for the server which returns a randomly generated challenge and saves it in relation to the requesting user. The user then sends a login request, with the difference that the password param is the signed challenge.
Problems with what i propose: How do i verify that who ever requests to generate the challenge is the actual user ?
Will be happy for suggestions on how to go about doing this.
Alon.