December 2010

You are browsing the site archives by month.

Rail-Fence Cipher

Rail-Fence Cipher is one of the simplest encryption method. The method just write down the next every character diagonally up and down. For example if we encrypt “I Made Krisna” with 4 rail it will look like ( dot means null):

 I  .  .  .  .  .     .  .  .  .  .  a  .  .  .  .  .  i  .  .  .  .  .
 .     .  .  .  e  .  K  .  .  .  n  .     .  .  .  h  .  a  .  .  .  a
 .  .  M  .  d  .  .  .  r  .  s  .  .  .  W  .  d  .  .  .  s  .  r  .
 .  .  .  a  .  .  .  .  .  i  .  .  .  .  .  i  .  .  .  .  .  t  .  .

Then the ciphertext can be created with reading it normally line by line. And the result of ciphertext:

I ai eKn haaMdrsWdsraiit

Now for decryption algorithm, many way to decrypt this cipher text but there is no standard like encrypting method so i use my own method to decrypt. The main idea is creating the same pattern with encrypting algorithm but the elements of rail-fence is not the character but the index of cipher text on plain text.

 1  .  .  .  .  .  7  .  .  .  .  . 13  .  .  .  .  . 19  .  .  .  .  .
 .  2  .  .  .  6  .  8  .  .  . 12  . 14  .  .  . 18  . 20  .  .  . 24
 .  .  3  .  5  .  .  .  9  . 11  .  .  . 15  . 17  .  .  . 21  . 23  .
 .  .  .  4  .  .  .  .  . 10  .  .  .  .  . 16  .  .  .  .  . 22  .  .

Then we can create a sequence that will reordering the location of cipher text to plain text as:

 I     a  i     e  K  n     h  a  a  M  d  r  s  W  d  s  r  a  i  i  t
 1  7 13 19  2  6  8 12 14 18 20 24  3  5  9 11 15 17 21 23  4 10 16 22

 I     M  a  d  e     K  r  i  s  n  a     W  i  d  h  i  a  s  t  r  a
 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

Support Earth Hour 2011

Proudly Committed to Earth Hour 2011Earth Hour 2011. an hour from a year we turn off our own electricity, give it time to rest and save the energy of the earth. Start on our own, Saturday, 26 March 2011 8:30 PM for an hour we save the energy. If you want more, the simplest way is spread out the Earth Hour to your friends to make bigger smile of our earth.

More Information please visit Earth Hour official site : http://www.earthhour.org

Read More →