diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-05 16:29:57 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-11-05 16:29:57 +0100 |
commit | cb42b5b1fa81969e6d4056e0220374e8ded09651 (patch) | |
tree | 72b85d9cc8a551149467f770ec1752f540e3d3eb /src/crypto/mac/ghash/builtin/ghash_builtin.c | |
parent | 4f9b5d66bc6b198dcf6e119fa05e891fce4e355f (diff) | |
download | fastd-cb42b5b1fa81969e6d4056e0220374e8ded09651.tar fastd-cb42b5b1fa81969e6d4056e0220374e8ded09651.zip |
Generalize cipher/MAC key/IV lengths
Diffstat (limited to 'src/crypto/mac/ghash/builtin/ghash_builtin.c')
-rw-r--r-- | src/crypto/mac/ghash/builtin/ghash_builtin.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/crypto/mac/ghash/builtin/ghash_builtin.c b/src/crypto/mac/ghash/builtin/ghash_builtin.c index 2eb7fed..34e118a 100644 --- a/src/crypto/mac/ghash/builtin/ghash_builtin.c +++ b/src/crypto/mac/ghash/builtin/ghash_builtin.c @@ -65,6 +65,10 @@ static fastd_mac_context_t* ghash_initialize(fastd_context_t *ctx UNUSED) { return NULL; } +static size_t ghash_key_length(fastd_context_t *ctx UNUSED, const fastd_mac_context_t *cctx UNUSED) { + return sizeof(fastd_block128_t); +} + static fastd_mac_state_t* ghash_init_state(fastd_context_t *ctx UNUSED, const fastd_mac_context_t *mctx UNUSED, const uint8_t *key) { fastd_mac_state_t *state = malloc(sizeof(fastd_mac_state_t)); @@ -132,7 +136,10 @@ const fastd_mac_t fastd_mac_ghash_builtin = { .name = "builtin", .initialize = ghash_initialize, + + .key_length = ghash_key_length, .init_state = ghash_init_state, + .hash = ghash_hash, .free_state = ghash_free_state, |