PDA

View Full Version : a simple substitution cipher or not?


dion
February 26th, 2010, 10:04
Hi,

just found kind of substitution cipher type (i am quite sure it is substitution), but as i see, substitution cipher like ROT13 use the ascii hex in that range too (if the range is A..Z, then it still using that ascii hex range). but what i found is using another hex range (from 00 ...).

i.e. input :
ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz

output:
1B 18 19 1E 1F 1C 1D 12 13 10 11 16 17 14 15 0A 0B 08 09 0E 0F 0C 0D 02 03 00 7A 3B 38 39 3E 3F 3C 3D 32 33 30 31 36 37 34 35 2A 2B 28 29 2E 2F 2C 2D 22 23 20

i knew its kind of being read back and forth every 2 sequence, kind of big end<>little end thing. anyone know what cipher is this?

disavowed
February 26th, 2010, 21:37
If that mapping is constant, then yes, it's just a substitution cipher.

dion
February 26th, 2010, 23:50
i was doubting it'd be a substitution cipher, because the routine used in reading a large file, which is, afaik, would be slowing things down.
and i was right, it turn out that this is just a simple xor. well, my bad. thanks

sikke
February 27th, 2010, 10:11
Looks indeed like xor with 'Z' = 0x5A.
This is a substitution cipher, indeed, but of a simple kind.