Decryption of an 8-bit code
4 ビュー (過去 30 日間)
古いコメントを表示
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
2013 年 3 月 27 日
You probably want
z = reshape(encrypted .', 8, length(encrypted)/8).' ;
回答 (1 件)
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)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!