diff options
author | Devulapally Shiva Krishna <shiva@chelsio.com> | 2020-05-05 05:12:54 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-07 02:44:11 +0200 |
commit | 6b363a286cd01961423f5dcd648b265088ec56d0 (patch) | |
tree | ac1fa8fe0b649a35e852ff38adad47d6cc33464a /Documentation/filesystems/btrfs.rst | |
parent | Crypto/chcr: fix gcm-aes and rfc4106-gcm failed tests (diff) | |
download | linux-6b363a286cd01961423f5dcd648b265088ec56d0.tar.xz linux-6b363a286cd01961423f5dcd648b265088ec56d0.zip |
Crypto/chcr: fix ctr, cbc, xts and rfc3686-ctr failed tests
This solves the following issues observed during self test when
CONFIG_CRYPTO_MANAGER_EXTRA_TESTS is enabled.
1. Added fallback for cbc, ctr and rfc3686 if req->nbytes is zero
and for xts added a fallback case if req->nbytes is not multiple of 16.
2. In case of cbc-aes, solved wrong iv update. When
chcr_cipher_fallback() is called, used req->info pointer instead of
reqctx->iv.
3. In cbc-aes decryption there was a wrong result. This occurs when
chcr_cipher_fallback() is called from chcr_handle_cipher_resp().
In the fallback function iv(req->info) used is wrongly updated.
So use the initial iv for this case.
4)In case of ctr-aes encryption observed wrong result. In adjust_ctr_overflow()
there is condition which checks if ((bytes / AES_BLOCK_SIZE) > c),
where c is the number of blocks which can be processed without iv overflow,
but for the above bytes (req->nbytes < 32 , not a multiple of 16) this
condition fails and the 2nd block is corrupted as it requires the rollover iv.
So added a '=' condition in this to take care of this.
5)In rfc3686-ctr there was wrong result observed. This occurs when
chcr_cipher_fallback() is called from chcr_handle_cipher_resp().
Here also copying initial_iv in init_iv pointer for handling the fallback
case correctly.
Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: Devulapally Shiva Krishna <shiva@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/filesystems/btrfs.rst')
0 files changed, 0 insertions, 0 deletions