diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2018-06-19 18:34:33 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2018-06-19 19:29:25 +0300 |
commit | ca21a24808efa5d562ac91f683504ae0d6dfa69f (patch) | |
tree | b0088b2bfbe08948d4275e9036e7fdce9adbb8e4 /cipher/idea.c | |
parent | b6e6ace324440f564df664e27f8276ef01f76795 (diff) | |
download | libgcrypt-ca21a24808efa5d562ac91f683504ae0d6dfa69f.tar.gz |
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>
Diffstat (limited to 'cipher/idea.c')
-rw-r--r-- | cipher/idea.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cipher/idea.c b/cipher/idea.c index ffe821d3..abfe6755 100644 --- a/cipher/idea.c +++ b/cipher/idea.c @@ -258,10 +258,12 @@ do_setkey( IDEA_context *c, const byte *key, unsigned int keylen ) } static gcry_err_code_t -idea_setkey (void *context, const byte *key, unsigned int keylen) +idea_setkey (void *context, const byte *key, unsigned int keylen, + gcry_cipher_hd_t hd) { IDEA_context *ctx = context; int rc = do_setkey (ctx, key, keylen); + (void)hd; _gcry_burn_stack (23+6*sizeof(void*)); return rc; } |