Caesar Chiper Programs (Encrypt – Decrypt)

This program is a program to encrypt a message or word using caesar cipher

mathematical notation
Let: C = ciphertext, P = plaintext, the encryption function mapping P to E, E (P) = C, and D the decryption function mapping C to P, D (C) = P

Substitution tables:
Pi: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Ci: D E F G H I J K L M N O P Q R S T U V W X  Y Z A B C

With each letter of the alphabet to encode integer as follows: A = 0, B = 1, …. Z = 25, then mathematically caesar cipher to encrypt the plaintext Pi Ci with the rules:
ci = E (Pi) = (Pi + 3) mod 26
and decrypting the ciphertext i be Pi rules: Pi = D (Ci) = (Ci – 3) mod26

Here are examples of c + + Output Program caesar cipher:

for the full program can be downloaded here

Advertisements

~ by nuryanisofia on April 14, 2012.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: