Home GnuPG

Optimize OCB set_key and set_nonce

Description

Optimize OCB set_key and set_nonce

* cipher/cipher-ocb.c (double_block): Change to input/output
host-endian block instead of big-endian buffer.
(double_block_cpy): Remove.
(bit_copy): Use fixed length copy and 'u64' for calculations.
(ocb_get_L_big): Handle block endian conversions for double_block.
(_gcry_cipher_ocb_setkey): Handle block endian conversions for
double_block.
(_gcry_cipher_ocb_set_nonce): Set full length of 'ktop' to zero; Drop
length parameter for bit_copy.
  • Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>

Details

Provenance
jukiviliAuthored on Mar 28 2019, 10:25 PM
Parents
rCeacbd59b1333: AES-NI/OCB: Optimize last and first key XORing
Branches
Unknown
Tags
Unknown