views:

231

answers:

1

Do you know of any other ciphers that performs like the ROT47 family ? My major requirement is that it'd be keyless. Thanks.

+2  A: 

Sounds like you might be looking for some "classical cryptography" solutions.

SUBSTITUTION CIPHERS are encodings where one character is substituted with another. E.g. A->Y, B->Q, C->P, and so on. The "Caesar Cipher" is a special case where the order is preserved, and the "key" is the offset. In the rot13/47 case, the "key" is 13 or 47, respectively, though it could be something like 3 (A->D, B->E, C->F, ...).


TRANSPOSITION CIPHERS are ones that don't substitute letters, but ones that rearrange letters in a pre-defined way. For example:

CRYPTOGRAPHY

may be written as

C Y T G A H
 R P O R P Y

So the ciphered output is created by reading the two lines left to right

CYTGAHRPORPY


Another property of rot13/47 is that it's REVERSABLE:

encode(encode(plaintext)) == plaintext

If this is the property you want, you could simply XOR the message with a known (previously decided) XOR value. Then, XOR-ing the ciphertext with the same value will return the original plaintext. An example of this would be the memfrob function, which just XORs a buffer with the binary representation of the number 42.


You also might check out other forms of ENCODINGS, such as Base64 if that's closer to what you're looking for.


!! Disclaimer - if you have data that you're actually trying to protect from anyone, don't use any of these methods. While entertaining, all of these methods are trivial to break.

Ben