0% found this document useful (0 votes)
3 views

Lecture 5

Uploaded by

MOHAMED HASSAN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Lecture 5

Uploaded by

MOHAMED HASSAN
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

CSU 07426 / ITU_07426

LECTURE 5
Computer Security
Technologies and Principles
The universal technique for providing
SYMMETRIC confidentiality for transmitted or
ENCRYPTION stored data is symmetric encryption.
SYMMETRIC ENCRYPTION

• Plaintext: This is the original message or data that is fed into the algorithm as input.
• Encryption algorithm: The encryption algorithm performs various substitutions and
transformations on the plaintext. Secret key: The secret key is also input to the
encryption algorithm. The exact substitutions and transformations performed by the
algorithm depend on the key.
• Ciphertext: This is the scrambled message produced as output. It depends on the
plaintext and the secret key. For a given message, two different keys will produce two
different ciphertexts.
• Decryption algorithm: This is essentially the encryption algorithm run in reverse. It
takes the ciphertext and the secret key and produces the original plaintext.
Attacks on symmetric encryption scheme

• Cryptanalysis: This type of attack exploits the characteristics of the algorithm to


attempt to deduce a specific plaintext or to deduce the key being used. If the attack
succeeds in deducing the key, the effect is catastrophic: All future and past messages
encrypted with that key are compromised.
• Brute-force attack: This type of attack try every possible key on a piece of ciphertext
until an intelligible translation into plaintext is obtained. On average, half of all
possible keys must be tried to achieve success. That is, if there are x different keys, on
average an attacker would discover the actual key after x/2 tries.
Symmetric Block Encryption Algorithms

• The most commonly used symmetric encryption algorithms are block ciphers.
• A block cipher processes the plaintext input in fixed-size blocks and produces a block
of ciphertext of equal size for each plaintext block.
• The algorithm processes longer plaintext amounts as a series of fixed-size blocks.
• The most important symmetric algorithms, all of which are block ciphers, are the Data
Encryption Standard (DES), triple DES, and the Advanced Encryption Standard (AES).
Symmetric Block Encryption Algorithms
MESSAGE AUTHENTICATION AND HASH FUNCTIONS

• Encryption protects against passive attack (eavesdropping). A different requirement is to


protect against active attacks (falsification of data and transactions). Protection against
such attacks is known as message or data authentication.
• A message, file, document, or other collection of data is said to be authentic when it is
genuine and came from its alleged source.
• Message or data authentication is a procedure that allows communicating parties to verify
that received or stored messages are authentic.
• The two important aspects are to verify that the contents of the message have not been
altered and that the source is authentic.
• We may also wish to verify a message’s timeliness (it has not been artificially delayed and
replayed) and sequence relative to other messages flowing between two parties.
MESSAGE AUTHENTICATION CODE

• One authentication technique involves the use of a secret key to generate a small
block of data, known as a message authentication code, that is appended to the
message. This technique assumes that two communicating parties, say A and B, share
a common secret key KAB.
• When A has a message to send to B, it calculates the message authentication code as
a complex function of the message and the key: MACM=F(KAB, M).
• The message plus code are transmitted to the intended recipient. The recipient
performs the same calculation on the received message, using the same secret key, to
generate a new message authentication code. The received code is compared to the
calculated code
ONE WAY HASH FUNCTION

• An alternative to the message authentication code is the one-way hash function. As with the
message authentication code, a hash function accepts a variable-size message M as input and
produces a fixed-size message digest H(M) as output.
• The length field is a security measure to increase the difficulty for an attacker to produce an
alternative message with the same hash value.
• Unlike the MAC, a hash function does not take a secret key as input.
• The message digest can be encrypted using symmetric encryption; if it is assumed that only the
sender and receiver share the encryption key, then authenticity is assured. The message digest
can also be encrypted using public-key encryption.
• The public-key approach has two advantages: It provides a digital signature as well as message
authentication, and it does not require the distribution of keys to communicating parties.
HASH FUNCTION REQUIREMENTS

1. H can be applied to a block of data of any size.


2. H produces a fixed-length output.
3. H(x) is relatively easy to compute for any given x, making both hardware and software implementations practical.
4. For any given code h, it is computationally infeasible to find x such that H(x)=h. A hash function with this property is referred to as
one-way or preimage resistant.
5. For any given block x, it is computationally infeasible to find y≠x with H(y)=H(x). A hash function with this property is referred to as
second preimage resistant. This is sometimes referred to as weak collision resistant. This implies that given a certain block of data
(x), it is extremely difficult, computationally speaking, to find another block of data (y) that is not the same as x but produces the
same hash value (H(y) = H(x)).
6. It is computationally infeasible to find any pair (x, y) such that H(x)=H(y). A hash function with this property is referred to as
collision resistant. This is sometimes referred to as strong collision resistant.
Note:
A hash function that satisfies the first five properties in the preceding list is referred to as a weak hash function. If the sixth property is
also satisfied, then it is referred to as a strong hash function.
Applications of Hash Functions
• We have discussed the use of hash functions for message authentication and for the
creation of digital signatures (the latter will be discussed in more detail in later
lectures). Here are two other examples of secure hash function applications:
Passwords:
• We will explain a scheme in which a hash of a password is stored by an operating
system rather than the password itself. Thus, the actual password is not retrievable by
a hacker who gains access to the password file. In simple terms, when a user enters a
password, the hash of that password is compared to the stored hash value for
verification. This application requires preimage resistance and perhaps second
preimage resistance.
Intrusion detection:
• Store the hash value for a file, H(F), for each file on a system and secure the hash
values (e.g., on a write-locked drive or write-once optical disk that is kept secure). One
can later determine if a file has been modified by recomputing H(F). An intruder
would need to change F without changing H(F). This application requires weak second
preimage resistance

You might also like