06 - Protection - Security
06 - Protection - Security
Lecture 6
Soumyabrata DEV
https://soumyabrata.dev/
Protection
2
Protection
3
Goals of Protection
4
OS Protection
5
Formal Model for Protection in Computer System
6
Principles of Protection
7
Domain of Protection
Definition
• A process operates within a protection domain, which specifies the
resources that the process may access
Formal Definition
8
Domain example
9
Association Between Processes & Domains
10
Realisation of a Domain
11
Access Matrix
• Access matrix (AM): abstract view of protection model
• i-th row of AM: domain Di
• j-th column of AM: object Oj
• Entry ai,j in AM: set of operations that a process executing in Di can invoke on Oj
•Example: three files F1, F2, F3 and a printer
F1 F2 F3 Printer
D1 read read
D2 print
D3 read exec
13
Problems with Access Control
14
Dynamic Protection State
15
Security
16
Security
17
Classification of Security Threats
• Intentional (malicious)
• unauthorised reading of data, information theft, or traffic analysis
(passive threats, affecting data confidentiality)
• unauthorised destruction, tampering or fabrication of data (active
threats, affecting data integrity or authenticity)
• prevention of legitimate use of system (active threats, affecting
system availability)
• Accidental: human errors, hardware/software errors, natural
disasters. . .
18
Classification of Intentional Security Threats
20
User Authentication
21
Passwords
22
Password Strength
23
Changeable Passwords
• One-time passwords
• extreme form of changeable passwords; intercepting them won’t give any
advantage to an adversary in the future as they are only used once.
24
Password Protection Measures
25
What Is Cryptography ?
Cryptography ⎯ making “secret codes”
is the study of mathematical techniques related to
aspects of information security.
encryption decryption
p c c p
e d
k k
Cryptosystem
❑ Basic assumptions
o The system is completely known to the attacker
o Only the key is secret
o That is, crypto algorithms (ciphers) are not secret
❑ This is known as Kerckhoffs’ Principle
❑ Why do we make such an assumption?
o Experience has shown that secret algorithms tend to be
weak when exposed
o Secret algorithms never remain secret
o Better to find weaknesses beforehand
Characteristics of a Good Cipher
❑ Ciphertext:
IRXUVFRUHDQGVHYHQBHDUVDJR
❑ Shift by 3 is “Caesar’s cipher”
Ceasar’s Cipher Decryption
❑ Suppose we know a Caesar’s cipher is
being used:
Plaintext ab c d e f g h i j k l mn o p q r s t u vwx y z
❑ Given ciphertext:
VSRQJHEREVTXDUHSDQWV
❑ Plaintext: spongebobsquarepants
Not-so-Simple Substitution
❑ Shift by n for some n ∈ {0,1,2,…,25}
❑ Then key is n
❑ Example: key n =7
Cryptanalysis I: Try Them All
❑ A simple substitution (shift by n) is used
o But the key is unknown
❑ Given ciphertext: CSYEVIXIVQMREXIH
❑ How to find the key?
❑ Only 26 possible keys ⎯ try them all!
Plaintext ab c d e f g h i j k l mn o p q r s t u vwx y z
Ciphertext J I C A X S E Y V D KWB Q T Z R H F M P N U L G O
Permute rows
and columns
❑ Ciphertext: xtawxnattxadakc
❑ Key is matrix size and permutations:
(3,5,1,4,2) and (1,3,2)
One-Time Pad: Encryption
h e i l h i t l e r
Plaintext: 001 000 010 100 001 010 111 100 000 101
Key: 111 101 110 101 111 100 000 101 110 000
Ciphertext: 110 101 100 001 110 110 111 001 110 101
s r l h s s t h s r
One-Time Pad: Decryption
s r l h s s t h s r
Ciphertext: 110 101 100 001 110 110 111 001 110 101
Key: 111 101 110 101 111 100 000 101 110 000
Plaintext: 001 000 010 100 001 010 111 100 000 101
h e i l h i t l e r
One-Time Pad
k i l l h i t l e r
e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111
One-Time Pad
h e l i k e s i k e
e=000 h=001 i=010 k=011 l=100 r=101 s=110 t=111
One-Time Pad Summary
❑ Provably secure
o Ciphertext provides no info about plaintext
o All plaintexts are equally likely
❑ BUT, only when be used correctly
o Pad must be random, used only once
o Pad is known only to sender and receiver
❑ Note: pad (key) is same size as message
Real-World One-Time Pad
❑ Project VENONA
o Encrypted spy messages from U.S. to Moscow in
30’s, 40’s, and 50’s
o Nuclear espionage, etc.
o Thousands of messages
❑ Spy carried one-time pad into U.S.
❑ Spy used pad to encrypt secret messages
❑ Repeats within the “one-time” pads made
cryptanalysis possible
A Taxonomy of Security Threats
46
A Taxonomy of Security Threats
• Trojan horse
• secret undocumented routine embedded within a useful program; execution
of the program results in execution of the secret routine (example: login
spoofing)
• Virus
• code embedded within a program that causes itself to be inserted in one or
more other programs and which performs unwanted functions
• Worm
• program that can replicate itself and send copies across network connections
47
Preventative Security
48
Evaluation Assurance Level
49
Thank you!
50