Add separate handlers for CBC-CTS variant

Authored by jukivili on Jun 19 2018, 5:34 PM.

Description

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>

Details

Committed
jukiviliJun 19 2018, 6:29 PM
Parents
rCf5168091c193: Avoid division by spec->blocksize in cipher mode handlers
Branches
Unknown
Tags
Unknown