Professional Documents
Culture Documents
Communication and
information technologies (II)
2
1. Introduction [1]
How do we protect data?
• High-profile security breaches could be prevented by
implementing appropriate protection measures.
• ENCRYPTION is one of these protection measures
4
1. Introduction [3]
• Encryption is the fundamental building block of
all modern security systems.
• Encryption provides mechanisms for:
• confidentiality – keeping things secret
8
2. Encryption: basic concepts [3/6]
• Examples:
• ASCII: American ASCII table
Standard Code for
Information Interchange
• Used to replace
characters (a-z; A-Z; 0-9;
12
Session Outline
• Part 5: Encryption
• Introduction
• Encryption
19
2.2 Mathematical representation [2/9]
• Caesar Cipher can be mathematically represented by using
“Modular arithmetic”
• Modular arithmetic operates with a limited set of integers
• Integer: positive or negative whole number, including zero.
• In Modular arithmetic:
• The modulus is the number of integers in the set.
• In the previous example, the modulus is 6.
• Whatever mathematical operation we perform on the integers in
the set, the result must always be less than the modulus.
20
2.2 Mathematical representation [3/9]
• Modular Addition:
• Let’s assume we want to move forward eight hours from ten o’clock
using the 12-hour clock, how can we implement this?
• Mathematically this can be represented as:
10 + 8 modulus 12 is congruent to 6 modulus 12.
• Activity 5.3: What are the decryption keys for the Caesar
cipher with encryption keys of: 10, 15 and 7?
• K=10 → K+ 𝐾 ഥ =26 → 𝐾ഥ =26 – K = 26 – 10 → 𝐾ഥ =16
• K=15 → K+ 𝐾 ഥ =26 → 𝐾ഥ =26 – K = 26 – 15 → 𝐾ഥ =11
• K=7 → K+ 𝐾ത =26 → 𝐾ത =26 – K = 26 – 7 → 𝐾ത =19 29
2.3 Decrypting the Caesar cipher [3/3]
• You noted that one key is so easy to derive from the
other
• Effectively the encryption and decryption key of a Caesar cipher
can be regarded as a single key.
• if we know the encryption key we also know the decryption key
35
3. Breaking a cipher [1/2]
• Breaking (or cracking) a cipher: is to derive the plaintext from
the ciphertext without knowledge of the key (and often
without knowledge of the encryption algorithm).
• The strength of a cipher is measured by how long it takes to
break it.
38
3.1 Brute force attack [1/9]
• Imagine that you have a bunch of keys
and you know that one of them (but not
which one) will unlock the door to a room
you wish to enter. What would you do to
unlock the door?
40
3.1 Brute force attack [3/9]
• The time taken to break a cipher by this method alone is
directly proportional to the key space.
• For example: The Caesar cipher has a very small key space and so
can be broken very quickly.
44
3.1 Brute force attack [7/9]
• Activity 5.6 – Sol. :
48