tree checksum vpatch file split hunks

all signers: asciilifeform

antecedents:

press order:

lam-par-genesisasciilifeform

patch:

-
+ BDC0823644F0620B45CEAC7A95B369DC7FCE43D73FB5478BB1FF452C2140B8890511971B1F945E71C98F3B3E4A0F5F2C1769E1382608E49DED0E5716E66C425F
lamport-parachute/lamport_decode.sh
(0 . 0)(1 . 29)
5 #!/bin/bash
6
7 if [ $# -lt 2 ]
8 then
9 echo "Usage: ./`basename $0` HASHUTIL PUBKEY.TXT < ENCODED.TXT > HEXPAYLOAD"
10 exit 1
11 fi
12
13 bits=""
14 while read -u 3 pkl; do
15 if ! read el
16 then
17 break
18 fi
19 bits="$bits$(
20 case $(echo -n $el | xxd -r -p | $1 | cut -d ' ' -f1) in
21 $(echo $pkl | cut -d ' ' -f1)) echo "0" ;;
22 $(echo $pkl | cut -d ' ' -f2)) echo "1" ;;
23 *) exit 1; break ;;
24 esac)"
25 if [[ $? == 1 ]]
26 then
27 echo False >&2;
28 exit 1
29 fi
30 done 3<$2
31
32 echo "ibase=2;obase=10000;$bits" | bc | tr -d '\\\n' | tr '[:upper:]' '[:lower:]'
33 echo
-
+ D5E68BEBABF4A0B018D7BCAD1461B079624BBCA9CB0597C95062D08EF60B2F25448C53A7F16C2634ED1E438C354386A9F52183C0ACCC79CC948CDA6F2A760433
lamport-parachute/lamport_encode.sh
(0 . 0)(1 . 17)
38 #!/bin/bash
39
40 if [ $# -lt 1 ]
41 then
42 echo "Usage: ./`basename $0` PRIVKEY.TXT < HEXPAYLOAD > ENCODED.TXT"
43 exit 1
44 fi
45
46 payload=$(cat | tr '[:lower:]' '[:upper:]')
47 len=$((${#payload} * 4))
48 bits=$(printf "%*s" $len $(echo "ibase=16;obase=2;$payload" | bc | tr -d '\\\n') | tr ' ' 0)
49
50 while IFS= read -r p; do
51 bit=${bits:0:1};
52 bits=${bits:1};
53 echo $p | cut -d ' ' -f$(($bit + 1));
54 done < "$1"
-
+ 9F627F6096E3BDF48D14B851885C1A25A97D8DE5BCC857F7DBCCCE559FD729672E421035CD01D3C6B862CD1ACDC210FD93F5CAE84D0B0D93CEABD99A78A01017
lamport-parachute/lamport_mkpriv.sh
(0 . 0)(1 . 11)
59 #!/bin/bash
60
61 if [ $# -lt 2 ]
62 then
63 echo "Usage: ./`basename $0` PAYLOADBITS STRENGTHBITS"
64 exit 1
65 fi
66
67 for i in $(seq 1 $(($1 * 2))) ; do
68 echo `od -N $(($2 / 8)) -An -t x1 /dev/random | tr -d " \n"` ;
69 done | xargs -n 2
-
+ 09817D1F5BCDDE408061A06D9A55F4C1D38976F629834EA7904229C7DB50006F5F31C0E19753B9F89CA30B465475A66EF39113DC376A79EFA65F392B1AB54F49
lamport-parachute/lamport_priv2pub.sh
(0 . 0)(1 . 11)
74 #!/bin/bash
75
76 if [ $# -lt 1 ]
77 then
78 echo "Usage: ./`basename $0` HASHUTIL < PRIVKEY.TXT > PUBKEY.TXT"
79 exit 1
80 fi
81
82 for x in $(cat) ; do
83 echo -n $x | xxd -r -p | $1 | cut -d ' ' -f1 ;
84 done | xargs -n 2