diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/methods/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/methods/composed_gmac/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/methods/composed_gmac/composed_gmac.c (renamed from src/methods/generic_gmac/generic_gmac.c) | 12 | ||||
-rw-r--r-- | src/methods/generic_gmac/CMakeLists.txt | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/src/methods/CMakeLists.txt b/src/methods/CMakeLists.txt index 7ec701e..58b29cf 100644 --- a/src/methods/CMakeLists.txt +++ b/src/methods/CMakeLists.txt @@ -24,8 +24,8 @@ endmacro(fastd_method_require) add_subdirectory(null) add_subdirectory(cipher_test) +add_subdirectory(composed_gmac) add_subdirectory(generic_gcm) -add_subdirectory(generic_gmac) add_subdirectory(generic_poly1305) add_subdirectory(xsalsa20_poly1305) diff --git a/src/methods/composed_gmac/CMakeLists.txt b/src/methods/composed_gmac/CMakeLists.txt new file mode 100644 index 0000000..38b94c4 --- /dev/null +++ b/src/methods/composed_gmac/CMakeLists.txt @@ -0,0 +1,4 @@ +fastd_method(composed-gmac + composed_gmac.c +) +fastd_method_link_libraries(composed-gmac method_common) diff --git a/src/methods/generic_gmac/generic_gmac.c b/src/methods/composed_gmac/composed_gmac.c index d6f7f9b..b63089f 100644 --- a/src/methods/generic_gmac/generic_gmac.c +++ b/src/methods/composed_gmac/composed_gmac.c @@ -94,7 +94,7 @@ static size_t method_key_length(fastd_context_t *ctx, const char *name) { const fastd_cipher_context_t *gmac_cctx; if (!cipher_get(ctx, name, &cipher, &cctx, &gmac_cipher, &gmac_cctx)) - exit_bug(ctx, "generic-gmac: can't get cipher key length"); + exit_bug(ctx, "composed-gmac: can't get cipher key length"); return cipher->key_length + gmac_cipher->key_length; } @@ -105,15 +105,15 @@ static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx, c fastd_method_common_init(ctx, &session->common, initiator); if (!cipher_get(ctx, name, &session->cipher, &session->cipher_ctx, &session->gmac_cipher, &session->gmac_cipher_ctx)) - exit_bug(ctx, "generic-gmac: can't instanciate cipher"); + exit_bug(ctx, "composed-gmac: can't instanciate cipher"); session->cipher_state = session->cipher->init_state(ctx, session->cipher_ctx, secret); if (session->cipher->iv_length && session->cipher->iv_length <= COMMON_NONCEBYTES) - exit_bug(ctx, "generic-gmac: iv_length to small"); + exit_bug(ctx, "composed-gmac: iv_length to small"); session->gmac_cipher_state = session->gmac_cipher->init_state(ctx, session->gmac_cipher_ctx, secret + session->cipher->key_length); if (session->gmac_cipher->iv_length <= COMMON_NONCEBYTES) - exit_bug(ctx, "generic-gmac: GMAC cipher iv_length to small"); + exit_bug(ctx, "composed-gmac: GMAC cipher iv_length to small"); fastd_block128_t H; @@ -124,7 +124,7 @@ static fastd_method_session_state_t* method_session_init(fastd_context_t *ctx, c session->ghash = fastd_mac_get_by_name(ctx, "ghash", &session->ghash_ctx); if (!session->ghash) - exit_bug(ctx, "generic-gmac: can't instanciate ghash mac"); + exit_bug(ctx, "composed-gmac: can't instanciate ghash mac"); session->ghash_state = session->ghash->init_state(ctx, session->ghash_ctx, H.b); @@ -295,7 +295,7 @@ static bool method_decrypt(fastd_context_t *ctx, fastd_peer_t *peer, fastd_metho return true; } -const fastd_method_t fastd_method_generic_gmac = { +const fastd_method_t fastd_method_composed_gmac = { .provides = method_provides, .max_overhead = COMMON_HEADBYTES + sizeof(fastd_block128_t), diff --git a/src/methods/generic_gmac/CMakeLists.txt b/src/methods/generic_gmac/CMakeLists.txt deleted file mode 100644 index af3fb35..0000000 --- a/src/methods/generic_gmac/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -fastd_method(generic-gmac - generic_gmac.c -) -fastd_method_link_libraries(generic-gmac method_common) |