Annotation of src/usr.bin/ssh/sntrup4591761.sh, Revision 1.2
1.1 djm 1: #!/bin/sh
2: FILES="
1.2 ! djm 3: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/int32_sort.h
! 4: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/int32_sort.c
! 5: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/small.h
! 6: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/mod3.h
! 7: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/modq.h
! 8: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/params.h
! 9: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/r3.h
! 10: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq.h
! 11: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/swap.h
! 12: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/dec.c
! 13: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/enc.c
! 14: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/keypair.c
! 15: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/r3_mult.c
! 16: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/r3_recip.c
! 17: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/randomsmall.c
! 18: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/randomweightw.c
! 19: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq.c
! 20: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_mult.c
! 21: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_recip3.c
! 22: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_round3.c
! 23: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/rq_rounded.c
! 24: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/small.c
! 25: libpqcrypto-20180314/crypto_kem/sntrup4591761/ref/swap.c
1.1 djm 26: "
27: ###
28:
29: set -e
30: DIR=/data/git/mfriedl
31: cd $DIR
32: echo '#include <string.h>'
33: echo '#include "crypto_api.h"'
34: echo
35: for i in $FILES; do
36: echo "/* from $i */"
37: b=$(basename $i .c)
38: grep \
39: -v '#include' $i | \
40: grep -v "extern crypto_int32 small_random32" |
41: sed -e "s/crypto_kem_/crypto_kem_sntrup4591761_/g" \
42: -e "s/smaller_mask/smaller_mask_${b}/g" \
43: -e "s/^extern void /static void /" \
44: -e "s/^void /static void /"
45: echo
46: done