Add separate handlers for CBC-CTS variant
authorJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 19 Jun 2018 15:34:33 +0000 (18:34 +0300)
committerJussi Kivilinna <jussi.kivilinna@iki.fi>
Tue, 19 Jun 2018 16:29:25 +0000 (19:29 +0300)
commit87d8caa47e00f1b1cea968fe38cf30c0ccc9749c
treeb6b5352e1dea7886886b213a5189f06ed188ca2a
parentf5168091c1930e948af8f25da11cad5dfa62c7ba
Add separate handlers for CBC-CTS variant

* cipher/cipher-cbc.c (cbc_encrypt_inner, cbc_decrypt_inner)
(_gcry_cipher_cbc_cts_encrypt, _gcry_cipher_cbc_cts_decrypt): New.
(_gcry_cipher_cbc_encrypt, _gcry_cipher_cbc_decrypt): Remove CTS
handling.
* cipher/cipher-internal.h (_gcry_cipher_cbc_cts_encrypt)
(_gcry_cipher_cbc_cts_decrypt): New.
* cipher/cipher.c (cipher_encrypt, cipher_decrypt): Call CBC-CTS
handler if CBC-CTS flag is set.
--

Separate CTS handling to separate function for small decrease in
CBC per call overhead.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
cipher/cipher-cbc.c
cipher/cipher-internal.h
cipher/cipher.c