0% found this document useful (0 votes)
28 views105 pages

Revision Class

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views105 pages

Revision Class

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 105

SECURITY-ATTACKS

J. Immanuel Johnraja
Faculty in Computer Science and Engineering, KITS
HTTPS://WWW.THEHINDU.COM/BUSINESS/INDIA-SEES-375-CYBERATTACKS-EVERYDAY/ARTICLE33110725.ECE
DENIAL OF SERVICE
MASQUERADE
MAN-IN-MIDDLE ATTACK
SNOOPING
TRAFFIC ANALYSIS
REPUDIATION
PHISHING
COMPUTER SECURITY
CONCEPTS
18cs2005
COMPUTER SECURITY

The protection afforded to an automated information system in order to attain the applicable
objectives of preserving the
integrity,
availability, and
confidentiality
of information system resources.
INTEGRITY

Data integrity
Assures that information and programs are
changed only in a specified and authorized manner.

System integrity
Assures that a system performs its intended
function in an unimpaired manner.
AVAILABILITY

• Assures that systems work promptly and


service is not denied to authorized users.

• A loss of availability is the disruption of


access to or use of information or an
information system.
CONFIDENTIALITY

Data confidentiality A loss of confidentiality is the unauthorized


disclosure of information.
Assures that private or confidential
information is not made available or
disclosed to unauthorized individuals.
Privacy
Assures that individuals control or
influence what information related to them
may be collected and stored and by whom
and to whom that information may be
disclosed.
INTEGRITY/AVAILABILITY/CONFIDENTIALITY

Availability Confidentiality Integrity

Encrypted CD-ROM/DVD
Hardware Equipment is stolen/disabled
is stolen

Unauthorized copy of Working program is modified


Software Programs/codes are deleted
software causing it to do unintended task

Existing files are modified / new files


Data Files are deleted Unauthorized read of file
are fabricated

Messages are destroyed. Messages are read. Messages are modified, delayed,
Communication &
Communication lines are Traffic pattern of messages reordered or duplicated.
Network
disturbed observed False messages are fabricated
SECURITY SERVICES
J. Immanuel Johnraja
Faculty in Computer Science and Engineering, KITS
SECURITY SERVICES

• Authentication
• Access Control
• Data Confidentiality
• Data Integrity
• Non-repudiation
SECURITY MECHANISMS
J. Immanuel Johnraja
Faculty in Computer Science and Engineering, KITS
SECURITY MECHANISMS

Encipherment
• The use of mathematical algorithms to transform data into a form that is not readily intelligible.
Digital Signature
• Data appended to, or a cryptographic transformation of, a data unit that allows a recipient of the data unit
to prove the source and integrity of the data unit and protect against forgery.
Access Control Protocols
• A variety of mechanisms that enforce access rights to resources.
SYMMETRIC CIPHER
MODEL
J. Immanuel Johnraja
Faculty in Computer Science and Engineering, KITS
FEW TERMS

An original message ciphertext


Coded message cryptanalysis
Converting from plaintext to ciphertext plaintext
Restoring the plaintext from the ciphertext cryptology
Deciphering a message without any knowledge of the enciphering enciphering or encryption
details
The areas of cryptography and cryptanalysis together deciphering or decryption
FEW TERMS

An original message ciphertext


Coded message cryptanalysis
Converting from plaintext to ciphertext plaintext
Restoring the plaintext from the ciphertext cryptology
Deciphering a message without any knowledge of the enciphering enciphering or encryption
details
The areas of cryptography and cryptanalysis together deciphering or decryption
FEW TERMS

An original message ciphertext


Coded message cryptanalysis
Converting from plaintext to ciphertext plaintext
Restoring the plaintext from the ciphertext cryptology
Deciphering a message without any knowledge of the enciphering enciphering or encryption
details
The areas of cryptography and cryptanalysis together deciphering or decryption
FEW TERMS

An original message ciphertext


Coded message cryptanalysis
Converting from plaintext to ciphertext plaintext
Restoring the plaintext from the ciphertext cryptology
Deciphering a message without any knowledge of the enciphering enciphering or encryption
details
The areas of cryptography and cryptanalysis together deciphering or decryption
FEW TERMS

An original message ciphertext


Coded message cryptanalysis
Converting from plaintext to ciphertext plaintext
Restoring the plaintext from the ciphertext cryptology
Deciphering a message without any knowledge of the enciphering enciphering or encryption
details
The areas of cryptography and cryptanalysis together deciphering or decryption
SYMMETRIC CIPHER MODEL
SYMMETRIC CIPHER MODEL

Plaintext: This is the original intelligible message.

Encryption algorithm: Performs various substitutions and transformations on the plaintext.

Secret key: Value independent of the plaintext and of the algorithm. The exact substitutions
and transformations performed by the algorithm depend on the key.

Ciphertext: This is the scrambled message produced as output.

Decryption algorithm: Encryption algorithm run in reverse.


SYMMETRIC CIPHER MODEL
CRYPTOGRAPHY - CHARACTERISTICS

1. The type of operations used for transforming plaintext to ciphertext


substitution / transposition.

2. The number of keys used


symmetric, single-key, secret-key, or conventional encryption / asymmetric, two-key, or
public-key encryption.

3. The way in which the plaintext is processed


Block cipher / Stream cipher.
SUBSTITUTION CIPHER

Caesar Cipher
C = E(k, p) = (p + k) mod 26
p = D(k, C) = (C - k) mod 26

Plaintext: Karunya University

Ciphertext?
TRANSPOSITION CIPHER

Rail Fence cipher


TRADITIONAL BLOCK CIPHER STRUCTURE

A stream cipher is one that encrypts a digital data A block cipher is one in which a block of plaintext
stream one bit or one byte at a time. is treated as a whole and used to produce a
ciphertext block of equal length.
GENERAL N-BIT-N-BIT BLOCK SUBSTITUTION
FEISTEL CIPHER

• Substitution: Each plaintext element or group of elements is uniquely replaced by a


corresponding ciphertext element or group of elements.

• Permutation: A sequence of plaintext elements is replaced by a permutation of that


sequence. That is, no elements are added or deleted or replaced in the sequence, rather the
order in which the elements appear in the sequence is changed.
FEISTEL CIPHER

• In Diffusion, the statistical structure of the plaintext is dissipated into long-range statistics of
the ciphertext. This is achieved by having each plaintext digit affect the value of many
ciphertext digits.

• Confusion attempts to make the relationship between the statistics of the ciphertext and the
value of the encryption key as complex as possible.
FEISTEL CIPHER
FEISTEL CIPHER - CHOICE OF PARAMETER

• Block size
• Key size
• Number of rounds
• Subkey generation algorithm
• Round function F
DATA ENCRYPTION STANDARD
J. Immanuel Johnraja
Faculty in Computer Science and Engineering, KITS
DES
Inverse Initial Permutation
Initial Permutation (IP)
(IP–1)
SINGLE ROUND
OF DES
Expansion Permutation Permutation Function
(E) (P)
SINGLE ROUND
OF DES
F(R,K)
DES S-BOX
DES S-BOX
SINGLE ROUND
OF DES
Input Key Permuted Choice-1
Permuted Choice-2

Schedule of Left Shifts


THE STRENGTH OF DES

The Use of 56-Bit Keys


• With a key length of 56 bits, there are 256 possible keys, which is approximately 7.2 * 1016
keys.
• Brute Force attack is impossible?
• A single machine performing one DES encryption per microsecond would take more than a thousand years
to break the cipher.
• During 1977, Diffie and Hellman presented that the technology existed to build a parallel machine with 1
million encryption devices, each of which could perform one encryption per microsecond. This would
bring the average search time down to about 10 hours.
THE STRENGTH OF DES
THE STRENGTH OF DES

The Nature of the DES Algorithm


• Concern: possibility that cryptanalysis is possible by exploiting the characteristics of the
DES algorithm (Eight substitution tables, or S-boxes).
• The design criteria for these boxes were not made public.
• Suspicion that the boxes were constructed in such a way that cryptanalysis is possible for an
opponent who knows the weaknesses in the S-boxes.
• No one has so far succeeded in discovering the supposed fatal weaknesses in the S-boxes.
THE STRENGTH OF DES

Timing attacks
• Information about the key or the plaintext is obtained by observing how long it takes a given
implementation to perform decryptions on various ciphertexts.
• It exploits the fact that an encryption or decryption algorithm often takes slightly different
amounts of time on different inputs.
• DES appears to be fairly resistant to a successful timing attack.
Advanced Encryption Standard
J. Immanuel Johnraja
The AES Cipher - Rijndael
 It has 128/192/256 bit keys, 128 bit data
 An iterative rather than Feistel cipher
 processes data as block of 4 columns of 4 bytes
 operates on entire data block in every round
AES
Encryption
Process
AES Structure
 Data block of 4 columns of 4 bytes is state
 Key is expanded to array of words
 Has 9/11/13 rounds in which state undergoes:
1. byte substitution (1 S-box used on every byte)
2. shift rows (permute bytes between groups/columns)
3. mix columns (subs using matrix multiply of groups)
4. add round key (XOR state with key material)
AES
Structure
Some Comments on AES
1. key expanded into array of 32-bit words
• four words form round key in each round
2. 4 different stages are used as shown
3. only AddRoundKey uses key
4. each stage is easily reversible
5. decryption uses keys in reverse order
6. final round has only 3 stages
AES
Structure
Substitute Bytes
 A simple substitution of each byte
 uses one table of 16x16 bytes containing a permutation of all 256 8-
bit values
 each byte of state is replaced by byte indexed by row (left 4-bits) &
column (right 4-bits)
 eg. byte {95} is replaced by byte in row 9 column 5
 which has value {2A}
 designed to be resistant to all known attacks
Substitute Bytes
Substitute Bytes Example
AES
Structure
Shift Rows
 A circular byte shift in each
 1st row is unchanged
 2nd row does 1 byte circular shift to left
 3rd row does 2 byte circular shift to left
 4th row does 3 byte circular shift to left
 Decrypt inverts using shifts to right
Shift Rows
AES
Structure
Mix Columns
 Each column is processed separately
 Each byte is replaced by a value dependent on all 4 bytes in the
column
Mix Columns
Add Round Key
 XOR state with 128-bits of the round key
 Processed by column
 Designed to be as simple as possible
 requires other stages for complexity / security
Add Round Key
AES
Round
AES Key Expansion
 Takes 128-bit (16-byte) key and expands into
array of 44/52/60 32-bit words.
 Start by copying key into first 4 words.
 Then loop creating words that depend on
values in previous & 4 places back
 in 3 of 4 cases just XOR these together
 1st word in 4 has rotate + S-box + XOR round
constant on previous, before XOR 4th back
AES Decryption
 AES decryption is not identical to encryption since steps done
in reverse
AES
Decryption
PUBLIC KEY
CRYPTOGRAPHY
J. Immanuel Johnraja
PRIVATE-KEY CRYPTOGRAPHY

Traditional private/secret/single key cryptography uses one key.


Shared by both sender and receiver.
If this key is disclosed, communications are compromised.
Symmetric, parties are equal.
Does not protect sender from receiver forging a message & claiming is sent by sender.
PUBLIC-KEY CRYPTOGRAPHY

• Uses two keys – a public & a private key.


• Asymmetric since parties are not equal.
• Complements rather than replaces private key crypto.
WHY PUBLIC-KEY CRYPTOGRAPHY?

• Developed to address two key issues:


• Key distribution - how to have secure communications in general without having to trust a
KDC with your key.
• Digital signatures - how to verify a message comes intact from the claimed sender.
PUBLIC-KEY CRYPTOGRAPHY

• Public-key/two-key/asymmetric cryptography involves the use of two keys:


• A public-key, which may be known by anybody, and can be used to encrypt messages, and
verify signatures.
• A related private-key, known only to the recipient, used to decrypt messages, and create
signatures.
• Infeasible to determine private key from public
• Asymmetric because
• those who encrypt messages or verify signatures cannot decrypt messages or create
signatures.
PUBLIC-KEY CRYPTOSYSTEM - SECRECY
PUBLIC-KEY CRYPTOSYSTEM -
AUTHENTICATION
PUBLIC-KEY CRYPTOSYSTEM -
AUTHENTICATION & SECRECY
PUBLIC-KEY CRYPTOSYSTEM - USES

• Encryption/decryption: The sender encrypts a message with the recipient’s public key, and the recipient
decrypts the message with the recipient’s private key.
• Digital signature: The sender “signs” a message with its private key.
• Key exchange: Two sides cooperate to exchange a secret key for symmetric encryption.
PUBLIC-KEY REQUIREMENTS

1. It is computationally easy for a party B to generate a key pair (public key PUb, private
key PRb).
2. It is computationally easy for a sender A, knowing the public key and the message to be
encrypted, M, to generate the corresponding ciphertext:
C = E(PUb , M)
3. It is computationally easy for the receiver B to decrypt the resulting ciphertext using the
private key to recover the original message:
M = D(PRb , C) = D[PRb , E(PUb , M)]
4. It is computationally infeasible for an adversary, knowing the public key, PUb, to
determine the private key, PRb.
PUBLIC-KEY REQUIREMENTS

5. It is computationally infeasible for an adversary, knowing the public key, PUb,


and a ciphertext, C, to recover the original message, M.

6. The two keys can be applied in either order:


M = D[PUb, E(PRb, M)] = D[PRb, E(PUb, M)]
PUBLIC-KEY REQUIREMENTS

• Need a trapdoor one-way function


• One-way function has
• Y = f(X) easy
• X = f–1(Y) infeasible
• A trap-door one-way function has
• Y = fk(X) easy, if k and X are known
• X = fk–1(Y) easy, if k and Y are known
• X = fk–1(Y) infeasible, if Y known but k not known
• A practical public-key scheme depends on a suitable trap-door one-way function
RSA ALGORITHM
J. Immanuel Johnraja
Associate Professor, CSE, KITS
RSA ALGORITHM

• The RSA public key encryption algorithm was the first practical
implementation of public key encryption discovered.
• It remains the most used public key encryption algorithm today.
• It is named after the three researchers Ron Rivest, Adi Shamir and Len
Adleman who first published it.
RSA STEPS

1. Key Generation
2. Encryption
3. Decryption
RSA - KEY GENERATION

• Step 1. Select p, q; p and q both prime, p ≠ q

p = 17 and q = 11

• Step 2. Calculate n = p * q

Calculate n = pq = 17 × 11 = 187.

• Step 3. Calcuate φ(n) = (p - 1)(q - 1)

Calculate φ(n) = (p - 1)(q - 1) = 16 × 10 = 160.


RSA - KEY GENERATION

• Step 4. Select integer e. gcd (φ(n), e) = 1; 1 < e < φ(n)


choose e = 7.

• Step 5. Calculate d; d ≡ e-1 (mod φ(n))


Determine d such that d ≡ e-1 (mod 60) and d < 160.
The correct value is d = 23, because 23 × 7 = 161 = (1 × 160) + 1;

Public key PU = {e, n}  {7,187}

Private key PR = {d, n}  {23,187}


ENCRYPTION USING PUBLIC KEY

Plaintext: M < n
Ciphertext: C = Me mod n

Message M = 88
887 mod 187 = [(884 mod 187) × (882 mod 187) × (881 mod 187)] mod 187
881 mod 187 = 88
882 mod 187 = 7744 mod 187 = 77
884 mod 187 = 59,969,536 mod 187 = 132
887 mod 187 = (88 × 77 × 132) mod 187 = 894,432 mod 187
Ciphertext C = 11
DECRYPTION USING PRIVATE KEY

Ciphertext: C = 11
Plaintext: M = Cd mod n

1123 mod 187 = [(111 mod 187) × (112 mod 187) × (114 mod 187) × (118 mod 187) × (118 mod
187)] mod 187
111 mod 187 = 11
112 mod 187 = 121
114 mod 187 = 14,641 mod 187 = 55
118 mod 187 = 214,358,881 mod 187 = 33
1123 mod 187 = (11 × 121 × 55 × 33 × 33) mod 187 = 79,720,245 mod 187
Plaintext C = 11
RSA REQUIREMENTS

1. It is possible to find values of e, d, and n such that Med mod n = M for all M < n.
2. It is relatively easy to calculate Me mod n and Cd mod n for all values of M < n.
3. It is infeasible to determine d given e and n.
RSA SUMMARY

Private
SECURITY OF RSA

• Brute force: trying all possible private keys.


• Mathematical attacks: effort to factoring the product of two primes.
• Timing attacks: depend on the running time of the decryption algorithm.
• Hardware fault-based attack: inducing hardware faults in the processor that is generating digital signatures.
• Chosen ciphertext attacks: exploits properties of the RSA algorithm.
DIFFIE-HELLMAN KEY
EXCHANGE
J. Immanuel Johnraja,
Associate Professor, Computer Science and Engineering, KITS
DIFFIE-HELLMAN KEY EXCHANGE

• to enable two users to securely exchange a key that can then be used for subsequent symmetric encryption of
messages.
• depends for its effectiveness on the difficulty of computing discrete logarithms.
DISCRETE LOGARITHM

• Primitive root of a prime number p is one whose powers modulo p generate all the integers from 1 to p - 1.

i.e., if a is a primitive root of the prime number p, then the numbers a mod p, a2 mod p, ..., ap-1 mod p are distinct
and consist of the integers from 1 through p - 1 in some permutation.
ALGORITH
M
Prime number q = 353 and a primitive root of 353 is α = 3.

A and B select private keys XA = 97 and XB = 233,


respectively.

EXAMPLE Computation of public key


A computes YA = 397 mod 353 = 40.
B computes YB = 3233 mod 353 = 248.

Computation of common secret key


A computes K = (YB) X mod 353 = 24897 mod 353 = 160.
A

B computes K = (YA) X mod 353 = 40233 mod 353 = 160.


B
MAN-IN-THE-
MIDDLE
ATTACK

You might also like