SHA-based encryption function in Python
Richard Parker
richard at electrophobia.com
Wed Apr 24 09:24:21 EDT 2002
Paul Rubin at phr-n2002a at nightsong.com wrote on 4/24/02 5:37 AM:
> How about if I just hash a second time, i.e. H(H(K || x)) or
> H(K || H(K || X)), rather than coding up the full HMAC machinery?
H(K1 || H(K2 || X)) is secure. The key-length equivalent security of this
construction is given by the length of one key, not both. This construction
is essentially HMAC, except that the HMAC construction simplifies the keying
and makes the key-length equivalent security more obvious by adding a simple
key-separation technique to derive both keys from a single key.
-Richard
More information about the Python-list
mailing list