Hiding Behind the Bill of Rights

chromatic on 2002-05-22T05:59:32

brencrypt.pl encrypts any file. It creates a self-extracting archive that requires a very special key in another file -- the text of the Bill of Rights.

"Self-extracting", in this case, means that you must have a recent Perl and my Crypt::CipherSaber module installed. (In fact, you ought to have the most recent, though unreleased, version, to avoid a silly warning.) To encrypt, pass the name of the file to run and the name of the output file. To decrypt a file, pass the name of the key file and, optionally, the name of the decrypted output file. You can also redirect STDOUT, if you're exceptionally daring.

There are a couple of limitations. First, the aforementioned module patch would be nice, but it's not ready. (In debugging, I found some inflexible bits in the module that should be fixed). Second, I'm not positive it writes binary files correctly. The most fatal flaw is that you need the exact text of the Bill of Rights I used, right down to the formatting. I'll fix this flaw first.

I'd point to the text I used, but that would be a circumvention device. Oh wait, did the first ten amendments of the Constitution of the United States of America just become illegal? Oops.


Deviious, devious!

VSarkiss on 2002-05-22T14:25:11

I love it!

Hm

pudge on 2002-05-23T04:33:25

I dunno, especially since you require certain formatting, it makes it a bit odd. I think maybe just using the First Amendment -- either all one line line, or else lenient with whitespace -- might be more fun.

Re:Hm

chromatic on 2002-05-23T04:48:19

Fixing the formatting is pretty easy. I just haven't taken the time to regenerate the initial state array. After that, it's just a couple of judicious tr/// commands to strip out whitespace and to force everything to lowercase.

As my roommate asked about this this morning, yes, Nick, it is a symmetric algorithm. If you have the state array, you can decrypt it. The point, however, is to make an auto-decrypting file without the state array. That way, you need the secret key.