2024-06-16 Niels Möller <nisse@lysator.liu.se>
+ * hmac-gosthash94-meta.c: New file.
+ * nettle-meta.h (nettle_hmac_gosthash94)
+ (nettle_hmac_gosthash94cp): Declare.
+ * nettle-meta-macs.c (_nettle_macs): Add nettle_hmac_gosthash94
+ and nettle_hmac_gosthash94cp.
+ * Makefile.in (nettle_SOURCES): Add hmac-gosthash94-meta.c.
+ * testsuite/meta-mac-test.c: Update test.
+
* Released Nettle-3.10.
* examples/rsa-encrypt-test: Consistently add $EXEEXT to
hmac-sha512.c hmac-streebog.c hmac-sm3.c \
hmac-md5-meta.c hmac-ripemd160-meta.c hmac-sha1-meta.c \
hmac-sha224-meta.c hmac-sha256-meta.c hmac-sha384-meta.c \
- hmac-sha512-meta.c hmac-streebog-meta.c hmac-sm3-meta.c \
+ hmac-sha512-meta.c hmac-gosthash94-meta.c \
+ hmac-streebog-meta.c hmac-sm3-meta.c \
knuth-lfib.c hkdf.c \
md2.c md2-meta.c md4.c md4-meta.c \
md5.c md5-compat.c md5-meta.c \
--- /dev/null
+/* hmac-gosthash94-meta.c
+
+ Copyright (C) 2024 Niels Möller
+
+ 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 "nettle-meta.h"
+
+#include "hmac.h"
+
+static void
+hmac_gosthash94_set_key_wrapper (void *ctx, const uint8_t *key)
+{
+ hmac_gosthash94_set_key (ctx, GOSTHASH94_DIGEST_SIZE, key);
+}
+
+const struct nettle_mac nettle_hmac_gosthash94
+= _NETTLE_HMAC(hmac_gosthash94, GOSTHASH94);
+
+static void
+hmac_gosthash94cp_set_key_wrapper (void *ctx, const uint8_t *key)
+{
+ hmac_gosthash94cp_set_key (ctx, GOSTHASH94CP_DIGEST_SIZE, key);
+}
+
+const struct nettle_mac nettle_hmac_gosthash94cp
+= _NETTLE_HMAC(hmac_gosthash94cp, GOSTHASH94CP);
extern const struct nettle_mac nettle_cmac_des3;
/* HMAC variants with key size = digest size */
+extern const struct nettle_mac nettle_hmac_gosthash94;
+extern const struct nettle_mac nettle_hmac_gosthash94cp;
extern const struct nettle_mac nettle_hmac_md5;
extern const struct nettle_mac nettle_hmac_ripemd160;
extern const struct nettle_mac nettle_hmac_sha1;