tree checksum vpatch file split hunks
all signers: asciilifeform
antecedents:
press order:
lam-par-genesis | asciilifeform |
patch:
(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
-(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"
-(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
-(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