Home GnuPG

Add separate handlers for CBC-CTS variant

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

Provenance
jukiviliAuthored on Jun 19 2018, 5:34 PM
Parents
rCf5168091c193: Avoid division by spec->blocksize in cipher mode handlers
Branches
Unknown
Tags
Unknown