diff options
author | Tero Kristo <t-kristo@ti.com> | 2017-05-24 10:35:33 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-06-10 12:04:20 +0800 |
commit | 898d86a565925f09de3d0b30cf3b47ec2e409680 (patch) | |
tree | 5f268b2016a9383af2b61a8312e6b68653f78971 /drivers/crypto/virtio | |
parent | 5d78d57ede8f9e7f656c610ed25be7be337e0529 (diff) |
crypto: omap-sham - fix closing of hash with separate finalize call
Currently there is an interesting corner case failure with omap-sham
driver, if the finalize call is done separately with no data, but
all previous data has already been processed. In this case, it is not
possible to close the hash with the hardware without providing any data,
so we get incorrect results. Fix this by adjusting the size of data
sent to the hardware crypto engine in case the non-final data size falls
on the block size boundary, by reducing the amount of data sent by one
full block. This makes it sure that we always have some data available
for the finalize call and we can close the hash properly.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reported-by: Aparna Balasubramanian <aparnab@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/virtio')
0 files changed, 0 insertions, 0 deletions