Module Name: othersrc Committed By: agc Date: Sun Sep 18 19:01:16 UTC 2011
Modified Files: othersrc/external/bsd/threshold/dist/src/threshold: threshold.1 Log Message: sync manual page with reality To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ othersrc/external/bsd/threshold/dist/src/threshold/threshold.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: othersrc/external/bsd/threshold/dist/src/threshold/threshold.1 diff -u othersrc/external/bsd/threshold/dist/src/threshold/threshold.1:1.2 othersrc/external/bsd/threshold/dist/src/threshold/threshold.1:1.3 --- othersrc/external/bsd/threshold/dist/src/threshold/threshold.1:1.2 Sat Mar 12 13:22:24 2011 +++ othersrc/external/bsd/threshold/dist/src/threshold/threshold.1 Sun Sep 18 19:01:16 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: threshold.1,v 1.2 2011/03/12 13:22:24 wiz Exp $ +.\" $NetBSD: threshold.1,v 1.3 2011/09/18 19:01:16 agc Exp $ .\" .\" Copyright (c) 2010 Alistair Crooks <a...@netbsd.org> .\" All rights reserved. @@ -23,7 +23,7 @@ .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 13, 2010 +.Dd September 18, 2011 .Dt THRESHOLD 1 .Os .Sh NAME @@ -35,8 +35,7 @@ .Op Fl a algorithm .Op Fl m memory-size .Op Fl o filename -.Op Fl s total-shares|threshold/shares -.Op Fl t threshold-shares|threshold/shares +.Op Fl t threshold/shares .Ar file .Sh DESCRIPTION The @@ -60,8 +59,17 @@ .Bl -tag -width Ar .It Fl a Specify the algorithm to be used in the threshold scheme. -The default algorithm is -.Dq ssss . +The possible algorithms are +.Dq ida +for Rabin's IDA (this is the default), +.Dq RAID4 +and +.Dq RAID5 +while the +.Xr ssss 1 +command also uses the +.Xr libthreshold 3 +framework. .It Fl i Operate in an interactive manner by prompting the user for a secret to be typed in response to a prompt, and read by @@ -113,26 +121,78 @@ .Dv secretfile into 10 separate shares, of which 3 are needed to reconstruct the original file. .Bd -literal -% threshold -a s4 -t 3/5 secretfile -Splitting file secretfile to: -secretfile.001 secretfile.002 secretfile.003 secretfile.004 secretfile.005 -% ls -al secretfile.0* --rw-r--r-- 1 agc agc 21327 May 2 21:44 secretfile.001 --rw-r--r-- 1 agc agc 21327 May 2 21:44 secretfile.002 --rw-r--r-- 1 agc agc 21327 May 2 21:44 secretfile.003 --rw-r--r-- 1 agc agc 21327 May 2 21:44 secretfile.004 --rw-r--r-- 1 agc agc 21327 May 2 21:44 secretfile.005 -% threshold -j -o secretfile.out secretfile.003 secretfile.001 secretfile.002 -Creating file secretfile.out from files: -% diff secretfile secretfile.out +% cp /etc/group origfile +% threshold -t 3/10 origfile +% ls -al /etc/group origfile.split* +-rw-r--r-- 1 root wheel 526 Jun 26 01:34 /etc/group +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split0 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split1 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split2 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split3 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split4 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split5 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split6 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split7 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split8 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 origfile.split9 +% threshold -j -o origfile.recons origfile.split4 origfile.split2 origfile.split3 +% diff origfile origfile.recons +% rm origfile.* % .Ed +.Pp +The following example uses shell redirection to split the +data on standard input: +.Bd -literal +% threshold -t 3/10 < origfile +% ls -al threshold.split* +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split0 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split1 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split2 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split3 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split4 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split5 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split6 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split7 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split8 +-rw-r--r-- 1 agc agc 192 Sep 17 13:59 threshold.split9 +% threshold -j -o origfile.mem threshold.split1 threshold.split2 threshold.split3 +% diff origfile origfile.mem +% rm threshold.* +.Ed +.Pp +The following example prompts for input using +.Xr getpass 3 +.Bd -literal +% threshold -t 3/10 -i +Data to share: +% ls -al threshold.split* +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split0 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split1 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split2 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split3 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split4 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split5 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split6 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split7 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split8 +-rw-r--r-- 1 agc agc 20 Sep 17 13:59 threshold.split9 +% threshold -j threshold.split4 threshold.split2 threshold.split3 +hello world +% +.Ed +.Pp +Rabin's IDA creates shares which are a fraction of the original size. +The exact size of each share is a function of the number of shares defined +as necessary to recreate the original data, and the size of the original data +itself. .Sh RETURN VALUES The .Nm utility will return 0 for success, and 1 for failure. .Sh SEE ALSO +.Xr ssss 1 , .Xr getpass 3 , .Xr libthreshold 3 .Sh HISTORY @@ -142,9 +202,6 @@ .Nx 6.0 . .Sh AUTHORS .An -nosplit -.An Hal Finney wrote the original -.Dq secsplit -Shamir Secret Sharing Scheme functionality. The Information Dispersal Algorithm implementation was written by .An Alistair Crooks Aq a...@netbsd.org and ended up being influenced by a number of sources.