Most conspiratorial

Aaron Grothe
2205 South 51st Street
Omaha, NE 68106
US
ajgrothe@yahoo.com

David Madore
http://www.madore.org/~david/

Judges' comments:

To build:

make grothe

To run:

# To create a shared secret shared among M people with N+1 needed to reconstruct
./grothe -secret 1-/dev/urandom 2-/dev/urandom ... N-/dev/urandom \
1+shared1 2+shared2 ... M+sharedM

# To reconstruct the original (an arbitrary combination of N+1 or
# more shared files with their proper numbers)
./grothe I-sharedI J-sharedJ K-sharedK ... +reconstructed

Try:

./grothe -grothe.c 1+grothe.c.1 2+grothe.c.2

./grothe -cookie_recipe.txt 1-/dev/urandom 2-/dev/urandom \
1+cookie_piece1.dat 2+cookie_piece2.dat 3+cookie_piece3.dat 4+cookie_piece4.dat

./grothe 1-cookie_piece1.dat 2-cookie_piece2.dat 4-cookie_piece4.dat
+cookie_recipe_restore.txt

Selected Judges Remarks:

Also known as Best abuse of the judging process.

The IOCCC 2012 submission page didn’t enforce the 2048 meaningful character limit. This entry, as submitted, weighed in at 2222 chars but was, luckily for it, extremely easy to bring down below the limit. There were a number of strings that when concatenated allowed the program to slide under the limit.

It was clear to the judges that the extra size was an entry beautification step. Had it not, this entry would have been rejected in round 0.

The judges also took some liberty obfuscating this entry a litte more.

How does this entry work? The only place multiplication is used is to perform the atoi conversion.

Author’s comments:

Description

This program implements a version of Shamir’s Secret Sharing. Shamir’s Secret Sharing allows you to encrypt a file into N parts where it will take M parts to recreate the original file. E.g. you can split the secret recipe for Crystal Pepsi into 3 parts and require two of them be available to extract the original recipe.

Actually surprisingly useful for an IOCCC entry :-)

Usage

To share a secret

E.g.

file to be shared - cookie_recipe.txt number of pieces - 2 + file to be shared total number of pieces created by program 4 pieces needed to reassemble recipe 3 or greater

example usage

# to share secret into 4 pieces of which at least 3 will be needed to get back the recipe

./grothe \
    -cookie_recipe.txt 
    1-/dev/urandom 2-/dev/urandom 
    1+cookie_piece1.dat 2+cookie_piece2.dat 3+cookie_piece3.dat 4+cookie_piece4.dat

# put recipe back together using 1, 2 and 4th piece

./grothe \
    1-cookie_piece1.dat 2-cookie_piece2.dat 4-cookie_piece4.dat
    +cookie_recipe_restore.txt

Limitations

Obfuscations

References


Creative Commons License

© Copyright 1984-2015, Leo Broukhis, Simon Cooper, Landon Curt Noll - All rights reserved
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.