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 | |
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
-rw-r--r-- | config | 16 | ||||
-rwxr-xr-x | generate-key.sh | 10 | ||||
-rwxr-xr-x | split-passphrase | 21 |
3 files changed, 38 insertions, 9 deletions
@@ -0,0 +1,16 @@ +GPGHOMEDIR="./homedir" +PUBDIR="./public" +PRIVDIR="./private" +INPUTDIR="./input" + +pubkey="$PUBDIR/mageia-board-pubkey.gpg" +seckey="$PRIVDIR/mageia-board-seckey" +seckey_e="$PRIVDIR/mageia-board-seckey.gpg" +passphrase="$PRIVDIR/passphrase" + +ssplit="./bin/ssss-split" +scombine="./bin/sss-combine" +partsdir="$PRIVDIR/parts" +nb_threshold=3 +nb_shares=6 + diff --git a/generate-key.sh b/generate-key.sh index 51ec8e1..d41a90c 100755 --- a/generate-key.sh +++ b/generate-key.sh @@ -1,14 +1,6 @@ #!/bin/sh -GPGHOMEDIR="./homedir" -PUBDIR="./public" -PRIVDIR="./private" -INPUTDIR="./input" - -pubkey="$PUBDIR/mageia-board-pubkey.gpg" -seckey="$PRIVDIR/mageia-board-seckey" -seckey_e="$PRIVDIR/mageia-board-seckey.gpg" -passphrase="$PRIVDIR/passphrase" +. ./config echo 'Today is :' date 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" + |