Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

IAS - Chapter 2 Half

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

Chapter-Two

Cryptography
Information Assurance and Security 2015 E.C
Basic Terminology
•Plaintext - original message , Unencrypted data
•Cipher text -coded message , encrypted data
•Cipher - an algorithm that can perform encryption or decryption.
-an algorithm for transforming plaintext to cipher text.
•Key – information used in cipher known only to sender/receiver
-is the essential piece of information that determines the output of a cipher.
encipher (encrypt) - converting plaintext to cipher text, the translation of data into a
secret code.
Basic Terminology
•Decrypt - recovering cipher text from plaintext (decipher)
-Converting cipher text into plan text.
•Cryptanalysis -the study of principles/ methods of deciphering
cipher text without knowing key.
-It is known as code breaking.
•. Cryptography –is the study of secret writing. Crypto means secret and graphy
means writing.
- Study of encryption and decryption principles/methods
•Cryptology - field of both cryptography and cryptanalysis
Cryptography

Cryptography has five ingredients:


• Plaintext
• Ciphertext
• Encryption algorithm
• Decryption algorithm
• Secret Key
Security depends on the secrecy of the key, not the secrecy of the algorithm.
Encryption
•Cryptographic systems are generally classified along 3 independent dimensions:

The Number of key they used:


• Symmetric key encryption
• Asymmetric key encryption

The type of operations used:


• Substitution
• Transposition

The way in which the plaintext is processed:


• Block cipher
• Stream cipher
Symmetric Encryption
•The term “symmetric key” is also referred private-key cryptography, single-key.

•It uses identical keys for encryption and decryption.

•Sender and recipient share a common key.

•Security depends on the secrecy of the key, NOT the secrecy of the algorithm.

•The exchange of secret keys can be difficult depending on the circumstances.

• It is also possible to encrypt the initial exchange of the secret keys.

•Examples of symmetric key algorithms include DES, 3DES, and AES.


Cont.…

Given
• P=Plaintext
• C=Ciphertext
• k=key shared by sender and receiver

C = EK (P) Encryption

P = DK (C) Decryption
Symmetric Encryption Model
Asymmetric Encryption

•It also called public key cryptography.

•Uses two keys, a "private" key and a "public key,“ to perform encryption and decryption.

• It is more secure than symmetric methods of encryption.

•Public-key, known by anybody, and can be used to encrypt messages, and verify
signatures.

•Private-key, known only to the recipient, used to decrypt messages, and sign (create)
signatures.

•Use of two keys has consequences in the areas of confidentiality, key distribution, and
authentication.
Public-Key Cryptography Principles

Essential Steps in Encryption


1. Each user generates a pair of keys to be used for encryption/decryption
2. Each user places public key in a public register or file
3. To send a private message to B, A encrypts the message using B’s public key
4. When B receives the message, B uses his/her private key to decrypt it. ( No
one else can decrypt it, without that private key.)
Asymmetric Encryption Model
Cont.…

Why Public-Key Cryptography?

Developed to address two key issues:


• Key distribution – how to have secure communications in general without
having to trust a Key Distribution Center with your key.
• Digital signatures – how to verify a message comes intact from the claimed
sender.
• In digital signatures ,The sender ”signs” a message with its private key.
Cont.…

Computationally Secure

An encryption scheme is said to be computationally secure if:


 The cost of breaking the cipher exceeds the value of the encrypted
information or
The time required to break the cipher exceeds the useful lifetime of the
information.
Classical ciphers

•A classical cipher is a cryptographic algorithms that have been used in the


security mechanisms through five-tuple (P,C,K,E,D) ingredients.

•It have two basic components.


 Substitution cipher

Transposition cipher
Substitution

•Substitution- “units” of plain text are replaced with cipher text.

•Letters are replaced by other letters.

•If the symbols in the plaintext are alphabetic characters, we replace one character
with another. For example, we can replace character A with D, and character T
with Z. If the symbols are digits (0 to 9), we can replace 3 with 7, and 2 with 6.

•Examples :coc  MUT

•Categorized as either Monoalphabetic or Polyalphabetic ciphers.


.
Monoalphabetic cipher

•A character/a symbol in the plaintext is always changed to the same


character/symbol in the cipher text regardless of its position in the text.

•For example, if the algorithm says that character A in the plaintext is changed
to character D, every character A is changed to character D.

•The relationship between characters in the plaintext and the cipher text is a
one-to-one relationship.
Cont.…

Is the cipher monoalphabetic

Plaintext : HELLO
Ciphertext : KHOOR
Solution: The cipher is monoalphabetic because both occurrences of L's are

encrypted as O's.

• Is the cipher monoalphabetic ?


Plaintext : HELLO
Cipher text : ABNZF
Additive Cipher

•The simplest monoalphabetic cipher.


 It is kwon as shift cipher
 It is also known as Caesar ciphers.

•Each letter in the plaintext is replaced by a letter fixed positions later in the alphabet.
Additive Cipher…

Then the algorithm can be expressed as follows:


For each plaintext letter p, substitute the ciphertext letter C:

 We define a mod n to be the remainder when a is divided by n.


• For example, 11 mod 7 = 4.

• C = E(3, p) = (p + 3) mod 26

A shift may be of any amount, so that the general Caesar encryption algorithm is

C = E(k, p) = (p + k) mod 26, where the key k takes on a value in the range 1 to
25.

The decryption algorithm is: p = D(k, C) = (C - k) mod 26


Additive Cipher…
• If it is known that a given ciphertext is a Caesar cipher, then a brute-force cryptanalysis
is easily performed:
• Simply try all the 25 possible keys.

• Three important characteristics of this problem enabled us to use a brute-force


cryptanalysis:

1. The encryption and decryption algorithms are known.

2. There are only 25 keys to try.

3. The language of the plaintext is known and easily recognizable.


Additive Cipher…

Example: Use the additive cipher with key =15 to encrypt the message “Hello”.
Soln. : We apply the encryption algorithm to the plaintext character by character

Plaintext : h  07 Encryption: (07+15)mod 26 Ciphertext: 22 W


Plaintext : e  04 Encryption: (04+15)mod 26 Ciphertext: 19  T
Plaintext : l  11 Encryption: (11+15)mod 26 Ciphertext: 00  A
Plaintext : l  11 Encryption: (11+15)mod 26 Ciphertext: 00  A
Plaintext : o  14 Encryption: (14+15)mod 26 Ciphertext: 03  D
So, the result is “WTAAD”
Additive Cipher…

By using the reverse decrypt algorithm, we can now decrypt the cyphertext
“WTAAD”.

The reason is that the encryption algorithm can be interpreted as “shift key
character down” and the decryption algorithm can be interpreted as “shift key
character up” .

Julius Caesar used an additive cipher to communicate with his officers.

For this reason, this cipher is also sometimes called as caesar cipher.
Polyalphabetic cipher

•Each occurrence of a character can have a different substitute.

•The relationship between a character in the plaintext to a character in the cipher


text is a one-to-many relationship.

• For example, character A could be changed to D in the beginning of the text, but
it could be changed to N at the middle.

•Example :
 Plaintext : MEET
Ciphertext : RING

You might also like