← Prev in month ← Prev in thread
Next in thread → Next in month →

Issue 137 - Digest Order Rationale

From
Hal Lockhart <>
Date
2003-11-18T04:27:27+00:00
ID
Thread
Issue 137 - Digest Order Rationale
In the Username Token Profile around line 143 insert:

-------
Note that the secret is put at the end of the input and not the front. 
This is because the output of SHA-1 is the function's complete state
at the end of processing an input stream.  If the input stream  happened
to fit neatly into the block size of the hash function, an attacker could
extend the input with additional blocks and generate new/unique hash values
knowing only the hash output for the original stream.   

If the secret is at the end of the stream, then attackers are prevented
from arbitrarily extending it -- since they have to end the
input stream with the password which they don't know.

Similarly, if the nonce/created was put at the end, then an attacker
could update the nonce to be nonce+created, and add a new created time
on the end to generate a new hash.
--------

Hal
← Prev in month ← Prev in thread
Next in thread → Next in month →