Presentation is loading. Please wait.

Presentation is loading. Please wait.

IM cipher code. Cipher model Substitution cipher – For cleartext character, substitute character in encipher table – For ciphertext character, substitute.

Similar presentations


Presentation on theme: "IM cipher code. Cipher model Substitution cipher – For cleartext character, substitute character in encipher table – For ciphertext character, substitute."— Presentation transcript:

1 IM cipher code

2 Cipher model Substitution cipher – For cleartext character, substitute character in encipher table – For ciphertext character, substitute character in decipher table

3 ASCII Table (first half)

4 Format of encryption table ASCIITextencrypt 97a D 98b ] 99c V 100d ? 101e * 102f G 103g 6 104h w 105i @ ASCIITextDecrypt 68Da 69E'7', 70F']', 71G'f', 72H',', 73I'E', 74J'F', 75K'p', 76L'Y',

5 Encipher Table char encr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 'b', '.', 0, 'c', '[', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'R', 'u', ',', 'q', '\t', 'Y', '\n', '\'', 'n', 's', 'v', 'e', 'H', 'o', 'N', 'M', 'r', '=', '0', ';', 'z', '/', '`', 'E', '\"', 'k', '&', '5', '>', 'i', 'p', ')', '$', '!', '2', 'O', '(', 'I', 'J', '%', 'Z', 'g', '\\', '{', 'h', '7', 'S', 'P', 'a', ' ', 'W', 'x', 'y', 'T', '+', '8', '-', 'L', '9', 'f', '#', 'F', '\r', 'B', '3', 'D', ']', 'V', '?', '*', 'G', '6', 'w', '@', '}', '|', 'C', 'l', '_', 'j', 'K', '^', '1', 't', 'Q', '<', 'U', 'd', 'm', ':', 'A', 'X', '\f', '4', '~', 0, 0, 0 };

6 Decipher Table char decr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, '$', '&', 0, '|', '^', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Q', 'A', '8', '\\', '@', 'G', ':', '\'', 'D', '?', 'e', 'V', '\"', 'X', '\n', '5', '2', 'r', 'B', '`', '}', ';', 'g', 'M', 'W', 'Z', 'y', '3', 'u', '1', '<', 'd', 'i', 'z', '_', 'l', 'a', '7', ']', 'f', ',', 'E', 'F', 'p', 'Y', '/', '.', 'C', 'O', 't', ' ', 'N', 'U', 'v', 'c', 'R', '{', '%', 'H', '\r', 'J', 'b', 'q', 'n', '6', 'P', '\t', '\f', 'w', '+', '[', 'I', 'L', '=', 'o', '9', 'm', 'x', '(', '-', '>', '#', '0', ')', 's', '!', '*', 'h', 'S', 'T', '4', 'K', 'k', 'j', '~', 0, 0, 0};

7 Basic code snippet while (fin.get(inchar)) { if (((int) inchar) < 32) //for debugging cout << "Read (" << (int)inchar << ") "; if (task == 'e') // we are encoding { outchar = encr[(int)inchar]; } else { outchar = decr[(int)inchar]; } fout << outchar; if (((int) inchar) < 32) //for debugging cout << ": Wrote " << outchar << endl; }

8 example [root@bridge ~]# psad -m /var/log/messages.1 --gnuplot --CSV-fields "dst:not192.168.10.0/24 dp:countuniq" -- gnuplot-graph points --gnuplot-xrange 0:10000 --gnuplot-file-prefix test1 [+] Entering Gnuplot mode... [+] Parsing iptables log messages from file: /var/log/messages.1 [+] Parsed 71992 iptables log messages. [+] Writing parsed iptables data to: test1.dat [+] Writing gnuplot directive file: test1.gnu [root@bridge ~]# gnuplot test1.gnu f1jjQ$]1@?6*R~FqRKtD?RolRMUD1M Cj6Ml*ttD6*tN=Roo6_<KCjQRooOx+o G@*C?tR,?tQ&_jQ=k0N=`"N=rNrM0zR ?K&Vj<_Q<_@^,Roo6_<KCjQo61DKwR Kj@_QtRoo6_<KCjQom1D_6*Rr&=rrrr Roo6_<KCjQoG@C*oK1*G@mRQ*tQ=.feFRI_Q*1@_6R%_<KCjQRlj?*NNN.fe FRaD1t@_6R@KQD]C*tRCj6Rl*ttD6*t RG1jlRG@C*&RMUD1MCj6Ml*ttD6*t N=.feFRaD1t*?RE=kk0R@KQD]C*tRCj6 Rl*ttD6*tN.feFR81@Q@_6RKD1t*?R @KQD]C*tR?DQDRQj&RQ*tQ=N?DQ.f eFR81@Q@_6R6_<KCjQR?@1*VQ@U *RG@C*&RQ*tQ=N6_<..f1jjQ$]1@?6* R~FqR6_<KCjQRQ*tQ=N6_<.


Download ppt "IM cipher code. Cipher model Substitution cipher – For cleartext character, substitute character in encipher table – For ciphertext character, substitute."

Similar presentations


Ads by Google