LAB 3 - Classic cryptography

During this lab, we will implement the Caesar Cipher and Vigenere Cipher for Symmetric Cryptography.

As in the previous lecture, we already know that cryptography is divided into 2 main categories which is symmetric and asymmetric. In symmetric encipherment, plaintext is encrypted and decrypts using the same key whereas asymmetric encipherment is using different keys to encrypt and decrypt a plaintext.


Below is an example of symmetric encipherment using Caesar Cipher

The Caesar Cipher is formed by shifting the letters of the original alphabet. For example by replacing each letter of the alphabet with the letter three places down the alphabet. It is monoalphabetic as only one letter in plaintext is exchanged for one letter of ciphertext.


Plaintext alphabet 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

Ciphertext key D E F G H I J KLM NO P Q RS T U V W X Y Z A B C

A caesar cipher with a key 3


For an example the plain text below can be encrypted using key 3 to get the cipher text


THE ATTACK TONIGHT START AT EIGHT, REGROUP AT STATION A

Plaintext


WKHDWWDFNWRQLJKWVWDUWDWHLJKWUHJURXSDWVWDWLRQD

Ciphertext


Example of symmetric cryptography using Vigenere Cipher


Vigenere table

The cipher text encrypted using Caesar cipher method is easily broken by using a brute force attack. An attacker can easily try every combinations of character to break the code as the number of possibility is just 26. In order to improve the deciphering process we can used the vigeneré cipher method. The Vigenère cipher is a method of encrypting alphabetic text by using a series of different Caesar ciphers based on the letters of a keyword. It is a simple form of polyalphabetic substitution. You can refer to the Vigenere table for making it easier to encrypt a plaintext using this method.

A key is needed to encrypt a plaintext; a key can be a word or a phrase. To have a strong cipher text it is advised to use different key on each encryption. This will prevent from a brute force attack on a second message if the first message has been intercepted.


Vigenere Cipher




LECTURE 3: Modern cryptography

The topic covered in this lecture are:

  • Modern cryptography algorithm
  • Block and stream
  • DES
  • AES
  • MAC
  • Digital Signature, RSA

DES
* Provides a high level of security
* The security depends on keys, not the secrecy of the algorithm
* The security is capable of being evaluated
* The algorithm is completely specified and easy to understand
* It is efficient to use and adaptable
* Must be available to all users
* Must be exportable




 

©2009 W0rLD of CoMputer ScieNce | by TNB