[issue6473] hmac sha384/sha512 fails test vectors
Iain Wade
report at bugs.python.org
Mon Jul 13 05:56:51 CEST 2009
New submission from Iain Wade <iwade at optusnet.com.au>:
Test vectors are in the following draft rfc:
http://tools.ietf.org/html/draft-nystrom-smime-hmac-sha
The problem is that hmac.py has a hard-coded block size of 64, while
SHA-384 and SHA-512 have a 128-byte block size.
Suggested fix is either:
a/ have the various hashlib libraries export block size (like they
currently do for digest_size).
b/ parameterize blocksize to the constructor so that users can override.
c/ I have no third suggestion.
I have made available a codified version of the test vectors for your
convenience.
----------
components: Library (Lib)
files: test_vectors.py
messages: 90467
nosy: iwade
severity: normal
status: open
title: hmac sha384/sha512 fails test vectors
type: behavior
versions: Python 2.5
Added file: http://bugs.python.org/file14492/test_vectors.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6473>
_______________________________________
More information about the Python-bugs-list
mailing list