Introduction Security Attacks
Introduction Security Attacks
EK(m)
ciphertext
m DK’ (EK(m)) =
E D
plaintext m
K
eavesdropping
encryption key
adversary
o security of the system should be based on the protection of the decryption key
Security is about how to prevent attacks, or -- if prevention is not possible -- how to detect attacks
and recover from them
attacks can be
– passive
• attempts to learn or make use of information from the system but does not
affect system resources
– active
Ciphertext-only attack: the adversary can only observe ciphertexts produced by the same
encryption key
Known-plaintext attack: the adversary can obtain corresponding plaintext-ciphertext pairs produced
with the same encryption key
(Adaptive) Chosen-plaintext attack: the adversary can choose plaintexts and obtain the
corresponding ciphertexts
(Adaptive) Chosen-ciphertext attack: the adversary can choose ciphertexts and obtain the
corresponding plaintexts
Related-key attack: the adversary can obtain ciphertexts, or plaintext-ciphertext pairs that are
produced with different encryption keys that are related in a known way to a specific encryption key
Authentication
o access control
Confidentiality
Integrity
o provides assurance that data received are exactly as sent by the sender
Non-repudiation
An encryption scheme is secure in a given adversary model if it is computationally infeasible for the
adversary to determine the target decryption key under the assumptions of the given model. For
many encryption schemes used in practice, no proof of security exists. These schemes are used,
nevertheless, because they are efficient and they resist all known attacks. Some encryption schemes
are provably secure, however these schemes are often inefficient.
symmetric-key encryption
– usually K’ = K
asymmetric-key encryption
Block Ciphers
An n bit block cipher is a function E: {0, 1}n x {0, 1}k {0, 1}n, such that
for each K ε {0, 1}k, E(x, K) = EK(x) is an invertible mapping from {0, 1}n to {0, 1}n.
k bit
key
…
n bit
… E …
n bit
input output
Design Criteria:
Completeness
o each bit of the output block should depend on each bit of the input block and on
each bit of the key
Avalanche effect
o changing one bit in the input block should change approximately half of the bits in
the output block
o similarly, changing one key bit should result in the change of approximately half of
the bits in the output block
Statistical independence
X (64)
Initial Permutation
(32) (32)
F (48)
+ K1
F (48)
+ K2 Key
Scheduler
(56)
F (48) K
+ K3
…
F (48)
+ K16
Initial Permutation-1
Y (64)
(input size: 64, output size: 64, key size: 56, 16 rounds, Feistel structure)
Round Function,F
P
( Si – substitution box (S-box), P – permutation box (P-box))
Key Scheduler:
(56)
Permuted Choice 1
(28) (28)
(48)
K1
Permuted Choice 2
(48)
K2
Permuted Choice 2
b. Algebraic attack:
Having a large key size is only a necessary condition for the security of a block cipher
– a block cipher can be broken due to the weaknesses in its internal (algebraic)
structure, even if it uses large keys
Example:
Stream ciphers
While block ciphers simultaneously encrypt groups of characters, stream ciphers
encrypt individual characters. They may be better suited for real time applications
Stream ciphers are usually faster than block ciphers in hardware
(but not necessarily in software). They are limited or no error propagation. They may be
advantageous when transmission errors are probable
The distinction between stream ciphers and block ciphers is not definitive.
– stream ciphers can be built out of block ciphers using CFB, OFB, or CTR modes
– a block cipher in ECB or CBC mode can be viewed as a stream cipher that
operates
on large characters
Vernam cipher
– ci = pi ⊕ ki for i = 1, 2, …
where pi are the plaintext digits, ki are the key stream digits,
ci are the ciphertext digits, and ⊕ is the bitwise XOR operation
one-time pad
– a Vernam cipher where the key stream digits are generated independently
– and uniformly at random
– the one-time pad is unconditionally secure [Shannon, 1949]
• I(P; C) = H(P) - H(P|C) = 0
– a necessary condition for a symmetric key cipher to be
unconditionally secure is that H(K) ≥ H(P) [Shannon, 1949]
• practically, the key must have as many bits as the compressed
plaintext
• impractical because of key management problems
RSA Algorithm:
Key generation
– select p, q large primes (about 500 bits each)
– n = pq, f(n) = (p-1)(q-1)
– select e such that 1 < e < f(n) and gcd(e, f(n)) = 1
– compute d such that ed mod f(n) = 1 (this is easy if f(n) is known)
– the public key is (e, n)
– the private key is d
Encryption
– represent the message as an integer m in [0, n-1]
– compute c = me mod n
Decryption
– compute m = cd mod n
Factoring Problem: