When the tides of life turn against you... And the current upsets your boat... Don't waste those tears on what might have been... Just lay on your back and float!...

Lab 3 ~Classic Cryptography~

Assalamualaikum w.b.t...

Lab 3 nie kami blajar Classic Cryptography... hmm... mase lab nie kiterog try la mengencrypt & mengdecrypt plaintext laaa... Vigenere Cipher, Caesar cipher bla bla blaaa... Aper yg perlu kite tau seperti:-

•Explain What is Symmetric and Asymmetric Cryptography
•Implementing Caesar Cipher for Symmetric Cryptography.
•Implementing Vigeneré Cipher for Symmetric Cryptography.

What is Symmetric and Asymmetric Cryptography?
Cryptography algorithm used in cryptosystem can be classified into two categories which is symmetric and asymmetric encipherment. 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.

Symmetric encipherment can be in form of substitution, transposition or both. In substitution encryption method alphabet (character) in the plaintext is always changed with another alphabet (character). Each character can be either change with one character (monoalphabetic) or multiple characters (polyalphabetic). Caesar cipher is an example of monoalphabetic cipher and Vigeneré cipher is an example of polyalphabetic.

Asymmetric encipherment involves two keys to encrypt and decrypt. These algorithms allow the key to be publicized, hence anyone can encrypt using the key, and the proper recipient who knows the decryption key can decrypt the message. The encryption key is called public key and the decryption key is called secret/private key. RSA algorithm is use to produce the public and private key.


Symmetric encipherment
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.



For an example the plain text in figure 4.2 below can be encrypted using key 3 to get the cipher text:-


A brute-force cryptanalysis is easily performed: by simply trying all the keys available.
The characteristics which enables the use of brute-force cryptanalysis:
1.The encryption and decryption algorithms are known
2.There are only 26 keys to try.
3.The language of the plaintext is known and easily recognizable. The pattern
is obvious.

Deciphering simple substitution cipher text.

1.By using key 9 encrypt the following phrase
•Information Technology Security
•The target is the building on the right of the zoo
•The Truck is heading toward the dock
2.The following cipher text which is intercepted by the Special Forces during a
routine surveillance on a terrorist headquarters. It was known that the cipher
text is an English text containing a word ‘FALL’. Decrypt the cipher text.




Vigeneré Cipher
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. We can refer to table below 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.




Encrypt and decrypt using vigeneré cipher
1.Encipher the message ‘CHAPTER 2 AUTHENTICATION AND BASIC CRYPTOGRAPHY ‘using
Vigenere cipher and the enciphering key ‘MONEY’.
2.The following ciphertext was intercepted by the MI6 Forces during a routine
surveillance on a terrorist headquarters. It is believe that the first cipher text
can be decrypted into
First ciphertext intercept


The plaintext


and the second ciphertext intercept is


As one of the cryptanalysis for MI6 you are assigned to decrypt the second cipher text using the first ciphertext and its plaintext.


Huhuhuhu.. lab nie lab yg paling aku suker.. syokk dowhh... even penin2 tue aku ske... Pulur gak la bijik mater ijauku inie.. hihihihii...So lepas nie settle kn la review question tue.. uhukksss...


alhamdulillah....


"When we have done what we can, God will do what we can't.."




1 komplen:

Amazing detail. You have posted a great amount of detail about classical cryptography scheme. The information is very useful for everyone who wants to learn about this process. Thanks for writing and sharing.
electronic signature

Post a Comment

Related Posts with Thumbnails