Sie sind auf Seite 1von 29

CRYPTOGRAPHY

INTRODUCTION
Cryptography is the science of information security. The word is derived from the Greek kryptos, meaning hidden. Cryptography components:Plain Text Cipher Text Encryption Decryption
BACK HOME NEXT

Plaintext : It is original intelligible message ,


before being transformed .The data are not encrypted. Ciphertext : After the message is transformed . The data are encrypted. Alice : Alice is the person who needs to send secure data. Bob : Bob is the recipient of the data. Eve : Eve is the person who somehow disturbs the communication between Alice and Bob.
BACK HOME NEXT

DATA FLOW DIAGRAM


PLAIN TEXT
EVE PLAIN TEXT

ENCRYPTION

DECRYPTION

SENDER

CIPHER TEXT

RECEIVER

BACK

HOME

NEXT

ENCRYPTION
It is the process in which plaintext or data is
converted into unintelligible form by means of a reversible translation, based on a translation table or algorithm .
Original Text Key Encrypted Text

+
Encryption
BACK HOME NEXT

DECRYPTION
It is the proces in which encrypted text or data
(called ciphertext) is translated back into the original text or data (called plaintext).

Encrypted Text
+

Key
=

Original Text

Decryption
BACK HOME NEXT

ALGORITHMS
Symmetric Encryption(Conventional Encryption) Asymmetric Encryption(Public-key Encryption)

BACK

HOME

NEXT

Symmetric Encryption
Same algorithm with same key(secret key) is
used for encryption and decryption. Sender and receiver must share the algorithm and the key.
Secret key
Ciphertext

Plaintext

Encryption

Decryption

Plaintext

BACK

HOME

NEXT

Secret-Key Problem?

All keys need to be replaced, if one key is compromised. Not practical for the Internet environment. On the other hand, the encryption speed is fast. Suitable to encrypt your personal data.

BACK

HOME

NEXT

Symmetric encryption algorithms


Algorithm Name Blowfish DES IDEA RC2 RC4 RC5 Triple DES
BACK HOME NEXT

Key Length (bits) Up to 448 56 128 Up to 2048 Up to 2048 Up to 2048 192

DES Algorithm
The data encryption standard (DES) was developed in the 1970s by the NATIONAL BUREAU OF STANDARDS (NBS) with the help of the NATIONAL SECURITY AGENCY (NSA). Most widely used encryption algorithm until recently. Exhibits the classic Feistel Structure. Uses a 64-bit block and a 56-bit key.
BACK HOME NEXT

Asymmetric encryption
One algorithm is used for encryption and decryption with a pair of keys, one for encryption and one for decryption. Sender and receiver must each have one of the matched pair of keys(not the same one).
Public key Encryption Ciphertext Private key Decryption

Plaintext

Plaintext

BACK

HOME

NEXT

Public-Private Encryption
Public key Public key stored in the directory First, create public and private key Public Key Directory

Private key Public Key Private key Private key stored in your personal computer

BACK

HOME

NEXT

Message Encryption (User A sends message to User B)


Public Key Directory User Bs Public Key

Text Encryption User A

Encrypted Text

BACK

HOME

NEXT

Decryption with your Private key


Encrypted Text
Private key stored in your personal computer

User B

User Bs Private key


Decryption

Original Text

BACK

HOME

NEXT

Asymmetric algorithms
Algorithm Name DSA El Gamal RSA Diffie-Hellman Key Length (bits) Up to 448 56 128 Up to 2048

BACK

HOME

NEXT

RSA Algorithm
Published in the paper A Method for Obtaining Digital Signatures and Public-Key Cryptosystems in 1977 by Ron Rivest, Adi Shamir and Len Adleman. Most widely accepted and implemented generalpurpose approach to public-key encryption. Block cipher scheme in which the plaintext and cipher text are integers between 0 and n-1 for some n(1024 bits).
BACK HOME NEXT

Key Generation
Choose two distinct prime numbers p and q. For security purposes, the prime integers p and q should be chosen uniformly at random and should be of similar bit-length.

Compute n = pq.
n is used as the modulus for both the public and private keys.

Compute (pq) = (p 1)(q 1). ( is Euler's


totient function).
BACK HOME NEXT

CONTINUED

Choose a small integer e, such that 1<e< (n). e is coprime to (n) i.e GCD(e,(n)).

Determine d which satisfies the congruence relation: de=1(mod (n)), Where d< (n).

Publish their public encryption key: PU={e,n}. Keep secret private decryption key: PR={d,n}.
BACK HOME NEXT

Encryption
M C Plaintext, Ciphertext M<n

C=Me mod N

Decryption
M=Cd mod N
BACK HOME NEXT

RSA Example
Select primes: p=7 and q=19. Compute n = p * q = 7 * 19 = 133. Compute (n)=(p1)(q-1)=618=108. Select e such that GCD(e,108)=1 for e=2, GCD(2,108)=2 (no) for e=3, GCD(3,108)=3 (no) for e=4, GCD(4,108)=4 (no) for e=5, GCD(5,108)=1 (yes!) Thus, choosing e=5.
BACK HOME NEXT

CONTINUED

Determine d: de mod (n)=1 and d < (n). this is equivalent to de=1+k(n). where k is any integer. for k=0, d=1/5 (no) for k=1, d=109/5 (no) for k=2, d=217/5 (no) for k=3, d=325/5 =65 (yes!) Resulting keys:
Public Key PU={e,n}={5,133}. Private Key PR={e,n}={65,133}.

BACK

HOME

NEXT

CONTINUED

Given Message, M=88. Encryption:C=Me mod N =885 mod 133 =5277319168 mod 133 =65. Decryption:-

M=Cd mod N =6565 mod 133


BACK HOME NEXT

CONTINUED

=65*(65)64 mod 133 =65* (652)32 mod 133 =65* (4225)32 mod 133 =65* (4225 mod 133)32 mod 133 = 65* (102)32 mod 133 = 65* (1022)16 mod 133 = 65* (10404 mod 133)16 mod 133 = 65* (30)16 mod 133 = 65* (900 mod 133)8 mod 133 =65* (102)8 mod 133
BACK HOME NEXT

CONTINUED

= 65* (1022)4 mod 133 = 65* (10404 mod 133)4 mod 133 = 65* (30)4 mod 133 = 65* (900 mod 133)2 mod 133 = 65* (102)2 mod 133 = 65* 10404 mod 133 =676260 mod 133 =88 (Original Message)

BACK

HOME

NEXT

RSA Security

Three approaches to attacking RSA:


brute force key search (infeasible given size of numbers) mathematical attacks (based on difficulty of computing (N), by factoring modulus N) timing attacks (on running of decryption)

Advantages
Increased security and convenience. Provide digital signatures that cannot be repudiated. Best used in multi-user environment.

Disdvantages
About 1000 times slower than DES. Computational cost is high.

Comparison
SYMMETRIC ENCRYPTION
Same algorithm with the same key is used for encryption and decryption. Sender and receiver must share the algorithm and the key. Key must be kept secret. Faster as compared to asymmetric encryption. Generally more secure and less computationally less expensive . Best used for digital signatures and for protecting DES keys.

ASYMMETRIC ENCRYPTION
One algorithm is used for encryption and decryption with a pair of keys, one for encryption and other for decryption. Sender and receiver must each have one of the matched pair of keys(not the same one). One of the two keys must be kept secret. About 1000 times slower than symmetric encryption. Less secure and computational cost is relatively high. Best used for Bulk data encryption .

BACK

HOME

NEXT

Das könnte Ihnen auch gefallen