what is gcry_md_reset()'s relationship with HMAC?

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Nov 6 05:31:23 CET 2009


hey folks--

from reading the gcrypt source, it looks to me like gcry_md_reset() does
actually re-initializes the digest with the first part of the macpads
structure, but it doesn't wipe the pads out.

But the documentation for gcry_md_reset() doesn't mention setkey() at
all -- it implies that it's the same as a close() followed by an open(),
which would actually result in the wiping of the macpads themselves.
(i.e. another gcry_md_setkey() would need to be invoked).

Any explanation of this?  Can the documentation be updated to be clearer?

(i'm afraid i don't understand the md_write() of the inner padding for
HMAC-enabled MDs at all, but that's probably because i don't correctly
understand the HMAC context itself yet -- pointers welcome!)

Regards,

	--dkg

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 891 bytes
Desc: OpenPGP digital signature
URL: </pipermail/attachments/20091105/dcdb1eca/attachment.pgp>


More information about the Gcrypt-devel mailing list