You are on page 1of 18

Cryptography

BY : Suraj Kumar Awasthi Pranjal Vyas

BY :-

Suraj Awasthi Pranjal Vyas

Introduction Introduction
What is cryptography?

Why is it required?
Where is it used ? How it is done?

Facts About Cryptography

Julius Caesar used substitution cryptography to

communicate with his generals ( 50 B.C.) British and French forces used cryptography in world war I to communicate.(1941) Germans developed Enigma machine which was later used in world war II Japanese designed Purple machine for encryptions again used for World War II.

Ciphers
Ciphers

In cryptography, a cipher (or cypher)

is an algorithm for performing encryption or decryption well-defined It is also called encipherment. Conversion of plain text to code.

Continued

Caesar cipher
Ceasar Cipher

Keys Keys
In cryptography, a key is a piece of information

(a parameter) that determines the functional output of a cryptographic algorithm or cipher. Without a key, the algorithm would produce no useful result. In encryption, a key specifies the particular transformation of plaintext into ciphertext, or vice versa during decryption Generally asymmetric system has a key pair , the pair consist of public key and private key.

Types of Cipher

Stream based ciphers : In cryptography, a stream cipher is a symmetric

key cipher where plaintext digits are combined with a pseudorandom cipher digit stream (keystream).

Plaintext digit is encrypted one at a time with

corresponding digit of keystream, to give a digit of the cyphertext stream.


Eg:- Text= hello key=abcde h=8 , a=1 ciphertext=8+1=9=i
hence hello becomes igopt

Continued.
Block Ciphers: Substitution Substitution cipher generally assign value to each

character and the values of the characters are used for writing a message.
E.g. A -> E, B -> R, C -> Q,

Transpositioning In this we just reposition the character which appears

in a word .
E.g. Plaintext = HELLO WORLD H W E O L R L L O D Ciphertext = HWEOLRLLOD

Steganography
Stenography is a art of writing hidden messages

in such a way that no one , apart from the sender and the intended recipient. Stenography hold advantage against plain cryptography. A stenographic message may appear as just a plain text, picture , hence it avoids suspicions Whereas a cryptographic message though is gibberish, it always set a suspicion of being a cryptic message.

Facts of steganography:-

Facts of Steganography Hidden messages within wax tablets.


Hidden messages on messenger's body . The United States government claimed the al-

Qaeda organization use steganography


They send messages through websites and

newsgroups.

Network security
Transport Layer Security (TLS) and its

predecessor, Secure Sockets Layer (SSL), are cryptographic protocols that provide communication security over the Internet. It generally use handshake method to establish a connection

Establishing a Connection

Connection , request and selection. Digital certification. Validation of certificate.

Session key
Connection established

Cryptanalysis
Brute force Trying all key values in the key space. Dictionary Attack Find plaintext based on common words. Social Engineering Humans are the weakest link. Frequency Analysis Guess values based on frequency of occurrence. Replay Attack Repeating previous known values. Factoring Attacks Find keys through prime factorization. Known Plaintext Format or content of plaintext available . Temporary Files May contain plaintext.

DES
DES is a block cipher--meaning it operates on plaintext blocks of a

given size (64-bits) and returns cipher text blocks of the same size. Thus DES results in a permutation among the 2^64 possible arrangements of 64 bits, each of which may be either 0 or 1. Each block of 64 bits is divided into two blocks of 32 bits each, a left half block L and a right half R.

eg:- M = 0123456789ABCDEF
M = 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 L = 0000 0001 0010 0011 0100 0101 0110 0111 R = 1000 1001 1010 1011 1100 1101 1110 1111 K = 133457799BBCDFF1. K = 00010011 00110100 01010111 01111001 10011011 10111100 11011111 11110001

RSA
RSA stands for Ron Rivest, Adi Shamir and Leonard

Adelman, who first publicly described it in 1978.


Steps

1. Choose two distinct prime numbers, viz. p and q 2.Compute n=p*q. 3.Compute the totient of the product as (n)=(p-1)(q1)

4.Choose any number e such that 1<e<n. 5.Compute d such that d=e(mod (n)). 6.For encryption c=m^e(mod (n)) 7.For decryption m=c^d(mod (n))

You might also like