> My question was really about the purpose of this HMAC thing. If you _can_ > just prepend (or append) the password to the input data, what's HMAC for?
Generally, HMAC is used as follows: C - client (has the hashed password as input by the luser) S - server (has the hashed password stored in a database) T - token (random series of bits; not really sure how random it has to be) C - > S request T S -> C sends T (and stores it for a set period of time) C -> S hmac(password, T) the actual hash is interchangeable (sha1, md5, etc) as long as C and S use the same hash S also does hmac(password, T) and compares the result to what C sent; it also should discard the T at this point S -> C Grant/Deny based on result of comparison This allows plaintext authentication where we don't care if any of the authentication messages are sniffed. The password hash itself is never sent, just the combination of it with the token that expires as soon as its used. There's at least two problems with this authentication mechanism: 1) further communications between C and S aren't secure 2) getting the password hash to S is an exercise left up for implementation (especially given 1) Matt _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
