Lecture 4
Lecture 4
Systems
Dr E. T. Tchao
❖ Some material adapted from J.F Kurose and K.W. Ross, W. Stallings and
L. Brown
8-1
Goals
❖ understand principles of security using cryptographic
protocols:
▪ cryptography and its many uses beyond
“secrecy/confidentiality”
▪ authentication
▪ message integrity
▪ …
Trudy
Alice’s Bob’s
K encryption K decryption
A
key Bkey
m plaintext message
KA(m) ciphertext, encrypted with key KA
m = KB(KA(m))
Side-channel attacks:
timing, power analysis, electromagnetic analysis, acoustic
KS KS
Caesar Cipher
plaintext:
abcdefghijklmnopqrstuvwxyz
ciphertext:
mnbvcxzasdfghjklpoiuytrewq
e.g.: Plaintext: bob. i love you. alice
ciphertext: nkn. s gktc wky. mgsbc
8-17
Requirements
❖ With the message X and the encryption key K as
▪ Input, the encryption algorithm forms the ciphertext Y
Y = E(K, X)
X = D(K, Y)
❖ two requirements for secure use of symmetric
encryption:
▪ a strong encryption algorithm
▪ a secret key known only to sender / receiver
❖ assume encryption algorithm is known
❖ There is a secure channel to distribute key
8-18
Symmetric key crypto: DES
DES: Data Encryption Standard
❖ US encryption standard [NIST 1993]
❖ 56-bit symmetric key, 64-bit plaintext input
❖ block cipher with cipher block chaining
❖ how secure is DES?
▪ DES Challenge: 56-bit-key-encrypted phrase decrypted
(brute force) in less than a day
▪ no known good analytic attack
❖ making DES more secure:
▪ 3DES: encrypt 3 times with 3 different keys
strength concerns:
• concerns about algorithm
• DES is the most studied encryption algorithm
in existence
• use of 56-bit key
• Electronic Frontier Foundation (EFF) announced
in July 1998 that it had broken a DES
encryption
Triple DES (3DES)
● 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
AES: Advanced Encryption Standard
significantly improved
3DES was not efficiency
published as
reasonable for
FIPS 197
long term use
symmetric block cipher
Stream
Encryption
Block & Stream Ciphers
Block Cipher
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
Practical Security Issues
● modes of operation
● alternative techniques developed to increase the security of
symmetric block encryption for large sequences
● overcomes the weaknesses of ECB
How are the keys shared anyway?
❖ Physical Exchange
▪ impractical method for remote parties
❖ Key Distribution Centers (KDC)
▪ popular example being kerberos
❖ Public Key Cryptography
▪ Diffie-Hellman key exchange
▪ Elliptic Curve 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 private-key, known only to the recipient, used to
decrypt messages, and sign (create) signatures
● is asymmetric because
● those who encrypt messages or verify signatures cannot
decrypt messages or create signatures
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
computationally
useful if either easy for sender
key can be used knowing public key
for 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
Asymmetric Encryption
Algorithms
RSA (Rivest, most widely accepted
block cipher in which
the plaintext and
Shamir, developed in 1977
and implemented
approach to
ciphertext are
integers between 0
Adleman) public-key encryption
and n-1 for some n.
algorithm encryption of
messages
Digital
Signature provides only a digital
signature function
cannot be used for
encryption or key
Standard with SHA-1 exchange
(DSS)
-
K Bob’s private
B key
1
+ . .
need KB( ) and K - ( ) such that
B
- +
K (K (m)) = m
B B
d
c c m = cd mod n
decrypt:
17 48196857210675091509141182522307169 12
7
- + + -
K (K (m)) = m = K (K (m))
B B B B
session key, KS
❖ Bob and Alice use RSA to exchange a symmetric key KS