Random Obfuscation Tool
Overview
A program to abuse the fact that random computer data isn't truly random. Takes a file and can convert it back and forth to random data(That is different each time). The only thing you have to distribute is the generated data, no key of any sort is needed. Can also be used for general encryption by keeping a random amount of the beginning as a key.
Algorithm Description
Let m be the message of size ms
Let p be a known plaintext of size ps
Let r be psuedo-random data of size ms+ps generated with a starting seed of 0 to n
Then obfuscated data(O) is:
O = (p + m) xor (r)
and it can be recovered by:
for (i = 0..n)
m = rand(seed(i)) xor (O);
if( m starts_with p ) break;
Furthermore to make this an encryption scheme then:
Let k be a secret key obtained by taking a random number of bytes up to size b from the beginning of m such that it no longer contains p
Let y be O without k
Then O can be recovered by:
O = k + y
This works as encryption since it would now take O(b*n) or O(n^2) if b==n to crack. Assuming that n is large this is a moderately secure method since it would take a while to figure out, and an attacker would need to know plaintext further in the file.
Source Code
- rot.tar.gz -- Tarball of everything together
- rote.cpp -- Obfuscation code
- Usage: rote inputFilename outputFilename.rot
- rotd.cpp -- De-obfuscation code
- Usage: rotd inputFilename.rot outputFilename
- genKey.cpp -- Turn obfuscated data into an encrypted key and data pair
- Usage: genKey inputFilename.rot outputFile.enc outputFile.key
- mergeKey -- Very simple script to merge together a key and encrypted pair
- Usage: mergeKey inputFilename.enc inputFile.key outputFile.rot
- rotEncrypt -- Simple script to run everything together to create a key and encrypted data pair
- Usage: rotEncrypt fileName
- rotDecrypt -- Simple script to run everything together to decrypt a key and encrypted data pair.
- Usage: rotDecrypt endFileName
- makefile -- To compile everything
Comments(0)
2008-04-03 17:40:08
Add your comment:
Hardware
Software
- TAIM (Alpha Version): GHCI integration with vim
- CheaTorrent -- An evil BitTorrent client
- Self Modifying 2D Turing Automata
- Competing Conway Life Automata
- X11 Timelapse Desktop Video
- Colored Wolfram Automata With Sound Input
- Pseudo Video Feedback in Processing
- Haskell Cipher Saber
- Illegal FIlenames -- Windows and *nix
- Simple Perl SDL Music Keyboard (Updated)
- Image to Spectrogram
- Pastebin Hell
- OMGWTFRNG (OWR)
- OTP Enhancement : Failure Report
- Java Network File Transfer Tool
- AES Encrypted Filesystem Speeds
- Dual Message Encryption
- PHP Website
- Mp3 Splitting Script
- Random Obfuscation Tool
- Filesystem Speed Comparisons
- Java Based Web Server GUI