summaryrefslogtreecommitdiff
path: root/cipher/gost28147.c
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2019-11-12 16:50:05 +0300
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2019-11-21 17:59:31 +0200
commite5c4cf0efb8fd297963e6b4392ab98c41dbad536 (patch)
tree82e178631363e4578fee328d12dad5eb25bfd3d0 /cipher/gost28147.c
parentf9894240bed36eab17fabf5aa482799b148618e2 (diff)
downloadlibgcrypt-e5c4cf0efb8fd297963e6b4392ab98c41dbad536.tar.gz
gost28147: inline gost_val function to speed up code
* cipher/gost28147.c (gost_val): mark function as inline -- This improves the speed of the cipher Cipher: GOST28147 | nanosecs/byte mebibytes/sec cycles/byte Before: ECB enc | 18.89 ns/B 50.48 MiB/s - c/B ECB dec | 18.71 ns/B 50.96 MiB/s - c/B After: ECB enc | 17.83 ns/B 53.48 MiB/s - c/B ECB dec | 17.38 ns/B 54.89 MiB/s - c/B Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'cipher/gost28147.c')
-rw-r--r--cipher/gost28147.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cipher/gost28147.c b/cipher/gost28147.c
index db7e9412..f30ca16a 100644
--- a/cipher/gost28147.c
+++ b/cipher/gost28147.c
@@ -60,7 +60,7 @@ gost_setkey (void *c, const byte *key, unsigned keylen,
return GPG_ERR_NO_ERROR;
}
-static u32
+static inline u32
gost_val (u32 subkey, u32 cm1, const u32 *sbox)
{
cm1 += subkey;