I would love to have a system where the password is never send in plaintext (even with TLS) to authenticate a user. I've come up with this protocol, but I'd rather use something proven.
Registration:
- Client (javascript in a browser) generates a 2048 bit RSA keypair (using Forge js)
- Client generates hash from the users password using pbkdf2 with 68000 rounds
- Client encrypts the private key with the above hash as the passphrase using AES 128 in OpenSSH format
- Client sends the encrypted private key, public key, pbkdf2 salt and the username to the server
Login:
- Client requests the encrypted private key and the pbkdf2 salt using the login name
- Client generates hash from the users password using pbkdf2 with 68000 rounds and salt from the server
- Client decrypts the private key using the pbkdf2 hash
- Client requests a challenge from the server
- Server sends an challenge that is encrypted using the user's public key using OAEP-SHA1 (Using cryptography.io)
- Client decrypts the challenge and sends the plaintext challenge to the server
- Server sends an limited use token to the client to use the api with
TLDR: Is there a login protocol where the client can prove authenticity to a server without sending a password. The user can then use a token for API calls that expire after a set time/a few calls. This system cannot use oauth.