Saturday, October 27, 2012

Caesar Cipher Cryptography Technique & My Caesar Cipher Enc/Dec Script In PHP


Caesar cipher
is one of the simplest and most widely known encryption techniques.It is a type of substitution cipher in which each letter in the plain text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 3, A would be replaced by D, B would become E, and so on. The method is named after Julius Caesar, who used it in his private correspondence.As with all single alphabet substitution ciphers, the Caesar cipher is easily broken and in modern practice offers essentially no communication security.

Example:
The transformation can be represented by aligning two alphabets; the cipher alphabet is the plain alphabet rotated left or right by some number of positions. For instance, here is a Caesar cipher using a left rotation of three places (the shift parameter, here 3, is used as the key):
Plain:    ABCDEFGHIJKLMNOPQRSTUVWXYZ
Cipher:   DEFGHIJKLMNOPQRSTUVWXYZABC

When encrypting, a person looks up each letter of the message in the "plain" line and writes down the corresponding letter in the "cipher" line. Deciphering is done in reverse.
Ciphertext: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ
Plaintext:  the quick brown fox jumps over the lazy dog

I wrote 3 scripts in separated pages that will help beginners to do the CaesarCipher Encryption/Decryption/Breaking:

Caesar-Cipher-Encrypt.php
Caesar-Cipher-Decrypt.php
Caesar-Cipher-Breaking.php
you can download the zip file from:
https://docs.google.com/open?id=0B7tlKidWnTtWR01kTmpCc2dFRGc
for downloading the whole zip file, when the page loaded completely press "Ctrl + S" , otherwise it will show you  the files.

Social Networks Sharing