You are on page 1of 6



CSC 411: Internet and Network Security
Submitted by :
P15/1465/2012 - Alexander Mwangi

©November 2015

1) Assume a re-usable password authentication system that uses of an “encrypted”
password file based on a one-way function, f(pw). Describe the dictionary attack on
such a system. Explain how use of “salt” makes the dictionary attack difficult.
To perform a dictionary attack, the attacker prepares a dictionary (list) of probable matching
passwords in a file in plain text and then generates a dictionary of encrypted words. The attacker
then obtains the password file and compares for a matching entries of their encrypted words and
the encrypted passwords in the password file since the encryption is a one way
The use of a salt involves encrypting a random value together with the passwords for each user.
In this case, duplicates are not revealed making a dictionary attack more difficult.
2) Briefly explain the capabilities based access authorization mechanism. Explain how
the MAC (Message Authentication Code) could be employed to secure a capability
against forgery.
A capability is an un-forgeable token or ticket which refers to a particular object and specifies
what operations can be performed on the object. The capabilities based access authorization
mechanism is one in which possession of a capability permits a subject to perform the specified
operations on the object. It is mostly applied in large distributed systems.
A capability structure has a check-field that locks the capabilities of the subject. It contains the
object reference, Operations and a secret-key. The check-field function is one way.
Message Authentication Code (MAC) is a cryptographic checksum on data that uses a session
key to defeat both accidental and intentional modifications of the data. The key is only known by
the sender and the recipient. In capability access authorization mechanism, the token can be
taken as the message and a MAC is provided that is only known by the sender and the recipient.
In this case, the recipient only expects a message from a particular sender whose key is known
thus no forgery.

3) Describe the memory protection mechanism based on the segmented memory
In segmented memory architecture, a program is organized as a collection of logical segments
(data, code, and stack data). Each segment has a unique ID and an offset denoted as: <SegID,
offset>. Each segment is relocatable separately. A segment address table is maintained by the OS
(cached by Memory Management Unit). Access rights may be defined for each segment. All
references pass through MMU/OS which does address translation and access rights checkand
also permits sharing of segments in memory.
How it works.
Four privilege levels are supported: 0, 1, 2 and 3 (0 being the highest and 3 lowest). The current
execution privilege level, CPL, is defined for the current executing segment (and is stored in the
CS register). A program that references memory specifies their request privilege level (RPL). On

the other hand the descriptor of the target specifies the program instruction protection level
otherwise known as descriptor privilege level (DPL). The Current Privilege level (CPL) of the
executing program is also considered. For different situations the MMU does the following:

Data access – The MMU checks whether the DPL is lower or equal to both CPL and
RPL to
allow access
Call to Conforming Code - DPL must be at a higher or equal privilege level to both
Call through a call gate – gateDPL must be at a lower or equal privilege level to both
CPL and RPL. TargetcodeDPL must be at a higher or equal privilege level to both CPL
and RPL

For any situation if the above conditions does not apply, the MMU generates an privilege
violation interrupt.
4) Consider the design and implementation of a biometric authentications system in
which the template is stored in a card (token) carried by the owner. Explain how such
a system works assuming that the card is to hold only the PIN of the owner, name of
the owner, and a “signature” of the biometric template. (Note signature constructed
using message digests (hash) and public key cryptography. I.e., describe the enrolment
and the verification processes.
The biometric template of the user are captured. When capturing the biometric template several
of them are captured to arrive at a true sample representative via an averaging process. The
template is then hashed to protect it against modifications. The user’s public key is also applied
on the template to associate the template with the user. The hashing and encryption of the
template creates the signature of the biometric template. The user is then assigned a pin. The user
name, pin and the signature are then stored in the card to be carried by the owner and the
template is referenced against an identifier, in this case a pin number.
User provides the card then claims identity by providing a PIN which should match the one the
card. To verify the claim, a biometric sample of the user is taken and subjected to hashing and
encryption as applied during enrolment (it is one way function) to obtain a sample biometric
signature. The signature is then compared to the one the card. If they match, the user is verified;
if not the user may be allowed a number of attempts at verification before final rejection.
5) Explain why I/O protection is necessary for the successful realization of file access
control mechanism such as that based on ACL.

How it Works

Process or programs have privilege levels for each operation on device drivers or instructions.
For each request for an operation, either read write or execute, the privilege level (similar to
rights in ACL) is checked if it allows the operation to take place.
This is necessary because:

It prevents programs from interfering (unauthorized access) with the I/O instructions
and secondary storage devices
It prevent programs from interfering with the I/O operations of other programs
It facilitates authorized sharing of I/O and secondary storage devices.

6) Briefly describe the Diffie-Hellman key exchange system. Explain how it might be
susceptible to man-in-the-middle attack. Explain how certificate authority system may
be used to secure the Diffie-Hellman exchange from the man-in-the-middle
How it works
The concept behind the Diffie-Hellman is that

the two participants each start with a secret key.
Xa and Xb


By exchanging some information based on the two keys they securely derive a secret
session key.

Assuming there are two users Alice and Bob in a communication network, they both agree on
keys p and q in a channel they know to be secure. Key p is a prime number while q is a
generator of p. Alice then chooses positive personal number a and bob chooses positive
personal number b . Both a and b should be less than modulus p and should be kept secret by
each of the parties.
Alice computes

a* = qa mod p

Bob computes

b* = qb mod p

Alice sends a* to Bob and Bob sends b* since both can be sent over an insecure medium. A
number x can be generated by both parties as illustrated below:For Alice x = (b*) a mod p
For Bob

x = (a*) b mod p

They can then use key x in their own chosen encryption technique in their communication.
Man-in-the-middle attack

The Diffie-Hellman is susceptible i n intruder can obtain p, q, a* and b*. They only need to
compute for a and b which requires the use of discrete algorithms
Using a Certificate Authority (CA)
A certificate authority provides third party authentication of public keys. Alice and Bob can
identify themselves to the CA and each authenticates themselves. The CA issues a certificate to
During transmission of information, each participant publishes their certificate and the other can
verify its validity by confirming the trusted attached certificate signature. Only the certificate
authority can create and modify the certificate.
7) The time it takes to encrypt a message of n 64-bit blocks using a 64-bit key symmetric
key cryptography algorithm is  * n. The time to encrypt the same using a public key
cryptography algorithm is  * 104 * n. How much faster, compared to the public key
system, would a hybrid cryptographic system (described in the lecture notes) based on
the above be? Show clearly how you have arrived at the answer.

8) In the context of a manual messaging systems, a common forgery attack involves the
attacker cutting a signature from an intercepted message and pasting that signature on
another bogus message. Show that the digital message authentication system based
on message digests and public key cryptography is relatively immune to this kind of
attack. In this context explain the importance of “collision resistance property”.
In the digital message authentication system using message digest and public key cryptography,
the signature is generated in the following way

The sender generates a small, eg128bit, digest from the message to be sent.
The digest is then encrypted using the secret key to generate a short authenticator, now
called the signature.
The signature is then sent together with the message to the recipient.

And the recipient does the following

The recipient applies the same digest generation algorithm to the message to obtain the
recipient computed digest.
The received signature is decrypted to obtain the received digest.
Compares the computed with the received digest.
If there is a match then sender is authenticated and the message’s integrity is confirmed.

This means that if an attacker cut a signature from an intercepted message and paste that
signature on another bogus message, the recipient will apply the same digest generation
algorithm to the bogus message, and decrypt the received signature to obtain received digest

which will not match, because the messages used by sender would not be the same as used by the
recipient. This would therefore alert the recipient that the message has been tampered with.
Collision Resistance - A hash function H is collision resistant if it is hard to find two inputs that
hash to the same output. A function that is not collision resistant allows an attacker to take an
authentic digitally signed message, find a different message that produces the same digest (the
collision), then substitute the fake message for the real one while keeping the same signature
value. The recipient trying to validate the signature won't be able to tell the difference. This
destroys the value of digital signatures. Hence, an effective cryptographic hash function needs to
be collision resistant.