[PATCH] Add xorpipe utility
Michael Conrad
mconrad at intellitree.com
Thu Sep 13 09:26:01 UTC 2012
On 9/12/2012 10:42 PM, jody at jodybruchon.com wrote:
> My rationale behind writing this simple utility is as follows: Moving data
> through a fully encrypted tunnel like SSH is too slow for me, so I use
> netcat/socat for moving large chunks of data between systems. I don't want the
> data to be easily identified and reproduced if it is somehow intercepted, though
> it's also not a major problem if someone goes through the trouble of decrypting
> it; thus, simple XOR encryption is good enough for my purposes and is also
> extremely fast. I'm sure someone else will find it useful, and given its
> minuscule size, it is of negligible cost to include.
I apologize for further sidetracking the conversation, but if I were
going to write a quick-n-dirty encryption tool I would pick a 32-bit int
and then XOR with a pseudo-random sequence generated from it. That would
at least give the attacker a mental challenge (unless they knew the
first 4 bytes of the data...) Maybe also add a salt parameter?
while (more_data) {
data[i]= data[i] ^ key ^ salt;
key= key * a + c;
}
(http://en.wikipedia.org/wiki/Linear_congruential_generator)
Integer multiplication is pretty cheap on most hardware.
-Mike
More information about the busybox
mailing list