0% found this document useful (0 votes)
24 views44 pages

Distributive Systems Lecture Sess. 4

Uploaded by

aceofsource
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views44 pages

Distributive Systems Lecture Sess. 4

Uploaded by

aceofsource
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CSCD604: Distributed Systems

Session 4 – Security [Phase II]

By
Solomon Mensah (PhD)

College of Education
School of Continuing and Distance Education
2014/2015 – 2016/2017
Agenda
• Security model
• Threats and attacks
• Cryptographic algorithms
• Digital Signatures
What do we protect?

• The security of a distributed system can be achieved


by securing
• üthe processes
• üthe channels used for the interaction of the
processes and
• üthe objects (resources) that the processes
encapsulate
• (against unauthorized access)
What do we protect?
What do we protect?
How do we protect?
• Cryptography is the science of keeping messages
secure
• The use of shared secrets and encryption provides the
basis for
• the authentication of message
• Encryption and authentication are used to build secure
• channels as a service layer on top of existing
communication
How do we protect?
Overview
• Resources must be protected against unauthorized access
• Messages in communication must be protected against
attackers or enemies
• Security policies are required, which are the rules for sharing
resources within the specified limits
• Security policies are enforced with the help of security
mechanisms
• Role of cryptography
– basis for most of the computer security mechanisms
– providing the authenticity of information by means of digital
signatures
Threats
Threat is a possible danger that might exploit a vulnerability
• Security threats fall into three broad classes:
– Leakage: Refers to the acquisition of information by unauthorized
recipients.
– Tampering: Refers to the unauthorized alteration of information.
– Vandalism: Refers to interference with the proper operation of a
system without authorized gain to the perpetrator
Attacks
• Attack is an unauthorized action or attempt that uses one or
more vulnerabilities to realize a threat
• Methods of attack can be classified according to the way in
which a communication channel is misused:
– Eavesdropping: Obtaining copies of messages without authority
– Masquerading: Sending or receiving messages using the identity
of another principal without their authority
– Message tampering: Intercepting messages and altering their
contents before passing them on to the intended recipient.
– Replaying: Storing intercepted messages and sending them at a
later date (Possible even with authentication and encryption)
– Denial of service: Flooding a channel or other resource with
messages in order to deny access for others.
Securing Electronic transactions
Email, Purchase of goods and services, Banking transactions, and Micro-
transactions must be protected by appropriate security policies and
mechanisms
• Cost of protection must be reasonable when compared with
the value of the transaction.
• Major requirements:
– Authentication of the service provider/vendor,
– Securing payment details,
– Secure delivery to the intended user
– Non-repudiation of transactions by the customer
– A buyer should be able to complete a secure transaction even if there is
no previous contact with vendor and without the need of a third party
Worst-case assumptions and
design guidelines
Interfaces are exposed
• Networks are insecure
– e.g, spoofing of host address

• Algorithms and program code are available to attackers


– Security mechanism should rely only on the secrecy of keys
• Attackers may have access to large resources
– Most powerful computers may be used by attackers
• Minimize the trusted computing base
– all the hardware and software components responsible for
implementation of security, must be designed for minimum size
Overview of cryptography
• Encryption is the process of encoding a message in such a way
as to hide its contents
• Decryption is the process of decoding an encrypted message
The original message is called plaintext
• The message in encrypted from is called ciphertext
• The algorithm used for encryption and decryption of messages
is called cipher
• The information used for encryption and decryption of
messages is called Key, which is often kept secret
• Two classes of encryption algorithms are used in practice
– Private key algorithm : employs a secret key shared by two parties – Public key
algorithm: employs a pair of public / private keys
Cryptography terminology
Symmetric / Secret key encryption
Asymmetric / Public key encryption
Cryptography use cases
1) Secrecy and Integrity:
• – Maintaining the secrecy of the encrypted message as long as the
• decryption key is not compromised
• – Maintaining the integrity of the encrypted information, by
• including some redundant information such as a checksum

• Scenario: Two parties, Alice and Bob wishes to communicate secretly using a
• secret key KAB
• 1. Alice uses KAB and an agreed encryption function E(KAB, M) to
• encrypt and send any number of messages {Mi}KAB to Bob.
• 2. Bob decrypts the encrypted messages using the corresponding
• decryption function D(KAB, M).
Cryptography use cases

1) Secrecy and Integrity:

• How can a key (KAB ) be shared between two parties securely?


• How does second party know that any message it has received
isn’t a copy of an earlier encrypted message from the first party
that was captured by an attacker and replayed later?
Cryptography use cases

2) Authentication:
Scenario: Authenticated communication using a server
i. Alice sends a plaintext message to Sara (authentication server) stating
her identity and requesting a ticket for access to Bob.
ii. Sara sends a response to Alice encrypted in KA consisting of a ticket
encrypted in KB and a new secret key KAB : {{Ticket}KB , KAB}KA
iii. Alice decrypts the response using KA generated from her password
iv. Alice sends the ticket to Bob together with her identity and a request R
to access a file: {Ticket}KB, Alice, R
v. The ticket, created by Sara, is actually: {KAB , Alice}KB. Bob decrypts the
ticket using his key KB. So Bob gets the authentic identity of Alice and a
new shared secret key KAB for use when interacting with Alice (This is
called a session key )
Cryptography use cases
2) Authentication:
Scenario: Authenticated communication using a server
Cryptography use cases

2) Authentication:
Scenario: Authenticated communication with public keys
(Hybrid cryptographic protocol)
1. Alice accesses a key distribution service to obtain a public-key
certificate giving Bob’s public key. It’s called a certificate because it
is signed by a trusted authority. After checking the signature, she
reads Bob’s public key, KBpub, from the certificate.
2. Alice creates a new shared key, KAB, and encrypts it using KBpub
She sends the result to Bob, along with a name that uniquely
identifies a public/private key pair: keyname,{KAB}Kbpub
3. Bob selects the corresponding private key, KBpriv, from his private
key store and uses it to decrypt KAB. An agreed value or string may
be added to the message for checking the integrity of the message
Cryptography use cases
2) Authentication: (Hybrid cryptographic protocol)
Scenario: Authenticated communication with public keys

Slide 22
Cryptography use cases
• • Digital Signatures:
• – Ensures that, a message or a document is an unaltered copy
• of one produced by the signer

• – This can be achieved by encrypting a compressed form of the message


called a message digest (a fixed length value) using a key that is known only
to the signer.

• – The digest function is so secure that, producing similar digest


• value for two different messages is infeasible
• – The resulting encrypted digest acts as a signature that
• accompanies the message.

Slide 23
Cryptography use cases

3) Digital Signatures:
• Scenario: Alice wants to sign a document M so that any subsequent
recipient can verify that she is the originator of it.
1. Alice computes a fixed-length digest of the document, Digest(M)
2. Alice encrypts the digest in her private key, appends it to M and
makes the result, M, {Digest(M)}KApriv available to the intended
users
3. Bob obtains the signed document, extracts M and computes
Digest(M)
4. Bob decrypts {Digest(M)}KApriv using Alice’s public key, KApub, and
compares the result with his calculated Digest(M). If they match,
the signature is valid.

Slide 24
Cryptography use cases
Digital signatures with public keys:

Slide 25
Cryptography use cases

• Digital signatures with secret keys-MACs:


Cryptography use cases

• Digital signatures with secret keys-MACs:


üRequire the secret key to be shared between the signer and the
verifier in a secure manner
– However, they are useful when a secure channel is used to
transmit messages and only verification of authenticity is needed
– Hence, called Message Authentication Codes (MACs)
– Has performance advantage because of no encryption
Digital signatures

• Signatures are generally required to ensure that, the signed


document is authentic, un-forgeable, and non-repudiable
• Digital signatures depend upon the binding of a unique and
secret attribute of the signer to a document
üDigital signatures based on the public key cryptography are more
useful in practice, because, they are relatively simple and does
not require any communication between the sender and the
receiver
• Along with the encryption algorithm one of the important
primitives required to generate digital signatures is a secure hash
function or digest function
• RSA algorithm is quite suitable for constructing digital signatures
Digital signatures

• A secure digest function / hash function, say h = H(M), should


be one-way, which means having the following properties;
1. Given M, it is easy to compute h
2. Given h, it is hard to compute M
3. Given M, it is hard to find another message M', such that
H(M) = H(M')

• Examples of hash functions for practical applications are


the MD5, SHA-1, SHA-512, etc
Cryptography use cases

• Digital Certificates and certificate chain:


• A digital certificate is a document containing a statement signed
by a principal.
• Scenario: A bank, say Bob, and its customers need mutual authentication.
1. Alice require a certificate from her bank with her bank account number
to prove her as genuine customer for e-commerce transactions
2. The certificate is signed using Bob’s (bank) private key, KBpriv.
3. A vendor, Carol, can accept such a certificate for charging items to
Alice’s account
4. To validate the signature of Bob in the certificate, Carol require Bob’s
public key
5. Again, to ensure that the certificate is not a false one created by Alice
with someone else’s account, Carol need a certificate regarding
genuineness of Bob’s public key, signed by a trusted authority
Cryptography use cases

• Digital Certificates and certificate chain :


• Scenario: (continues…)
6. The trusted certification authority, say Fred, should be genuine again..
7. This leads to a process called certificate chain, which will end when
Carol obtains the public key of Fred, say Kfpub by some means of she
having confidence.

– The certificate chain must be as short as possible to minimize


the security risks

• X.509 is the most widely used standard format for digital


certificates
Cryptography use cases

• Digital Certificates and certificate chain :


Digital Certificates

• X.509 certificate – structure and content:


– It binds a public key to a named entity called a subject.
– The binding is in the signature, which is issued by another named
entity called the issuer.
– The period of validity, is defined by a pair of dates.
– The <Distinguished Name> entries may be name of a person,
organization or other entity along with any additional contextual
information to make it unique
Cryptography use cases

• Digital Certificates:
Cryptography use cases

• Access Control:
– Means authorized use of resources
– The protection of resources is largely service-specific
– The request to servers is generally in the form
<op, principal, resource>
where, op is the requested operation,
principal is an identity or credentials of the principal
resource identifies the resource to which the operation
is to be applied.
– The server should authenticate the request message and the
principal’s credentials and then apply access control, to determine
access rights of the principal on the specified resource.
Cryptography use cases

• Access Control:
– An abstraction called protection domain is used for access control
– Every principal is associated with a protection domain
– Protection domain contains a set of <resource, rights> pairs
– Two kinds of alternative implementations to protection domain
are commonly used : capabilities, and access control lists
– A set of capabilities is held by each process in a domain
– Client requests using capabilities are of the form <op, userid,
capability>

Form of capability
Cryptography use cases

• Access Control:
– Capabilities (contd..)
– Vulnerable to eavesdropping attack
– It is difficult to cancel the capabilities
– Access control list (ACL) is stored with each resource
– The entries in the ACL are of the form <domain, operations>
– A domain may be specified by an identifier for a principal or
by an expression used to determine a principal’s membership of
the domain
– Requests to servers are of the form <op, principal, resource>
– For each request, the server authenticates the principal and
checks to see that the requested operation is included in the
principal’s entry in the access control list of the relevant resource.
Cryptography use cases

• Access Control:
– Implementation:
– Digital signatures, credentials and public-key certificates provide
the cryptographic basis for secure access control
– Both CORBA and Java offer Security APIs, which support access
control
• e.g. Principal, Signer and ACL classes in Java
• CORBA offers a Security Service specification with a model for
ORBs to provide secure communication, authentication,
access control with credentials, ACLs and auditing
Cryptography use cases

• Credentials:
– Credentials are a set of evidence provided by a principal when
requesting access to a resource. e.g. A Certificate by a trusted CA
– For principals, proving credentials each time an operation is
requested is not convenient.
– The notion of ‘speaks for’ is used to deal with this situation in
which a user’s public-key certificate speaks for that user
– A mechanism called ‘delegation’ can be used to make a process to
act for another.
– Delegation can be achieved using a delegation certificate or a
capability
– The CORBA Security Service includes a mechanism for the
delegation of rights based on certificates
Cryptographic Algorithms

• The function used for encryption in a cryptographic algorithm is


one-way in the sense that, it is relatively easy to compute the
function but, it is hard or infeasible to compute its inverse
without using the key K.
• The size of the secret key (number of bits) should be large
enough to defend the brute-force attack, at minimum
• The basis for all public-key schemes is the existence of trap-
door functions.
• A trap-door function is a one-way function with a secret exit:
This means we can encrypt the data with one Key and can
decrypt it with another key
e.g. RSA function
Secret key Algorithms

• Block ciphers are the encryption algorithms in which a plaintext


message is divided into blocks of bits (e.g. 64 bits) and each
block is encrypted. E.g. DES, 3-DES, AES
• If any block has less than the specified number of bits, it is
padded with 0 bits, nulls or blank characters.
• Two ciphertexts produced by block ciphers may be identical if
they encrypt the same plaintext, which may weaken the security.
To avoid this, most of the block ciphers employ Cipher Block
Chaining (CBC)
Secret key Algorithms

• Stream ciphers are encryption algorithms that can perform


encryption incrementally, converting plaintext to ciphertext one
bit at a time. E.g. RC4
• Useful for applications that involve streaming data such as
audio conversations.
• Stream ciphers employ a key stream generator, which is an
arbitrary length sequence of bits meant for XOR-ing with data
stream
Public key Algorithms

• Public key algorithms involve manipulation of huge numbers,


which is computational intensive
• Due to this reason the use of public keys is limited to only the
initial authentication stages of secure communication sessions
• Public key algorithms were first proposed by Diffie and Hellman
• Most of the public key algorithms are based on the functions
derived from number theory and elliptic curves
• Elliptic curve algorithms are more efficient comparatively
• The most widely used Public key algorithm is RSA
Thank you

You might also like