aboutsummaryrefslogtreecommitdiffstats
path: root/split-passphrase
blob: 701e4aea2cbad35cdde5532a25ee2d833f7b0bc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

. ./config

ssplit="./bin/ssss-split"
scombine="./bin/sss-combine"
partsdir="$PRIVDIR/parts"
nb_threshold=3
nb_shares=6

mkdir -p "$partsdir"

$ssplit -x -t $nb_threshold -n $nb_shares < "$passphrase" > "$partsdir/all"

for num in `seq 1 $nb_shares`
do
    grep "^$num-" "$partsdir/all" > "$partsdir/$num"
done

rm -f "$partsdir/all"