Decryption of an 8-bit code

14 次查看(过去 30 天)
Katherine Brideau
Katherine Brideau 2013-3-27
I'm trying to crack a code that's concatenated ascii codes, encrypted by xor'ing each ascii code with an 8 bit key. Decoding it is apparently an xor operation, however I've hit a brick wall.
My algorithm is 1) create a decrypt code 2) xor each letter with code 3) translate back to a number 4) change number to letter 5) print out message
3,4, and 5 a straightforward, but I can't move past 1 and 2
My code so far is
encrypted = '11111111111111111011101111100000000100000000101000101000000001000100010111101001001010111010100011100101';
z = reshape(encrypted, length(encrypted)/8,8)
key = dec2bin(0:255,8)
Basically I'm going to use brute force to crack it, and split things off into groups of 8.
If anyone has any suggestions I would really appreciate it!
Thank you

回答(1 个)

Walter Roberson
Walter Roberson 2013-3-27
You cannot reliably break xor codes using brute force. You cannot, for example, determine whether the original source was
IBM
or
HAL
(as in 2001's HAL 9000 computer)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by