Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mitosis

A file splitting thing. Cuts a file into N shares, each one pure random noise. Keep them all, get your file back. Miss even one, get nothing.

I hacked the first version together for fun during the 2020 COVID lockdown. Six years later I rewrote it in Go with actual crypto randomness, streaming for big files, and support for any number of shares.

How this works

Every byte in your file gets split into N random pieces. They add up to the original byte. Each piece on its own is uniformly random, independent of everything else. An attacker with N-1 shares still knows nothing.

Its additive secret sharing over GF(2^8). Same math as a one-time pad. Information-theoretically secure, not just computationally. The only catch is you need N times the storage space.

Reading the code helps, its documented pretty well.

Building

go build -o mitosis .

Usage

Usage: mitosis [action] [filename] [*filename_2]
   Actions:
      -s, --split           Split the input file
      -j, --join            Join the input files
   Options:
      -n, --shares          Number of shares to split into (default 2)

Examples:
  mitosis -s secret.txt              splits into secret.txt.0 and secret.txt.1
  mitosis -s secret.txt -n 5         splits into secret.txt.0 through secret.txt.4
  mitosis -j secret.txt.0            auto finds secret.txt.1, secret.txt.2, etc.
  mitosis -j secret.txt.0 secret.txt.1   explicit file list

On join you can pass just one share file and it will find the rest by looking for sequential numbered extensions. Or list them all out if you want.

Disclaimer

Use at your own risk. I am not responsible for any data loss, corrupted files, or existential dread caused by misplaced shares. Have fun.

About

A file splitting algorithm I made for fun.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages