summaryrefslogtreecommitdiff
path: root/cipher/mac-poly1305.c
diff options
context:
space:
mode:
authorDmitry Baryshkov <dbaryshkov@gmail.com>2020-03-21 22:33:50 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2020-04-19 21:57:48 +0300
commitd7fa70ed9ddc6e0189a8b59016b1f17717a26865 (patch)
tree82fd521483eddfd3e5ac102e372d03a3c9694e48 /cipher/mac-poly1305.c
parent469e2fefb64e3a4bd80995935f82caf416e3a4ae (diff)
downloadlibgcrypt-d7fa70ed9ddc6e0189a8b59016b1f17717a26865.tar.gz
mac: add support for gcry_mac_ctl(GCRYCTL_SET_SBOX)
* cipher/mac-internal.h (gcry_mac_spec_ops_t): add set_extra_info field for providing additional settings. * cipher/mac.c (_gcry_mac_ctl): support GCRYCTL_SET_SBOX call. * cipher/mac-cmac.c (cmac_ops): set set_extra_info to NULL. * cipher/mac-gmac.c (gmac_ops): the same. * cipher/mac-hmac.c (hmac_ops): the same. * cipher/mac-poly1305.c (poly1305mac_ops): the same. -- New MAC GOST28147-IMIT needs info about S-Box to be used. This info can be passed via a call to gcry_mac_ctl(GCRYCTL_SET_SBOX, ...). Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/mac-poly1305.c')
-rw-r--r--cipher/mac-poly1305.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cipher/mac-poly1305.c b/cipher/mac-poly1305.c
index b80f87db..39ba790f 100644
--- a/cipher/mac-poly1305.c
+++ b/cipher/mac-poly1305.c
@@ -322,7 +322,8 @@ static gcry_mac_spec_ops_t poly1305mac_ops = {
poly1305mac_read,
poly1305mac_verify,
poly1305mac_get_maclen,
- poly1305mac_get_keylen
+ poly1305mac_get_keylen,
+ NULL
};