There's a typo in the patch resulting in AES-GCM always being disabled: > [...] > +AC_ARG_ENABLE(aesni, [AS_HELP_STRING(--disable-aesni,Do not use aesni code)], > + AS_IF([test "x$enableval" = "xyes"], check_aeni="yes", check_aesni="no"), > + check_aesni="yes") > +AS_IF([test "$check_aesni" = "yes"],[ > [...] search for "check_aeni", should be "check_aesni". Reproducible: Always
..."in the patch" meaning the libsodium-1.0.10-cpuflags.patch file.
by the way: what's the use for this disable/enable AES patch anyway? AES-GCM is only available if the host cpu supports the AESNI flag. So every client has to check this first by calling crypto_aead_aes256gcm_is_available()
Can someone please at least fix the gentoo patch in git? The typo is pretty obvious. sed -i -e "s/check_aeni/check_aesni/" dev-libs/libsodium/files/libsodium-1.0.10-cpuflags.patch or: > --- a/files/libsodium-1.0.10-cpuflags.patch 2018-09-17 22:17:35.397671318 +0200 > +++ b/files/libsodium-1.0.10-cpuflags.patch 2016-06-17 14:36:51.000000000 +0200 > @@ -24,7 +24,7 @@ > CFLAGS="$oldcflags" > > +AC_ARG_ENABLE(aesni, [AS_HELP_STRING(--disable-aesni,Do not use aesni code)], > -+ AS_IF([test "x$enableval" = "xyes"], check_aesni="yes", check_aesni="no"), > ++ AS_IF([test "x$enableval" = "xyes"], check_aeni="yes", check_aesni="no"), > + check_aesni="yes") > +AS_IF([test "$check_aesni" = "yes"],[ > oldcflags="$CFLAGS"
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74578f0ade346915d1586d0a3dbe2a8aa5a383c6 commit 74578f0ade346915d1586d0a3dbe2a8aa5a383c6 Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2018-10-05 04:15:36 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2018-10-05 04:15:36 +0000 dev-libs/libsodium: fix AES-NI support Closes: https://bugs.gentoo.org/637070 Package-Manager: Portage-2.3.50, Repoman-2.3.11 RepoMan-Options: --force Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> dev-libs/libsodium/Manifest | 1 - .../files/libsodium-1.0.10-cpuflags.patch | 2 +- ...um-1.0.11.ebuild => libsodium-1.0.11-r1.ebuild} | 2 +- ...um-1.0.13.ebuild => libsodium-1.0.14-r1.ebuild} | 2 +- dev-libs/libsodium/libsodium-1.0.14.ebuild | 43 ---------------------- ...um-1.0.15.ebuild => libsodium-1.0.15-r1.ebuild} | 2 +- ...1.0.16-r1.ebuild => libsodium-1.0.16-r2.ebuild} | 2 +- dev-libs/libsodium/libsodium-1.0.16.ebuild | 43 ---------------------- 8 files changed, 5 insertions(+), 92 deletions(-)
Thanks for this report!