diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-02-03 14:53:29 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-02-03 14:53:29 +0000 |
commit | 5c22526225994d0ffda69774d38c503ac9ea5ffb (patch) | |
tree | d9947f49646d612b2f8afc877af98a76cf43fc0f /split-passphrase | |
parent | 0feffd76c76b6e1481a0fc0dc469eddb20229625 (diff) | |
download | gpg-5c22526225994d0ffda69774d38c503ac9ea5ffb.tar gpg-5c22526225994d0ffda69774d38c503ac9ea5ffb.tar.gz gpg-5c22526225994d0ffda69774d38c503ac9ea5ffb.tar.bz2 gpg-5c22526225994d0ffda69774d38c503ac9ea5ffb.tar.xz gpg-5c22526225994d0ffda69774d38c503ac9ea5ffb.zip |
add config file and script to split passphrase using ssss-split
Diffstat (limited to 'split-passphrase')
-rwxr-xr-x | split-passphrase | 21 |
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" + |