You are on page 1of 19

Cryptography

Submitted To: Sukrati Agrawal By:Anshul Tayal

Submitted

Overview
Introduction to cryptography and cryptanalysis Definition of Cryptography Historical ciphers Caesar Cipher Stream ciphers and cipher modes

Introduction
Cryptography is the practice and study of techniques for secure communication in the presence of third parties (called adversaries). it is about constructing and analyzing protocols that overcome the influence of adversaries. and which are related to various aspects in information security such as data confidentiality, data integrity, authentication

Definitions
Cryptosystem
Transforms plaintext into ciphertext using a key ciphertext unintelligible without knowledge of key

Cryptography
Cryptology (design of cryptosystems) + cryptanalysis (study of cryptosystems)

Always go hand in hand

Warning!
A little knowledge is a dangerous thing
Very true in cryptography

Basic Terminologies
Plaintext A message in its natural format readable by an attacker Cipher text Message altered to be unreadable by anyone except the intended recipients Key Sequence that controls the operation and behavior of the cryptographic algorithm Key space Total number of possible values of keys in a crypto algorithm

Basic Terminologies

Cryptography uses Encryption, the conversion of information from a readable state to apparent nonsense. the decoding technique(Decryption) needed to recover the original information

Historical Ciphers
Caesar cipher

Caesar Cipher
More formally:
Encrypt(Letter, Key) = (Letter + Key) (mod 26) Decrypt(Letter, Key) = (Letter - Key) (mod 26)

Encrypt(NIKITA, 3) = QLNLWD Decrypt(QLNLWD, 3) = NIKITA

Attacks
Ciphertext only attack:
Recover plaintext knowing only the ciphertext

Ciphertext:
HSPAA SLRUV DSLKN LPZHK HUNLY VBZAO PUN

Frequency analysis
HSPAA SLRUV DSLKN LPZHK HUNLY VBZAO PUN Find most frequent letters
4 times: L 3 times: A, H, N, P, S, U

Guess: Decrypt(L) = E
Key = L-E = 7 Decrypt(HSPAA SLRUV DSLKN LPZHK HUNLY VBZAO PUN, 7) = ALITT LEKNO WLEDG EISAD ANGER OUSTH ING

Brute force
Trying all key values in the key space. Cipher text = IGKYGXOYOTYKIAXK
Decrypt(IGKYGXOYOTYKIAXK, 1) = HFJXFWNXNSXJHZWJ Decrypt(IGKYGXOYOTYKIAXK, 2) = GEIWEVMWMRWIGYVI Decrypt(IGKYGXOYOTYKIAXK, 3) = FDHVDULVLQVHFXUH Decrypt(IGKYGXOYOTYKIAXK, 4) = ECGUCTKUKPUGEWTG Decrypt(IGKYGXOYOTYKIAXK, 5) = DBFTBSJTJOTFDVSF Decrypt(IGKYGXOYOTYKIAXK, 6) = CAESARISINSECURE

Vigenere cipher
A different Caesar cipher per letter MORESECURETHANCAESAR (Cipher text) + SECRETSECRETSECRETSE (Key) = FTUWXYVZUWYBTSFSJMTW
M (13) + S (19) = F (6) mod 26 O (15) + E (5) = T (20) mod 26 ...

Substitution cipher
Each letter gets mapped to another letter
E.g. A -> E, B -> R, C -> Q, ...

Whats the key space?


26!

Cryptogram puzzles in newspapers


How do you solve them?

Permutation Cipher
Rearrange letters instead of substituting them E.g.
Plaintext = HELLO WORLD

Ciphertext = HWEOLRLLOD

H E L L O

W O R L D

Plaintext

Ciphertext

You might also like