Question 1
Describe four different approaches to message authenticity without using PKS. Suppose you need to provide only authenticity protection in a network.
Suppose further that performing encryption is very much more time consuming than computing checksum, MAC or hash. Explain which of these approaches is likely to be the least suitable if efficiency is a main concern in your network. Is this approach still more appropriate that one using PKS? Explain your answer.
Solutions:
The four different approaches are:
(1) Encrypt a message using secret key algorithm but enhance the message using timestamp and checksum as follows:
| Actual Data | Timestamp | Sequence Number | Checksum |
(2) Using MAC. The sender may compute the MAC for the following message
| Actual Data | Timestamp | Sequence Number |
Append the MAC at the back of the message before sending it out.
(3) Using Hash function with secret-key algorithm. The sender computes the hash H of the message
| Actual Data | Timestamp | Sequence Number |
Append the encrypted hash H using the secret key she shared with Bob before sending it out.
(4) Using Hash function without secret-key algorithm. The sender is assumed to share a Secret Number with the receiver. He computes the hash of the message
| Secret Number | Actual Data | Timestamp | Sequence Number |
He then sends out
| Actual Data | Timestamp | Sequence Number | Hash |
The first approach is likely to be the least suitable.
This is because it involves encrypting the entire packet.
But it should still be faster than an approach using PKS since PKS algorithm is in general much slower than a secret-key algorithm.
Question 2
(b) Suppose you just used one key and the message sent comes with a time stamp, a sequence and a checksum as follows:
| Actual Data | Timestamp | Sequence Number | Checksum |
The entire packet is encrypted. Are there any key management issues in this case? Explain your answer. Does this provide any form or certain degree of authenticity protection? Also explain your answer.
There is a key management issue. If one of the users’ machine is compromised, the key for the entire network will need to be changed. This could be a complex process.
Yes, there is certain degree of authenticity protection.
The user can be assured that the message is from another user in the network. On the other hand, he is unable to confirm exactly which user sent the message.
The timestamp helps one verify that the message is fresh and not a reply message. The sequence number would indicate that it is the legitimate message. The checksum will be able to detect if the message is a modified message.
Question 3
(a) Suppose you have a network of n users. Suppose each pair of users need to have secure channel of communication of communication that others could not listen in.
(i) How many keys are needed if you are using PKS algorithm, assuming there is one CA? Explain your answer
(ii) What will be the number of keys needed if a secret-key algorithm is used instead? Explain your answer.
(iii) Which type of algorithms is better when the network is large, taken into consideration efficiency of communication as well? Again explain your answer.
(b) Suppose a secret key algorithm is used to provide confidentiality protection between two communicating parties. Below is the packet format. The shaded entry represents encrypted data.
| Actual Data | Timestamp | Checksum |
Here the Checksum is obtained by applying a secured hash function (without key or secret parameter) on the encrypted Actual Data. Is this sufficient to provide authenticity? Give three reasons to substantiate your answer.
Solutions
(a) (i) When a PKS algorithm is used, each user will have a pair of public-private key. Thus for n users, 2n keys are needed by the users. As the CA needs a pair of keys, there will be 2n+2 keys altogether
(ii) When a secret key algorithm is used, each channel will require a dedicated key.
There are n users. Thus altogether n(n-1)/2 keys will be needed.
To see this, we note that User 1 will need a key to talk to each of User 2 to User n, thus there is a need of n-1 keys for these communications. User 2 already has a key to talk to User 1. But he will also need a key to talk to each of User 3 to User n. Thus there is a need of n-2 keys for these communications.. Similarly, there is a need of n-3 keys for communications between User 3 and the rest (less User 1 and 2), etc. In total, we will need
(n-1) + (n-2) + (n-3) + .. + 1 = n(n-1)/2 keys
(iii) It is not clear which algorithm is better. The reasoning is as follows:
(1) When the network is large, the number of keys needed when secret key algorithm is used increases faster.
(2) On the other hand, the protection needed is to ensure that no one can listen-in to the communication (i.e. confidentiality)
(3) The speed for PKS is in general slower for purpose of encrypting messages.
(b)
| Actual Data | Timestamp | Checksum |
No it is not sufficient
A few reasons are as follows
(1) Sequence number is missing. This means that it may be possible to link this message block to a fragment from another message.
(2) The Checksum does not apply to the Timestamp. Thus it may be possible to replace the Timestamp by another one.
(3) The Checksum is applied to the encrypted Actual Data and does not have a key or secret parameters. Thus it may be possible to take a piece of encrypted data, compute the checksum to produce a “legitimate” packet.
(4) Key management issue
(5) Issue with not knowing where the packet came from
Suppose the checksum is obtained by applying a secured hash function on the encrypted Actual Data and Timestamp. Suppose also that the Checksum is encrypted as well. In this case it does provide integrity protection on the data. If an adversary attempt to modify part of the packet, he is able to compute the checksum but unable to compute the encrypted checksum. Thus the modification will be detected.
Question 4
There are some differences between AES and RSA encryptions. Describe five differences in terms of the types of algorithms, the way the algorithms work, the common functions served, and the difference in speed and key size.
The differences are
(1) AES is a secret key algorithm and RSA is a public key algorithm.
(2) AES uses a single key. The same key is used for both encryption and decryption. Two users need to have the same key to communicate.
RSA uses pair of keys: a public key and a private key. One key is used for encryption and the other for decryption. For two users to communicate, each user will forward the public key to another user and key his private key.
(3) AES is used to typically use to provide confidentiality protection and RSA is for authentication and key management.
(4) AES functions much faster than RSA .
(5) The key size of AES is in the order of a few hundred bits (e.g. 256) and that for RSA is in the order of a few thousand bits (e.g. 1024)