Week 1
Types of Attacks
Passive - Unauthorised access to data. The data is left unchanged by the attacker and may
go unnoticed by the owner
Active - Data being changed in some way
-Alteration of data
-Prevention of access to data
When deciding what security measures to use there are three different issues:
Appropriateness - Is it the right tool for the job?
Strength - What level of protection is needed?
Cost - Do the security gains justify the costs?
-Cost may not mean just money but also ease of use and efficiency
Defining security in terms of “CIA”:
Confidentiality - prevention of unauthorised disclosure of information
Integrity - prevention of unauthorised modification of information
Availability - prevention of unauthorised withholding of information or resources
Security Services
Confidentiality - Data cannot be viewed by an unauthorised user
-Data at rest (in the computer)
-Data in motion (in the network)
Data Integrity - Data has not been altered
Data origin authentication - Data has come from the original source
Non-repudiation - An entity cannot deny a previous commitment or action
-Includes third party involvement
Entity Authentication - A given entity is involved and currently active in a communication
session
Privacy - Referring to private PII (personally identifiable information) covers control of
personal data and the requirements by the data holders.
Safety - protection from non-malicious threats. Eg accidents, hardware failure
Security - protection from malicious threats. Eg targeted attacks, data breach
Types of attackers
White hat - Conform to the law eg researchers, security testers
Grey hat - Sometimes conforms to hacker ethics eg hacks a system then offers to fix it for a
fee (helping companies upgrade security, but for personal gain as well)
Black hat - Violates law. Hacks for personal benefit or malicious intent
,Security Controls
Protection of data on a computer system is often achieved using rules on system behaviour:
● Limiting ways in which data is handled (eg type of data)
● Limit which operations can be performed on data (deleting, changing)
● Limit which users can perform what actions
Typical IT system can be modelled in five layers:
● Application programs
● Services
● Operating System
● Kernel
● Hardware
Security controls can be located in any of these layers. Mechanisms closer to the hardware
are typically more generic and computer-orientated. Those close to the application are more
user-orientated.
Security Policy
● A set of rules specifying how security should be enforced within a domain.
● States what needs to be protected, how it should be done, plans in case of a breach.
● Must be simple to read, unambiguous, able to adapt to security changes.
Week 2
Simple model for a cryptosystem providing confidentiality
● Plaintext: the raw data to be protected, the input to a cipher.
● Ciphertext: the result of applying an encryption algorithm to plaintext.
● Encryption key: a value known to the sender. Used as input to the encryption
algorithm to compute the ciphertext from the plaintext.
● Encryption algorithm: rules that takes a plaintext and an encryption key, and
outputs a ciphertext
● Decryption key: a value known to the receiver. Used as input to the decryption
algorithm to compute the plaintext from the ciphertext.
● Decryption algorithm: rules that takes a ciphertext and a decryption key, and
outputs a plaintext.
, ● The interceptor: also known as the eavesdropper, or the attacker and the adversary
more generally.
○ it attempts to determine the plaintext
○ it can always see the ciphertext.
○ it may know the encryption and decryption algorithms.
○ it does not have the decryption key.
Common Notation
c = ek(m) where m is the plaintext, e is the encryption function, k is the secret key and c is
the ciphertext.
m =dk(c) where c is the ciphertext, d is the decryption function, k is the secret key and m is
the plaintext.
Typically, e will be public and the secrecy of m (given c) depends totally on the secrecy of
the key, k.
Kerckhoff’s Assumption: Cryptographic algorithm not required to be secret - all security
resides in the key. Assume interceptor knows cryptosystem and has ciphertext and some
corresponding plaintext.
Attack Models
● Ciphertext only - knowledge only of ciphertext
● Known plaintext - corresponding plaintext and ciphertext
● Chosen plaintext - chosen plaintext and corresponding ciphertext. Has access to
encryption machine
● Chosen ciphertext - chosen ciphertext and corresponding plaintext. Has access to
decryption machine
Modern systems are generally required to be at least secure against a chosen plaintext
attack.
Criteria for evaluating security
Computational security - There is no known method of breaking the cryptosystem with a
“reasonable amount” of computational resources
Provable security - breaking the cryptosystem is “equivalent” to solving a hard
computational problem
Unconditional security - The cryptosystem cannot be broken even with infinite
computational resources
Cover time is the length of time we believe our cryptosystem will resist a particular attack
Exhaustive Key Search
An attacker can always try every key. Say he has some ciphertext, he can then:
1. Pick a decryption key
, 2. Decrypt the ciphertext using that key
3. Check if the plaintext makes sense
4. If not then pick another key
a. If it does then the decryption key is a “candidate decryption key”
5. Stop when there is conformation when the candidate key is the correct key
Very large keys make this infeasible and modern keys have these massive key spaces. Key
spaces are usually expressed in bits, so base 2.
Caesar Cipher
Any cipher in which a letter is substituted with a fixed shift. Eg each letter was substituted by
three positions down the alphabet.
Easy to use exhaustive key search as there are only 26 possible keys (due to 26 letters)
Substitution cipher
● A cipher in which letters are substituted with other corresponding letters eg A -> C, L
-> Z.
● A caesar cipher is just a special type of substitution cipher.
● There are 26! Possible keys, corresponding to 2^88.
● However, using common sense we would be able to work out the key due to some
letters being used more frequently than others. Eg any letter on it’s own could only be
“i” or “a”. A common 3 letter word is “the” which can be deciphered.
● Popular bigrams (two letters together): th, he, in, er, an
● Popular trigrams (three letters together): the, ing, and, her, ere
● Not computationally secure against ciphertext only attack
Vigenere Cipher
This cipher took 300 years to break. It is not computationally secure against ciphertext only
attack. Basically, it’s a lot of caesar ciphers.
1. Map letters to numbers as usual
2. Chose a keyword, K, of length M
3. Break the plaintext into blocks of length M
4. Add the plaintext number mapping to the number mapping of the keyword
5. Add the two numbers together
6. Map numbers back to letters
Types of Attacks
Passive - Unauthorised access to data. The data is left unchanged by the attacker and may
go unnoticed by the owner
Active - Data being changed in some way
-Alteration of data
-Prevention of access to data
When deciding what security measures to use there are three different issues:
Appropriateness - Is it the right tool for the job?
Strength - What level of protection is needed?
Cost - Do the security gains justify the costs?
-Cost may not mean just money but also ease of use and efficiency
Defining security in terms of “CIA”:
Confidentiality - prevention of unauthorised disclosure of information
Integrity - prevention of unauthorised modification of information
Availability - prevention of unauthorised withholding of information or resources
Security Services
Confidentiality - Data cannot be viewed by an unauthorised user
-Data at rest (in the computer)
-Data in motion (in the network)
Data Integrity - Data has not been altered
Data origin authentication - Data has come from the original source
Non-repudiation - An entity cannot deny a previous commitment or action
-Includes third party involvement
Entity Authentication - A given entity is involved and currently active in a communication
session
Privacy - Referring to private PII (personally identifiable information) covers control of
personal data and the requirements by the data holders.
Safety - protection from non-malicious threats. Eg accidents, hardware failure
Security - protection from malicious threats. Eg targeted attacks, data breach
Types of attackers
White hat - Conform to the law eg researchers, security testers
Grey hat - Sometimes conforms to hacker ethics eg hacks a system then offers to fix it for a
fee (helping companies upgrade security, but for personal gain as well)
Black hat - Violates law. Hacks for personal benefit or malicious intent
,Security Controls
Protection of data on a computer system is often achieved using rules on system behaviour:
● Limiting ways in which data is handled (eg type of data)
● Limit which operations can be performed on data (deleting, changing)
● Limit which users can perform what actions
Typical IT system can be modelled in five layers:
● Application programs
● Services
● Operating System
● Kernel
● Hardware
Security controls can be located in any of these layers. Mechanisms closer to the hardware
are typically more generic and computer-orientated. Those close to the application are more
user-orientated.
Security Policy
● A set of rules specifying how security should be enforced within a domain.
● States what needs to be protected, how it should be done, plans in case of a breach.
● Must be simple to read, unambiguous, able to adapt to security changes.
Week 2
Simple model for a cryptosystem providing confidentiality
● Plaintext: the raw data to be protected, the input to a cipher.
● Ciphertext: the result of applying an encryption algorithm to plaintext.
● Encryption key: a value known to the sender. Used as input to the encryption
algorithm to compute the ciphertext from the plaintext.
● Encryption algorithm: rules that takes a plaintext and an encryption key, and
outputs a ciphertext
● Decryption key: a value known to the receiver. Used as input to the decryption
algorithm to compute the plaintext from the ciphertext.
● Decryption algorithm: rules that takes a ciphertext and a decryption key, and
outputs a plaintext.
, ● The interceptor: also known as the eavesdropper, or the attacker and the adversary
more generally.
○ it attempts to determine the plaintext
○ it can always see the ciphertext.
○ it may know the encryption and decryption algorithms.
○ it does not have the decryption key.
Common Notation
c = ek(m) where m is the plaintext, e is the encryption function, k is the secret key and c is
the ciphertext.
m =dk(c) where c is the ciphertext, d is the decryption function, k is the secret key and m is
the plaintext.
Typically, e will be public and the secrecy of m (given c) depends totally on the secrecy of
the key, k.
Kerckhoff’s Assumption: Cryptographic algorithm not required to be secret - all security
resides in the key. Assume interceptor knows cryptosystem and has ciphertext and some
corresponding plaintext.
Attack Models
● Ciphertext only - knowledge only of ciphertext
● Known plaintext - corresponding plaintext and ciphertext
● Chosen plaintext - chosen plaintext and corresponding ciphertext. Has access to
encryption machine
● Chosen ciphertext - chosen ciphertext and corresponding plaintext. Has access to
decryption machine
Modern systems are generally required to be at least secure against a chosen plaintext
attack.
Criteria for evaluating security
Computational security - There is no known method of breaking the cryptosystem with a
“reasonable amount” of computational resources
Provable security - breaking the cryptosystem is “equivalent” to solving a hard
computational problem
Unconditional security - The cryptosystem cannot be broken even with infinite
computational resources
Cover time is the length of time we believe our cryptosystem will resist a particular attack
Exhaustive Key Search
An attacker can always try every key. Say he has some ciphertext, he can then:
1. Pick a decryption key
, 2. Decrypt the ciphertext using that key
3. Check if the plaintext makes sense
4. If not then pick another key
a. If it does then the decryption key is a “candidate decryption key”
5. Stop when there is conformation when the candidate key is the correct key
Very large keys make this infeasible and modern keys have these massive key spaces. Key
spaces are usually expressed in bits, so base 2.
Caesar Cipher
Any cipher in which a letter is substituted with a fixed shift. Eg each letter was substituted by
three positions down the alphabet.
Easy to use exhaustive key search as there are only 26 possible keys (due to 26 letters)
Substitution cipher
● A cipher in which letters are substituted with other corresponding letters eg A -> C, L
-> Z.
● A caesar cipher is just a special type of substitution cipher.
● There are 26! Possible keys, corresponding to 2^88.
● However, using common sense we would be able to work out the key due to some
letters being used more frequently than others. Eg any letter on it’s own could only be
“i” or “a”. A common 3 letter word is “the” which can be deciphered.
● Popular bigrams (two letters together): th, he, in, er, an
● Popular trigrams (three letters together): the, ing, and, her, ere
● Not computationally secure against ciphertext only attack
Vigenere Cipher
This cipher took 300 years to break. It is not computationally secure against ciphertext only
attack. Basically, it’s a lot of caesar ciphers.
1. Map letters to numbers as usual
2. Chose a keyword, K, of length M
3. Break the plaintext into blocks of length M
4. Add the plaintext number mapping to the number mapping of the keyword
5. Add the two numbers together
6. Map numbers back to letters