2 Week
2 Week
Security
(Securty of Computer Systems)
Prof. Dr. Hasan Hüseyin BALIK
(2nd Week)
Outline
• 2. Computer security technology and
principles
—2.1. Cryptographic Tools
—2.2. User Authentication
—2.3 Access Control
—2.4 Database and Data Center Security
—2.5 Malicious Software
—2.6. Denial-of-Service Attacks
—2.7 Intrusion Detection
—2.8 Firewalls and Intrusion Prevention Systems
2.1. Cryptographic Tools
2.1. Outline
• Confidentiality with Symmetric Encryption
• Message Authentication and Hash Functions
• Public-Key Encryption
• Digital Signatures and Key Management
• Random and Pseudorandom Numbers
Symmetric Encryption
• The universal technique for providing confidentiality
for transmitted or stored data
• Also referred to as conventional encryption or
single-key encryption
• Two requirements for secure use:
• Need a strong encryption algorithm
• Sender and receiver must have obtained copies
of the secret key in a secure fashion and must
keep the key secure
Secret key shared by Secret key shared by
sender and recipient sender and recipient
K K
Transmitted
X ciphertext
Y = E[K, X] X = D[K, Y]
Plaintext Plaintext
Encryption algorithm Decryption algorithm
input output
(e.g., DES) (reverse of encryption
algorithm)
Strength concerns:
Concerns about the algorithm itself.
DES is the most studied encryption
algorithm in existence
No one has so far reported a fatal weakness in DES.
Concerns about the use of a 56-bit key
The speed of commercial off-the-shelf processors
makes this key length woefully inadequate
Triple DES (3DES)
⚫ The life of DES was extended by the use of triple DES
⚫ Repeats basic DES algorithm three times using either
two or three unique keys
⚫ First standardized for use in financial applications in
ANSI standard X9.17 in 1985
⚫ Attractions:
⚫ 168-bit key length overcomes the vulnerability to brute-force
attack of DES
⚫ Underlying encryption algorithm is the same as in DES
⚫ Drawbacks:
⚫ Algorithm is sluggish in software
⚫ Uses a 64-bit block size
Advanced Encryption
Standard (AES)
Needed a NIST called for Selected
replacement for proposals for a Rijndael in
3DES new AES in 1997 November 2001
Should have a security In a first round of
strength equal to or evaluation, 15 proposed
better than 3DES algorithms were
accepted
Significantly improved
3DES was not efficiency
A second round
reasonable for narrowed the field to 5
long term use algorithm
Symmetric block cipher
Published as
128 bit data and
128/192/256 bit keys FIPS 197
Comparison of Three Popular Symmetric
Encryption Algorithms
Encryption
b b b
K Encrypt K Encrypt K Encrypt
b b b
C1 C2 Cn
C1 C2 Cn
Decryption
b b b
K Decrypt K Decrypt K Decrypt
b b b
P1 P2 Pn
Key Key
K K
k kk
Plaintext Ciphertext Plaintext
byte stream byte stream byte stream
M ENCRYPTION C DECRYPTION M
Stream Cipher
• Processes the input elements continuously
• Produces output one element at a time
• Primary advantage is that they are almost always faster
and use far less code
• Encrypts plaintext one byte at a time
• Pseudorandom stream is one that is unpredictable without
knowledge of the input key
Message Authentication
Protects against
active attacks
•Contents have not been
Verifies received altered
message is •From authentic source
•Timely and in correct
authentic sequence
Can use
•Only sender and receiver
conventional share a key
encryption
Message Authentication
Without Confidentiality
• Message encryption by itself does not provide a secure
form of authentication
• It is possible to combine authentication and
confidentiality in a single algorithm by encrypting a
message plus its authentication tag
• Typically message authentication is provided as a
separate function from message encryption
• Situations in which message authentication without
confidentiality may be preferable include:
• There are a number of applications in which the same message is
broadcast to a number of destinations
• An exchange in which one side has a heavy load and cannot afford the
time to decrypt all incoming messages
• Authentication of a computer program in plaintext is an attractive service
MAC
Transmit algorithm
Compare
MAC
algorithm
MAC
Message
Message
Message
H
Compare
H K K
E D
(a) Using symmetric encryption
Message
Message
Message
H
Compare
H PRa PUa
E D
(b) Using public-key encryption
K K
Message
Message
Message
H
K K
Compare
H
Cryptanalysis Passwords
•Exploit logical SHA was developed •Hash of a password is
weaknesses in the NIST and published in stored by an operating
algorithm system
1993
Alice's
public key
ring
Joy
Ted
Mike Bob
X=
X Transmitted D[PUb, Y]
ciphertext
Y = E[PRb, X]
Plaintext Plaintext
Encryption algorithm Decryption algorithm
input output
(e.g., RSA)
Digital
Provides only a digital Cannot be used for
Signature signature function with
SHA-1
encryption or key
exchange
Standard (DSS)
Elliptic curve
Security like RSA, but with
cryptography much smaller keys
(ECC)
Applications for Public-Key Cryptosystems
Computationally
Useful if either key easy for sender
can be used for knowing public key
each role to encrypt messages
Computationally Computationally
infeasible for easy for receiver
opponent to knowing private key
otherwise recover to decrypt
original message ciphertext
Computationally
infeasible for
opponent to
determine private key
from public key
Digital Signatures
⚫ NIST FIPS PUB 186-4 defines a digital signature as:
”The result of a cryptographic transformation of data that,
when properly implemented, provides a mechanism for
verifying origin authentication, data integrity and signatory
non-repudiation.”
⚫ Thus, a digital signature is a data-dependent bit pattern,
generated by an agent as a function of a file, message, or
other form of data block
Message M Message M S
Cryptographic Cryptographic
hash hash
function function
Bob’s
h Bob’s h
public
private
key
key
Digital Digital
signature signature
generation verification
algorithm algorithm
Message M S Return
signature valid
Bob’s or not valid
signature
for M
H CA
information
SG SV Return signature
valid or not valid
Generate hash Signed certificate
code of unsigned
certificate
Receiver's Encrypted
public symmetric
key key
D M essage
Encrypted
message Random
symmetric
key
Digital
envelope D
Encrypted Receiver's
symmetric private
key key
⚫ Handshaking to prevent
replay attacks
⚫ Session key
Random Number
Requirements
Randomness Unpredictability
⚫ Criteria:
⚫ Uniform distribution ⚫ Each number is
⚫ Frequency of occurrence
statistically independent
of each of the numbers
should be approximately of other numbers in the
the same sequence
⚫ Independence
⚫ No one value in the ⚫ Opponent should not be
sequence can be inferred
from the others able to predict future
elements of the
sequence on the basis of
earlier elements
Random versus
Pseudorandom
Cryptographic applications typically make use of
algorithmic techniques for random number generation
• Algorithms are deterministic and therefore produce sequences of numbers
that are not statistically random