intel / intel-ipsec-mb

Intel(R) Multi-Buffer Crypto for IPSec
BSD 3-Clause "New" or "Revised" License
289 stars 87 forks source link

Plain SHA384 and SHA512 return incorrect hash value for certain sizes #25

Closed tkanteck closed 5 years ago

tkanteck commented 5 years ago

Plain SHA384 and SHA512 return incorrect results for input sizes between 112 bytes and 120 bytes in the last SHA block (SHA384/512 block size is 128 bytes). This is because of too small padding applied in the last block. It is 8 bytes and should be 16.