Pass cipher object pointer to setkey functions
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)
commitca21a24808efa5d562ac91f683504ae0d6dfa69f
treeb0088b2bfbe08948d4275e9036e7fdce9adbb8e4
parentb6e6ace324440f564df664e27f8276ef01f76795
Pass cipher object pointer to setkey functions

* cipher/cipher.c (cipher_setkey): Pass cipher object pointer to
cipher's setkey function.
* cipher/arcfour.c: Add gcry_cipher_hd_t parameter for setkey
functions and update selftests to pass NULL pointer.
* cipher/blowfish.c: Ditto.
* cipher/camellia-glue.c: Ditto.
* cipher/cast5.c: Ditto.
* cipher/chacha20.c: Ditto.
* cipher/cipher-selftest.c: Ditto.
* cipher/des.c: Ditto.
* cipher/gost28147.c: Ditto.
* cipher/idea.c: Ditto.
* cipher/rfc2268.c: Ditto.
* cipher/rijndael.c: Ditto.
* cipher/salsa20.c: Ditto.
* cipher/seed.c: Ditto.
* cipher/serpent.c: Ditto.
* cipher/twofish.c: Ditto.
* src/cipher-proto.h: Ditto.
--

This allows setkey function to replace bulk cipher operations
with faster alternative.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
17 files changed:
cipher/arcfour.c
cipher/blowfish.c
cipher/camellia-glue.c
cipher/cast5.c
cipher/chacha20.c
cipher/cipher-selftest.c
cipher/cipher.c
cipher/des.c
cipher/gost28147.c
cipher/idea.c
cipher/rfc2268.c
cipher/rijndael.c
cipher/salsa20.c
cipher/seed.c
cipher/serpent.c
cipher/twofish.c
src/cipher-proto.h