[Mageia-sysadm] [392] add config file and script to split passphrase using ssss-split
root at mageia.org
root at mageia.org
Thu Feb 3 15:53:30 CET 2011
Revision: 392
Author: boklm
Date: 2011-02-03 15:53:29 +0100 (Thu, 03 Feb 2011)
Log Message:
-----------
add config file and script to split passphrase using ssss-split
Modified Paths:
--------------
gpg/generate-key.sh
Added Paths:
-----------
gpg/config
gpg/split-passphrase
Added: gpg/config
===================================================================
--- gpg/config (rev 0)
+++ gpg/config 2011-02-03 14:53:29 UTC (rev 392)
@@ -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
+
Modified: gpg/generate-key.sh
===================================================================
--- gpg/generate-key.sh 2011-02-03 13:54:58 UTC (rev 391)
+++ gpg/generate-key.sh 2011-02-03 14:53:29 UTC (rev 392)
@@ -1,15 +1,7 @@
#!/bin/sh
-GPGHOMEDIR="./homedir"
-PUBDIR="./public"
-PRIVDIR="./private"
-INPUTDIR="./input"
+. ./config
-pubkey="$PUBDIR/mageia-board-pubkey.gpg"
-seckey="$PRIVDIR/mageia-board-seckey"
-seckey_e="$PRIVDIR/mageia-board-seckey.gpg"
-passphrase="$PRIVDIR/passphrase"
-
echo 'Today is :'
date
echo '(check if the date is correct and press enter)'
Added: gpg/split-passphrase
===================================================================
--- gpg/split-passphrase (rev 0)
+++ gpg/split-passphrase 2011-02-03 14:53:29 UTC (rev 392)
@@ -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"
+
Property changes on: gpg/split-passphrase
___________________________________________________________________
Added: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/mageia-sysadm/attachments/20110203/baacbc98/attachment.html>
More information about the Mageia-sysadm
mailing list