Skip to content

Commit 2cdd1ef

Browse files
committed
further clarification on HMAC
1 parent d843541 commit 2cdd1ef

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

crypto.rst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -618,25 +618,15 @@ book. However, this approach has been proved to be secure as long as
618618
the underlying hash function H has the appropriate
619619
collision-resistance properties outlined above. Note that the HMAC
620620
takes a hash function *H* that is not keyed, and turns it into a keyed
621-
hash by applying the hashing function *H* twice. First the key (XORed
621+
hash by adding the key material to the text input to the hash. The
622+
hash function *H* is applied twice. First the key (XORed
622623
with a string, *ipad*) is prepended to the message, which is
623624
then fed into the hash function. The output of this keyed hash is then
624625
itself subjected to another keyed hash (again by XORing the key with
625626
a string, *opad*, and prepending that to the output of the first keyed hash).
626627
The two passes of the keyed-hash function are important to the proof
627628
of security for this HMAC construction.
628629

629-
.. let's delete this incorrect pic for now; unclear if a new picture
630-
adds much
631-
.. _fig-macAndHmac:
632-
.. figure:: figures/f08-05-modified.png
633-
:width: 300px
634-
:align: center
635-
636-
Computing a hashed message authentication code (HMAC).
637-
638-
639-
640630
Up to this point, we have been assuming that the message wasn’t
641631
confidential, so the original message could be transmitted as plaintext.
642632
To add confidentiality to a message with an authentication code, it suffices

preface.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,4 @@ stages in its development, particularly the following people:
108108
- John Kristoff
109109
- Motonori Shindo
110110
- Nick Feamster
111+
- Jeroen (jeroenh)

0 commit comments

Comments
 (0)