I'm looking at developing a One-time Password authentication system (j2me for phone, php for server side)
I'm trying to get my head around the process, here is what i understand
- user > inputs random secret (S) into hash n number of times
- user > submits S^n to server
- server > saves n and S^n
- user > generates (S^n)-1 and submits to server
- server > takes user input and applies hashing function 1 more time and checks it against previously stored hash
Now, from reading RFC2289 (S/Key) There is a seed that is issued to the client and concatenated with the user's secret when they input a unique identifier (at step 4) How is this seed created, is it 开发者_如何学Pythonrandom, is it stored.
The seed is agreed upon by the server and the client during initialization of the password sequence. It is therefore done only once before OTPs are used for authentication. The seed should be random but the client should be able to choose it. In other words the server may suggest a random seed but the client should have an option to come up with his own (random) seed. The seed should then be stored by the server. The server actually doesn't use it during authentication. It stores it just so that it can present it to the user during authentication, together with the sequence number. Both seed and sequence number are not secret.
精彩评论