]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
fix: missing pieces of previous commit
authorDamien Miller <djm@mindrot.org>
Thu, 31 Dec 2020 01:47:22 +0000 (12:47 +1100)
committerDamien Miller <djm@mindrot.org>
Thu, 31 Dec 2020 01:47:22 +0000 (12:47 +1100)
sntrup761.c
sntrup761.sh

index 21b59bd4bb27b2ceaf5f1a447f4967f626990c96..db5aaacab7a707640c87a9aca8060c5fa34b7035 100644 (file)
@@ -1,4 +1,4 @@
-/*  $OpenBSD: sntrup761.c,v 1.1 2020/12/29 00:59:15 djm Exp $ */
+/*  $OpenBSD: sntrup761.c,v 1.2 2020/12/30 14:13:28 tobhe Exp $ */
 
 /*
  * Public Domain, Authors:
 
 #include <string.h>
 #include "crypto_api.h"
+#include "int32_minmax.inc"
 
 #define CRYPTO_NAMESPACE(s) s
 
-/* from supercop-20201130/crypto_sort/int32/portable4/int32_minmax.inc */
-#define int32_MINMAX(a,b) \
-do { \
-  int32 ab = b ^ a; \
-  int32 c = b - a; \
-  c ^= ab & (c ^ b); \
-  c >>= 31; \
-  c &= ab; \
-  a ^= c; \
-  b ^= c; \
-} while(0)
-
 /* from supercop-20201130/crypto_sort/int32/portable4/sort.c */
 #define int32 crypto_int32
 
index 7fa9e3249047235f41246ac384f515d633636056..5ddea77a05a04d7962ee95d7c63a98050c141b97 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh
-#       $OpenBSD: sntrup761.sh,v 1.1 2020/12/29 00:59:15 djm Exp $
+#       $OpenBSD: sntrup761.sh,v 1.2 2020/12/30 14:13:28 tobhe Exp $
 #       Placed in the Public Domain.
 #
 AUTHOR="supercop-20201130/crypto_kem/sntrup761/ref/implementors"
@@ -21,7 +21,6 @@ FILES="
        supercop-20201130/crypto_kem/sntrup761/ref/kem.c
 "
 SORT_I32="
-       supercop-20201130/crypto_sort/int32/portable4/int32_minmax.inc
        supercop-20201130/crypto_sort/int32/portable4/sort.c
 "
 SORT_U32="supercop-20201130/crypto_sort/uint32/useint32/sort.c"
@@ -39,6 +38,7 @@ echo ' */'
 echo
 echo '#include <string.h>'
 echo '#include "crypto_api.h"'
+echo '#include "int32_minmax.inc"'
 echo
 echo '#define CRYPTO_NAMESPACE(s) s'
 echo