diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-29 23:18:21 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-30 00:42:35 +0100 |
commit | 1111dc8e5e9e78254c1a7a891d961713e1be9db0 (patch) | |
tree | 3490dad7d1c43d32a9c5d362d6f03bb17cb5408a /src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c | |
parent | a09d04a02231964fa5a8f0113e9909cfb140fe4e (diff) | |
download | fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.tar fastd-1111dc8e5e9e78254c1a7a891d961713e1be9db0.zip |
Remove cipher and MAC contexts
Not a single implementation was using them...
Diffstat (limited to 'src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c')
-rw-r--r-- | src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c b/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c index 70c4d35..3e82e38 100644 --- a/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c +++ b/src/crypto/cipher/blowfish_ctr/builtin/blowfish_ctr.c @@ -182,11 +182,6 @@ struct fastd_cipher_state { }; -static fastd_cipher_context_t* blowfish_ctr_initialize(fastd_context_t *ctx UNUSED) { - return NULL; -} - - static inline void bf_ntohl(uint32_t *v, size_t len) { size_t i; for (i = 0; i < len; i++) @@ -214,7 +209,7 @@ static inline uint32_t bf_f(const fastd_cipher_state_t *state, uint32_t x) { BF_SWAP(L, R); \ }) -static fastd_cipher_state_t* blowfish_ctr_init_state(fastd_context_t *ctx UNUSED, const fastd_cipher_context_t *cctx UNUSED, const uint8_t *key) { +static fastd_cipher_state_t* blowfish_ctr_init(fastd_context_t *ctx UNUSED, const uint8_t *key) { uint32_t key32[14]; memcpy(key32, key, 56); bf_ntohl(key32, 14); @@ -276,24 +271,17 @@ static bool blowfish_ctr_crypt(fastd_context_t *ctx UNUSED, const fastd_cipher_s return true; } -static void blowfish_ctr_free_state(fastd_context_t *ctx UNUSED, fastd_cipher_state_t *state) { +static void blowfish_ctr_free(fastd_context_t *ctx UNUSED, fastd_cipher_state_t *state) { if (state) { secure_memzero(state, sizeof(*state)); free(state); } } -static void blowfish_ctr_free(fastd_context_t *ctx UNUSED, fastd_cipher_context_t *cctx UNUSED) { -} - const fastd_cipher_t fastd_cipher_blowfish_ctr_builtin = { .available = fastd_true, - .initialize = blowfish_ctr_initialize, - .init_state = blowfish_ctr_init_state, - + .init = blowfish_ctr_init, .crypt = blowfish_ctr_crypt, - - .free_state = blowfish_ctr_free_state, .free = blowfish_ctr_free, }; |