gcm-camellia128.c gcm-camellia128-meta.c \
gcm-camellia256.c gcm-camellia256-meta.c \
cmac.c cmac64.c cmac-aes128.c cmac-aes256.c cmac-des3.c \
- cmac-aes128-meta.c cmac-aes256-meta.c \
+ cmac-aes128-meta.c cmac-aes256-meta.c cmac-des3-meta.c \
gost28147.c gosthash94.c gosthash94-meta.c \
hmac.c hmac-gosthash94.c hmac-md5.c hmac-ripemd160.c \
hmac-sha1.c hmac-sha224.c hmac-sha256.c hmac-sha384.c \
--- /dev/null
+/* cmac-des3-meta.c
+
+ Copyright (C) 2020 Dmitry Baryshkov
+
+ This file is part of GNU Nettle.
+
+ GNU Nettle is free software: you can redistribute it and/or
+ modify it under the terms of either:
+
+ * the GNU Lesser General Public License as published by the Free
+ Software Foundation; either version 3 of the License, or (at your
+ option) any later version.
+
+ or
+
+ * the GNU General Public License as published by the Free
+ Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
+
+ or both in parallel, as here.
+
+ GNU Nettle is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received copies of the GNU General Public License and
+ the GNU Lesser General Public License along with this program. If
+ not, see http://www.gnu.org/licenses/.
+*/
+
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <assert.h>
+
+#include "nettle-meta.h"
+
+#include "cmac.h"
+
+const struct nettle_mac nettle_cmac_des3 =
+{
+ "cmac_des3",
+ sizeof(struct cmac_des3_ctx),
+ CMAC64_DIGEST_SIZE,
+ DES3_KEY_SIZE,
+
+ (nettle_set_key_func*) cmac_des3_set_key,
+ (nettle_hash_update_func*) cmac_des3_update,
+ (nettle_hash_digest_func*) cmac_des3_digest
+};
extern const struct nettle_mac nettle_cmac_aes128;
extern const struct nettle_mac nettle_cmac_aes256;
+extern const struct nettle_mac nettle_cmac_des3;
/* HMAC variants with key size = digest size */
extern const struct nettle_mac nettle_hmac_md5;
#include "nettle-internal.h"
#include "cmac.h"
-const struct nettle_mac nettle_cmac_des3 =
-{
- "CMAC-3DES",
- sizeof(struct cmac_des3_ctx),
- CMAC64_DIGEST_SIZE,
- DES3_KEY_SIZE,
-
- (nettle_set_key_func*) cmac_des3_set_key,
- (nettle_hash_update_func*) cmac_des3_update,
- (nettle_hash_digest_func*) cmac_des3_digest
-};
-
#define test_cmac_aes128(key, msg, ref) \
test_mac(&nettle_cmac_aes128, key, msg, ref)