Cryptography

Post on 15-Apr-2017

27 views 0 download

Transcript of Cryptography

CRYPTOGRAPHY

Mrinalini SharmaM.Tech (ECE), 1st Sem.

00516414216

THREATS

SECURITY GOALS

CRYPTOGRAPHY

CRYPTOGRAPHY plays major roles in fulfilling this demand.

Greek word meaning “Secret Writing”.

Science & art of transforming messages to make them secure & immune to attacks.

COMPONENTS OF CRYPTOGRAPHY• Plaintext – Original message (message in its natural format readable by an

attacker).

• Ciphertext – Message altered to be unreadable by anyone. [ CIPHER refers to the encryption & decryption algorithms.]

• Key – Sequence that controls the operation and behavior of the cryptographic algorithm.

• Keyspace – Total number of possible values of keys in a crypto algorithm.

CRYPTOGRAPHY TYPES

1. SYMMETRIC-KEYAlso known as SECRET-KEY Cryptography.Same key is used for encryption and decryption i.e. shared

key.Main types –

SYMMETRIC-KEY CRYPTOGRAPHY

SUBSTITUTION CIPHERS• In this, letters/number/symbols of plaintext are replaced by

other letters/numbers/symbols.

e.g. A D, T Z 2 5, 3 6

TRANSPOSITION CIPHERS• In the transposition technique the positions of

letters/numbers/symbols in plaintext is changed with one another.

Plain text: MEET ME AFTER PARTYCipher text: TEMEEMEFAPTRYRATKey Usec: 421635

Data Encryption Standard (DES)• Developed by IBM.

• Plaintext is processed in 64-bit blocks.

• The DES algorithm is a careful and complex combination of two fundamental building blocks of encryption: – Substitution– Transposition

• DES uses only standard arithmetic and logical operations on numbers up to 64 bits long.– Transforms 64-bit input in a series of steps into a 64-bit output– The same steps are used to decrypt messages– Sender and receiver share the same key (Symmetric)

• Now considered to be insecure– Key size is 56 bits, considered to be too small

Data Encryption Standard (DES)

• 1st 64 bit plain text is handed over to initial permutation function.

• IP is performed over the plain text.• IP produces two halves of the permuted blocks left plain

text (LPT) & right plain text (RPT).• Now LPT & RPT goes 16 rounds of encryption process,

each with its own key.• Now LPT & RPT are rejoined and FINAL PERMUTATION

(FP) is performed on the combined block.• The result is 64 bit cipher text.

ADVANTAGES• DES is also an ANSI and ISO standard - anybody can

learn the details and implement it. • Hard to crack.

DISADVANTAGES• Software implementations of DES are slow.

TDES & AES• TDES– Triple DES – Use algorithm 3 times– 3 different keys (56-bits each)– 168 bits total (192 if parity bits are included)– Superceded by AES

• AES– Advanced Encryption Standard– Fixed block size of 128 bits– Key size can be 128, 192, or 256 bits

2. ASYMMETRIC-KEY

Also knowns as PUBLIC-KEY Cryptography.Sender & receiver use different keys for encryption &

decryption namely PUBLIC & PRIVATE respectively.Main algorithms –

RSA (Rivest, Shamir & Adleman)

Diffie - Hellman

ASYMMETRIC-KEY CRYPTOGRAPHY

THE RSA ALGORITHM• Published by Ron Rivest, Adi Shamir, and Len Adleman in

1978.• Best known and widely used public-key scheme.• Block cipher in which plaintext and ciphertext are integers

between 0 and n – 1 for some n.

RSA KEY GENERATION1) Select to prime numbers: p, q– Private, chosen

2) Calculate n = pq– Public, calculated

3) Calculate Φ(n) = (p-1)(q-1)

4) Select an integer e such that:– gcd(Φ(n), e) = 1 and 1 < e < Φ(n) – Public, chosen

5) Calculate d where d = e-1modΦ(n)– ed = 1 mod Φ(n) – Private, calculated

The keys generated are denoted:– KU = {e, n} (Public Key)– KR = {d, n} (Private Key)

RSA ENCRYPTION/DECRYPTION

• To encrypt a message M the sender:– Obtains public key of recipient KU={e,n} – Computes: C = Me mod n• Where 0≤M<n

• To decrypt the ciphertext C the owner:– Uses their private key KR={d,n} – Computes: M = Cd mod n

EXAMPLE1) Let p = 7 and q = 172) n = pq = 7 x 17 = 1193) Φ(n) = (p-1)(q-1) = 6 X 16 = 964) Let e = 5

– gcd(Φ(n), e) = gcd(96,5) = 1– 1 < 5 < 96

5) d = e-1 mod Φ(n)– Therefore, de = 1 mod 96– d = 77

• 77 x 5 = 385 = 4 x 96 + 1

KEY GENERATION :The two resulting keys are as follows:

– Public Key: KU = {e,n} = {5, 119}– Private Key: KR = {d,n} = {77, 119}

ENCRYPTION• To encrypt a message M, where M = 19:– C = Me mod n– 195 mod 119 = 2476099 mod 119– 2476099 / 119 = 20807 with a remainder of 66– Therefore, C = 66

DECRYPTION• M = Cd mod n• 6677mod 119 = (1.27 x 10140) mod 119• (1.27 x 10140) / 119 = (1.06 x 10138) with a remainder of 19• Therefore, M = 19

APPLICATIONS• Defense services• Secure data manipulation• E–commerce• Business transactions • Internet payment systems • User identification systems • Access control• Data security

CONCLUSION

By using of encryption techniques a fair unit of confidentiality, authentication, integrity, access control and availability of data is maintained.

THANK-YOU !!!