diff options
author | djm@openbsd.org <djm@openbsd.org> | 2019-01-21 22:18:24 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2019-01-22 09:20:14 +1100 |
commit | 533cfb01e49a2a30354e191669dc3159e03e99a7 (patch) | |
tree | 45cd439f8fd7d6270a6d26ddd77c4a16948a0ebb /sntrup4591761.sh | |
parent | d50ab3cd6fb859888a26b4d4e333239b4f6bf573 (diff) |
upstream: switch sntrup implementation source from supercop to
libpqcrypto; the latter is almost identical but doesn't rely on signed
underflow to implement an optimised integer sort; from markus@
OpenBSD-Commit-ID: cd09bbf0e0fcef1bedca69fdf7990dc360567cf8
Diffstat (limited to 'sntrup4591761.sh')
-rw-r--r-- | sntrup4591761.sh | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/sntrup4591761.sh b/sntrup4591761.sh index 5540ca4d9..2a0a4200b 100644 --- a/sntrup4591761.sh +++ b/sntrup4591761.sh | |||
@@ -1,28 +1,28 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | FILES=" | 2 | FILES=" |
3 | supercop-20181216/crypto_sort/int32/portable3/int32_minmax.inc | 3 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/int32_sort.h |
4 | supercop-20181216/crypto_sort/int32/portable3/sort.c | 4 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/int32_sort.c |
5 | supercop-20181216/crypto_kem/sntrup4591761/ref/small.h | 5 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/small.h |
6 | supercop-20181216/crypto_kem/sntrup4591761/ref/mod3.h | 6 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/mod3.h |
7 | supercop-20181216/crypto_kem/sntrup4591761/ref/modq.h | 7 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/modq.h |
8 | supercop-20181216/crypto_kem/sntrup4591761/ref/params.h | 8 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/params.h |
9 | supercop-20181216/crypto_kem/sntrup4591761/ref/r3.h | 9 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/r3.h |
10 | supercop-20181216/crypto_kem/sntrup4591761/ref/rq.h | 10 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq.h |
11 | supercop-20181216/crypto_kem/sntrup4591761/ref/swap.h | 11 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/swap.h |
12 | supercop-20181216/crypto_kem/sntrup4591761/ref/dec.c | 12 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/dec.c |
13 | supercop-20181216/crypto_kem/sntrup4591761/ref/enc.c | 13 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/enc.c |
14 | supercop-20181216/crypto_kem/sntrup4591761/ref/keypair.c | 14 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/keypair.c |
15 | supercop-20181216/crypto_kem/sntrup4591761/ref/r3_mult.c | 15 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/r3_mult.c |
16 | supercop-20181216/crypto_kem/sntrup4591761/ref/r3_recip.c | 16 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/r3_recip.c |
17 | supercop-20181216/crypto_kem/sntrup4591761/ref/randomsmall.c | 17 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/randomsmall.c |
18 | supercop-20181216/crypto_kem/sntrup4591761/ref/randomweightw.c | 18 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/randomweightw.c |
19 | supercop-20181216/crypto_kem/sntrup4591761/ref/rq.c | 19 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq.c |
20 | supercop-20181216/crypto_kem/sntrup4591761/ref/rq_mult.c | 20 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_mult.c |
21 | supercop-20181216/crypto_kem/sntrup4591761/ref/rq_recip3.c | 21 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_recip3.c |
22 | supercop-20181216/crypto_kem/sntrup4591761/ref/rq_round3.c | 22 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_round3.c |
23 | supercop-20181216/crypto_kem/sntrup4591761/ref/rq_rounded.c | 23 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_rounded.c |
24 | supercop-20181216/crypto_kem/sntrup4591761/ref/small.c | 24 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/small.c |
25 | supercop-20181216/crypto_kem/sntrup4591761/ref/swap.c | 25 | libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/swap.c |
26 | " | 26 | " |
27 | ### | 27 | ### |
28 | 28 | ||
@@ -40,7 +40,6 @@ for i in $FILES; do | |||
40 | grep -v "extern crypto_int32 small_random32" | | 40 | grep -v "extern crypto_int32 small_random32" | |
41 | sed -e "s/crypto_kem_/crypto_kem_sntrup4591761_/g" \ | 41 | sed -e "s/crypto_kem_/crypto_kem_sntrup4591761_/g" \ |
42 | -e "s/smaller_mask/smaller_mask_${b}/g" \ | 42 | -e "s/smaller_mask/smaller_mask_${b}/g" \ |
43 | -e "s/void crypto_sort/void crypto_sort_int32/" \ | ||
44 | -e "s/^extern void /static void /" \ | 43 | -e "s/^extern void /static void /" \ |
45 | -e "s/^void /static void /" | 44 | -e "s/^void /static void /" |
46 | echo | 45 | echo |