I was thinking about an authentication where
- the user only has to know a password
- but no salt, everything else the client retrieves from the server
- yet a user's password can't be retrieved from the data on the server
- nor from the communication, meaning not even the server ever gets the password
I thought something like this could be close to the solution:
Set up:
- the client calculates e=hash(password), p, q primes and n=p*q
- uses this hash to calculate an RSA decryption key d=(e^(-1) mod phi(n))
- passes on d and n to the server a way avoiding any man in the middle
Authentication:
- the server sends a c=random() challenge and the stored n to the client
- the client encrypts it and sends r=(c^(hash(password)) mod n) as response
- the server decrypts a=(r^d mod n) answer and if a==c then the user has been authenticated
Is there a proven authentication scheme similar to this one? If not, would the above be safe with a proper RSA implementation, like OAEP, even though the encryption exponent is not the traditional 65537 but it is actually an intermediate key of the protocol?