Slides 09
Slides 09
Slides 09
Dependability
Basics
A dependable system provides availability, reliability, safety, maintainability,
confidentiality, and integrity.
• Confidentiality: refers to the property that information is disclosed only
to authorized parties.
• Integrity: alterations to a system’s assets can be made only in
an authorized way, ensuring accuracy and completeness.
Dependability
Basics
A dependable system provides availability, reliability, safety, maintainability,
confidentiality, and integrity.
• Confidentiality: refers to the property that information is disclosed only
to authorized parties.
• Integrity: alterations to a system’s assets can be made only in
an authorized way, ensuring accuracy and completeness.
Alternative
We attempt to protect against security threats:
1. Unauthorized information disclosure (confidentiality)
2. Unauthorized information modification (integrity)
3. Unauthorized denial of use (availability)
Security mechanisms
• Encryption: transform data to something an attacker cannot understand,
or that can be checked for modificatons.
• Authentication: verify a claimed identity.
• Authorization: check an authenticated entity whether it has the
proper rights to access resources.
• Monitoring and auditing: (continuously) trace access to resources
Security principles
• Fail-safe defaults: defaults should already provide good
protection. Infamous example: the default “admin,admin” for edge
devices.
• Open design: do not apply security by obscurity: every aspect of
a distributed system is open for review.
• Separation of privilege: ensure that critical aspects of a system can
never be fully controlled by just a single entity.
• Least privilege: a process should operate with the fewest
possible privileges.
• Least common mechanism: if multiple components require the same
mechanism, then they should all be offered the same implementation of
that mechanism.
Design issues
Security Introduction to security
Observation
We are increasingly seeing end-to-end security, meaning that mechanisms
are implemented at the level of applications.
Design issues
Security Introduction to security
Observation
We are increasingly seeing end-to-end security, meaning that mechanisms
are implemented at the level of applications.
Design issues
Security Introduction to security
On privacy
Observation
Privacy and confidentiality are closely related, yet are different. Privacy can
be invaded, whereas confidentiality can be breached ⇒ ensuring
confidentiality is not enough to guarantee privacy.
Design issues
Security Introduction to security
On privacy
Observation
Privacy and confidentiality are closely related, yet are different. Privacy can
be invaded, whereas confidentiality can be breached ⇒ ensuring
confidentiality is not enough to guarantee privacy.
Right to privacy
The right to privacy is about “a right to appropriate flow of personal
information.” Control who gets to see what, when, and how ⇒ a person
should be able to stop and revoke a flow of personal information.
Design issues
Security Introduction to security
On privacy
Observation
Privacy and confidentiality are closely related, yet are different. Privacy can
be invaded, whereas confidentiality can be breached ⇒ ensuring
confidentiality is not enough to guarantee privacy.
Right to privacy
The right to privacy is about “a right to appropriate flow of personal
information.” Control who gets to see what, when, and how ⇒ a person
should be able to stop and revoke a flow of personal information.
Design issues
Security Introduction to security
Design issues
Security Cryptography
Cryptography
Basic concepts
• Plaintext: the original message or data (P)
• Ciphertext: the encrypted version of the the plaintext (C)
• Encryption key: input EK to a function for encryption: C = EK (P)
Cryptosystems
Symmetric : if P = DK (EK (P)) then DK = EK .
Examples
Let PKX denote public key of X and SKX the associated secret key.
Homomorphic encryption
Mathematical operations on plaintext can be performed on the
corresponding ciphertext: if x and y are two numbers, then
EK (x ) ⋆EK (y ) = EK (x ⋆y )
Hash functions
Description
A hash function H takes a message m of arbitrary length as input
and produces a bit string h having a fixed length as output:
Bob decrypts digest with Alice’s public key; separately calculates the
message digest. If both match, Bob knows the message has been signed by
Alice:
Hash functions
Security Cryptography
Key management
Essence
How do Alice and Bob get the correct (often shared) keys so that they can
set up secure channels?
Key management
Security Cryptography
Key management
Security Cryptography
Oblivious transfer
Alice has n secret messages m1,.., mn . Bob is interested (and allowed) to
know only message mi . Which message he wants to know should be kept
secret to Alice; all messages mj ̸= mi should be kept secret to Bob.
Key management
Security Cryptography
Oblivious transfer
Alice has n secret messages m1,.., mn . Bob is interested (and allowed) to
know only message mi . Which message he wants to know should be kept
secret to Alice; all messages mj ̸= mi should be kept secret to Bob.
Key management
Security Cryptography
Key management
Security Cryptography
Example, continued
Preliminaries
• P1 and P2 need to compute F (a, b).
Solution
• P1 generates |X| · |Y| unique key pairs (Ki , Kj )
•
Key management ∗
Security Cryptography
Observation
In general, we will need a secure channel to distribute the secret key to
the communicating parties.
Key management
Security Cryptography
Observation
No need for a scure channel in the case of the public key, but you do need
to know that the key is authentic ⇒ have the public key be signed by a
certification authority. Note, we do need to trust that authority, or otherwise
make sure that its signature can be verified as well.
Key management
Security Authentication
Authentication
Essence
Verifying the claimed identity of a person, a software component, a device,
and so on.
Means of authentication
1. Based on what a client knows, such as a password or a
personal identification number.
2. Based on what a client has, such as an ID card, cell phone, or
software token.
3. Based on what a client is, i.e., static biometrics such as a fingerprint
or facial characteristics.
4. Based on what a client does, i.e., dynamic biometrics such as
voice patterns or typing patterns.
Introduction to authentication
Security Authentication
Authentication protocols
Security Authentication
Steps
1. Alice announces she wants to talk to Bob.
2. Bob returns a nonce.
3. Alice encrypts the nonce with the shared key KA,B , thus proving that
she owns KA,B ⇒ Bob knows he’s talking to Alice.
4. Alice sends a nonce to Bob.
5. Bob returns proof that he owns the shared secret key as well ⇒
Alice knows she’s talking to Bob.
Authentication protocols
Security Authentication
About optimizations
Authentication protocols
Security Authentication
About optimizations
Authentication protocols
Security Authentication
Basics
Every client has a secret key shared with the KDC.
1. Alice tells the KDC that she wants to talk to Bob
2. The KDC sends a fresh secret key, shared by Alice and
Bob
Authentication protocols
Security Authentication
Basics
Using a ticket is practically better:
1. Alice tells the KDC that she wants to talk to Bob
2. The KDC sends a fresh secret key, shared by Alice and Bob
3. Alice tells Bob that she wants to talk, along with the key to be
used.
Authentication protocols
Security Authentication
Important observation
In the case of request-response messages, you want to make sure that
the received response, is associated with the sent request. Mitigates
replay attacks.
General principle
Use nonces to relate any combination of request-response messages.
Authentication protocols
Security Authentication
Some observations
• Note how B1 ties message #2 to #5
• Note that by returning RA2 − 1 in #6, Bob proves he knows KA,B
Authentication protocols
Security Authentication
Steps
1. Alice tells Bob she wants to talk, sending a nonce RA, and encrypting
the message with Bob’s public key.
2. Bob generates a shared secret session key KA,B , proves he is the
owner of PKB by decrypting RA, and challenges Alice to prove she
owns PKA.
3. Alice decrypts the response, and proves to Bob that she is Alice by
then sending Bob’s nonce back encrypted with the generated session
key KA,B .
Authentication protocols
Security Authentication
Essence
1,2 Alice types in her login name.
3 The Authentication Service returns a ticket KAS,TGS (A, KA,TGS ) that she
can use with the Ticket Granting Service.
4,5 To be able to decrypt the message, Alice must type in her password.
She is then logged in. Using the AS in this way, we have a single sign-
on system.
6,7 Alice wants to talk to Bob, and requests the TGS for a session key.
Authentication protocols
Security Authentication
Authentication protocols
Security Authentication
Authentication protocols
Security Trust in distributed systems
On trust
Definition
Trust is the assurance that one entity holds that another will perform
particular actions according to a specific expectation.
Important observation
• Expectations have been made explicit ⇒ no need to talk about trust?
• Example: Consider a Byzantine fault-tolerant process group of size n
• Specificiation: the group can tolerate that at most k ≤ (n − 1)/3
processes go rogue.
• Realisation: for example PBFT.
• Consequence: if more than k processes fail, all bets are
simply off.
• Consequence: it’s not about trust, it’s all about
meeting specifications.
• Observation: if a process group often does not meet its
specifications, one may start to doubt its reliability, but this is
something else than (dis)trusting the system.
Trust in the face of Byzantine failures
Security Trust in distributed systems
Sybil attack
Essence: Just create multiple identities, but owned by one entity
• In the case of a peer-to-peer network:
1 H = s e t o f honest nodes
2 S = s e t o f Sybil nodes
3 A = Attacker node
4 d = minimal f r a c t i o n o f Sybil nodes needed f o r an a t t a c k
5
6 while True:
7 s = A.createNode() # c re a te a S y b i l node
8 S.add(s) # add i t t o t h e s e t S
9
10 h = random.choice(H) # p i c k an ar bitr ar y honest node
11 s.connectTo(h) # connect t h e new s y b i l node t o h
12
13 i f len(S) / len(H) > d : # enough s y b i l nodes f o r. . .
14 A.attack() # . . . a n attac k
Trusting an identity
Security Trust in distributed systems
Sybil attack
Essence: Just create multiple identities, but owned by one entity
• In the case of a peer-to-peer network:
1 H = s e t o f honest nodes
2 S = s e t o f Sybil nodes
3 A = Attacker node
4 d = minimal f r a c t i o n o f Sybil nodes needed f o r an a t t a c k
5
6 while True:
7 s = A.createNode() # c re a te a S y b i l node
8 S.add(s) # add i t t o t h e s e t S
9
10 h = random.choice(H) # p i c k an ar bitr ar y honest node
11 s.connectTo(h) # connect t h e new s y b i l node t o h
12
13 i f len(S) / len(H) > d : # enough s y b i l nodes f o r. . .
14 A.attack() # . . . a n attac k
Trusting an identity
Security Trust in distributed systems
Eclipse attack
Essence: Try to isolate a node from the network
Example: a hub attack in the case of a gossip-based service. In this case,
when exchanging links to other peers, a colluding node returns links only
to other colluders.
General solution
Use a centralized certification authority.
Trusting an identity
Security Trust in distributed systems
Trusting an identity
Security Trust in distributed systems
Trusting an identity
Security Trust in distributed systems
Trusting an identity
Security Trust in distributed systems
Trusting an identity
Security Trust in distributed systems
Observation
Any change of block Bk , will affect its hash value, and thus that of Bk + 1 ,
which would then also need to be changed, in turn affecting the hash value
of Bk + 2 , and so on.
Trusting a system
Security Authorization
Observation
The reference monitor needs to be tamperproof: it is generally
implemented under full control of the operating system, or a secure server.
Protection
...against unauthorized
invokers
General issues in access control
Security Authorization
Capabilities
Delegation
What’s the issue?
Alice makes use of an e-mail service provider who stores her mailbox. She
is required to log in to the provider to access her mail. Alice wants to use her
own local mail client. How to allow that mail client to act on behalf of Alice?
How to delegate Alice’s access rights to her mail client?
Observation
It is not a good idea to hand over all user credentials to an application:
why would the application or the machine be trusted? ⇒ use a security
proxy.
Delegation
Security Authorization
Security proxy
How it works
1. Alice passes some rights R to Bob, together with a secret key SKproxy
2. When Bob wants to exercise his rights, he passes the certificate
3. The server wants Bob to prove he knows the secret key
4. Bob proves he does, and thus that Alice had delegated R.
Delegation
Security Authorization
Initial steps
1. The client application registers itself at the authorization server
and receives its own identifier, cid .
2. Alice wants to delegate a list R of rights ⇒
Delegation
Security Authorization
Firewalls
Essence
Simply prevent anything nasty coming in, but also preventing
unwanted outbound traffic.
Using sensors
Key idea is to manage false and true positives (FP/TP) as well as false
and true negatives (FN/TN). Maximize accuracy and precision:
TP + TN
Accuracy:
TP + TN + FP + FN
TP
Precision:
TP + FP