aboutsummaryrefslogtreecommitdiffstats
path: root/split-passphrase
diff options
context:
space:
mode:
Diffstat (limited to 'split-passphrase')
-rwxr-xr-xsplit-passphrase21
1 files changed, 21 insertions, 0 deletions
diff --git a/split-passphrase b/split-passphrase
new file mode 100755
index 0000000..701e4ae
--- /dev/null
+++ b/split-passphrase
@@ -0,0 +1,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"
+