What exactly stops someone from setting up a router, naming it the same SSID, and collecting the passwords that the devices are trying to authenticate with?
Client: I have the password and I'd like to authenticate
Server: OK, your challenge is 814443143674234562341567675
Client: OK, the response is 762451345361652354523412123
The challenge issued by the server is a large random number. The C = DigestFunction(A, B) function is one-way. It has the property that if you're trying to figure out A, knowing B and C doesn't really help.