Regression on SHA-384 and SHA-512
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
New
|
Undecided
|
Unassigned |
Bug Description
The following code behaves differently now than in PyCrypto 2.6.
===
from Crypto.Hash import SHA384, HMAC
payload = "test"
key = '\x00'*48
print HMAC.new(key, payload, SHA384).hexdigest()
print HMAC.new(key, payload, SHA384.
===
With PyCrypto 2.6 it displays:
a154ade5eb70996
a154ade5eb70996
But now (master on github) it displays:
a154ade5eb70996
4704b48c24b27a9
summary: |
- Regression on SHA-2 hashes + Regression on SHA-384 and SHA-512 |
I believe I narrowed down the regression to this specific changeset:
https:/ /github. com/dlitz/ pycrypto/ commit/ fd398a28e3a227a 539b264a9f1e112 87b904c7da
the previous version worked fine.
Still, I cannot see anything harmful in that change.