// COMPLETE THREAD

XSPLIT now own ftp.wimsey.bc.ca

7 expanded posts ยท every known parent and child

NODE 166aa49dXSPLIT now own ftp.wimsey.bc.ca
I just uploaded a short program I wrote called XSPLIT to ftp.wimsey.bc.ca.
this is a simple crypto tool that splits a file into many files for secure
distribution.  A simple way of escrowing your data to the parties >YOU< only
trust and who don't know each other.

Whenever Gibson's idea of swiss like databanks will occur, you could encrypt
your file, split it with XSPLIT and upload it to several such databanks.

XSPLIT takes a file, generates n-1 random numbers, writes those random numbers
out to each of the n-1 files, and for the nth file it takes the XOR of all N
random numbers, and XORs it with the plaintext.  This way, you get to split
your file in such a way as to require all pieces of it in order to rebuild it.

This is certainly not earth shattering, and is similar to what clipper uses,
only its something you have available to you and something I wrote on a whim.

Enjoy.  (Source is included as usual and should be unix portable.)
NODE 49c905fbRe: XSPLIT now own ftp.wimsey.bc.ca
How about doing this with n of m?  Anyone have code?

Berzerk.
NODE ce35e9e8XSplit & N/M alternatives
| How about doing this with n of m?  Anyone have code?

You can also get shade from
ftp.dsi.unimi.it:/pub/security/crypt/code/shade.tar.gz


From: hebrais@mirkwood.CAM.ORG (Philippe Hebrais)
Newsgroups: alt.sources
Subject: shade -- split a file with shadows
Message-ID: <hebrais.0xu4@mirkwood.CAM.ORG>
Date: 13 Dec 92 07:57:05 GMT
Organization: Secte des adorateurs des semiconducteurs
Lines: 675
X-Newsreader: MeNews 2.8.0


                SSSSS   HH   HH    AAA    DDDD     EEEEEEE
               SS   SS  HH   HH   AA AA   DD DD    EE
              SSS      HH   HH  AA   AA  DD  DD   EE
               SSS     HH   HH  AA   AA  DD   DD  EE
               SSS    HHHHHHH  AAAAAAA  DD   DD  EEEE
                SSS   HH   HH  AA   AA  DD   DD  EE
                SSS  HH   HH  AA   AA  DD  DD   EE
            SS   SS  HH   HH  AA   AA  DD DD    EE
            SSSSS   HH   HH  AA   AA  DDDD     EEEEEEE

`shade' is a file splitting and merging utility.  It takes a large
file and splits it into uniformly sized blocks.  It can also output
extra blocks (called shadows).  These shadows can be used to recover
missing sections if they get corrupted or it they are lost.  With a
single shadow, `shade' can recover ANY single missing block.  As many
shadows are needed as there are blocks missing.  If too few blocks
and shadows are available, nothing can be recovered.

For example, foo.bar (259042 bytes) is split into 5 sections
of 45000 bytes, 1 section of 34042 bytes and 2 shadows of
45000 bytes.  Each of these 8 parts is sent through email.
Even if any two of these eight parts gets lost, the original
foo.bar can be reconstructed.

`shade' is a simple application of the chinese remainder theorem
for polynomials with coeficients modulo two.  For more information
see the comments at the beginning of project.c.



SAMPLE USAGE

Split "bar" (111042 bytes) into 20000 byte chunks and output 2
shadows.  All these parts will be uuencoded and output to
foo.uu.001, foo.uu.002, etc.

    % shade -u -k 2 -l 20000 -o foo bar
    [001] [002] [003] [004] [005] [006] [aaa] [aab] Done.

Merge these parts back together:

    % rm foo.uu.003 foo.uu.005
    % cat foo.uu.* | shade -m -u
    Merging bar (111042 bytes)
    Got section 4 (20000 bytes)
    Got section 1 (20000 bytes)
    Got section 2 (20000 bytes)
    Got section 6 (11042 bytes)
    Got shadow 1 (20000 bytes)
    Got shadow 2 (20000 bytes)

    Missing: [003] [005]

    Recovering 2 sections:
    [001] [002] [aaa] [004] [aab] [006]



DISTRIBUTION

Shade is copyright Philippe Hebrais 1992.  You have the permission
to use this code is anyway you feel appropriate as long as you give
credit where it is due.  There is no warranty of any kind.  I am not
responsible for any damage caused directly or indirectly by this
program.


AUTHOR
          ,
Philippe Hebrais <hebrais@mirkwood.cam.org>

--
      Philippe Hebrais   hebrais@mirkwood.cam.org
   Voix: (514)731-9146   uunet!philmtl!altitude!mirkwood!hebrais



-- 
Adam Shostack 				       adam@bwh.harvard.edu

Politics.  From the greek "poly," meaning many, and ticks, a small,
annoying bloodsucker.
NODE 24ec2714Re: XSplit & N/M alternatives
Very cool.  I wasn't aware that such a splitting program already existed,
although XSPLIT is different than shade in that you need all the parts to
put the file back together and if you miss a part, you don't have anything.

Also, XSPLIT will produce N files of the same size as the original file you
feed it.
W

What exactly is SHADE useful for?  Distributing a file where some of it can get
damaged?  Some software RAID implementation?  Can it be used for encryption?
NODE 691e5cc6Re: XSplit & N/M alternatives
> Also, XSPLIT will produce N files of the same size as the original file you
> feed it.

I just glanced at the .doc and ran it once last night on my PC -- haven't
looked at the source -- but a possible application of this occurred to me
this morning.  The N files are binary, but it should be easy to restrict
them to ASCII using a command-line switch or a file for PRNG input, right?
Then they would be suitable for Internet (re)mailing.  (Concerns about
cryptographic integrity are irrelevant for my purposes.)

A remailer could receive, say, a 5k message, which might be ~4.5k after
peeling off that remailer's layer of encryption.  XSPLIT could then be
invoked to produce several ASCII files of identical size.  These bogus
files could be mailed to various remailers at the same time as the "real"
file, with a prepended instruction to send 'em to the bit bucket.  Of
course, latency would then have to be added before processing the "real"
file to defeat traffic analyis.  I'm probably missing something, but
it's a thought anyway...


Alan Westrope                  <awestrop@nyx.cs.du.edu>
__________/|-,                 <adwestro@ouray.denver.colorado.edu>
   (_)    \|-'                  finger for pgp 2.6 public key
"Silent, We the Empire Await, Trystero!" -- Pynchon (sorta...)
NODE 1df1c258Re: XSplit & N/M alternatives
Re: forcing text only...

Welp, you can simply modify the sources for it yourself to do this.

First, check to see if the character you've read is a control.  If it is
leave it alone and don't encrypt it.  Then if it's an alphanumeric character,
take the random number you've just read and do a binary AND operation on it
with a number less than 31.  Say 31 should suffice.

This should do the trick for what you want... But you should know that it will
kill the fuck out any security you might have ever had.

The best solution is to first ZIP up the file you want to XSPLIT, then use
XSPLIT on it, and feed the outputs of XSPLIT to something like UUENCODE...
NODE e12fad9eRe: XSPLIT now own ftp.wimsey.bc.ca
> How about doing this with n of m?  Anyone have code?


What do you mean?  The sources are included with XSPLIT.  The algorithm is
very very simple.

For all chars in input file:
I read a character from the infile called C.
I pick a number MOD the number of files.  I call this X
SUM=0
FOR FILES=0 TO N 
 IF FILES!=X
   Pick Random Number Q
   Write Randome Number Q to File #FILES
   SUM=SUM XOR Q
NEXT FILES
 WRITE C XOR Q to File #X

What exactly did you mean by n of m?  Since at each byte the numbers are picked 
randomly, the stream which holds the XOR'ed sum is random for each character.
So none of the parties holds any more information than any of the others and
it is all useless unless all of the files are joined together.