Introduction to Computer Security
Version 1.1
M. T. Goodrich and R. Tamassia
December 20, 2010
1
,Terms of Use
This manual contains solutions for selected exercises in the book Introduction to Computer
Security, by Michael T. Goodrich and Roberto Tamassia, published by Addison Wesley. It
is intended for use by instructors adopting the book in a course. Please contact the authors
if you find errors in the solutions.
You can make available to your students the solutions for the exercises assigned in your
course on hardcopy handouts or web pages that are password-protected or accessible only
from your institution’s domain.
You are not allowed to make the solutions available on a publicly accessible Web site
2
,Chapter 1
Reinforcement
Problem R-1.12
Compare and contrast symmetric encryption with public-key encryption, including the
strengths and weaknesses of each.
Solution Scalability: with public-key encryption, multiple users can send encrypted mes-
sages to Alice using her public key and these messages can be decrypted only by Alice;
thus, a linear number of public-private key pairs need to be established, distributed and
protected to allow pairwise confidential communication between any two users; instead,
symmetric encryption requires a quadratic number of secret keys. Efficiency: existing sym-
metric encryption methods are much faster and use much shorter keys than existing public-
key encryption methods. Usability: symmetric-key encryption is easier to understand by
an non-expert than public-key encryption.
Problem R-1.14
Suppose the author of an online banking software system has programmed in a secret feature
so that program emails him the account information for any account whose balance has just
gone over $10,000. What kind of attack is this and what are some of its risks?
Solution This is a Trojan horse, since it has a hidden malicious action that goes with a
useful service.
Problem R-1.16
Give an example of the false sense of security that can come from using the “security by
obscurity” approach.
Solution There are many examples. One possibility would be to use a weak encryption
algorithm, like the Caesar cipher and try to keep secret the type of algorithm that you
are using, in addition to keeping the key secret. The problem with this approach is that
if someone guesses you are using such an algorithm or is able to reverse engineering your
software, then they will discover your algorithm. From there it is a simple matter to break
your weak encryption scheme.
Problem R-1.17
The English language has an information content of about 1.25 bits per character. Thus,
when using the standard 8-bit ASCII encoding, about 6.75 bits per character are redundant.
Compute the probability that a random array of t bytes corresponds to English text.
t
Solution Since each byte has 8 bits, the total number of t-byte arrays is T = 28 = 28t .
Given that the information content of English text is 1.25 bits per character, the number of
t
t-byte arrays corresponding to English text is E = 21.25 = 21.25t . Thus, the probability
that a random array of t bytes corresponds to English text is given by E/T = 2−6.75t .
3
, Problem R-1.18
Suppose that a symmetric cryptosystem with 32-bit key length is used to encrypt messages
written in English and encoded in ASCII. Given that keys are short, an attacker is using
a brute-force exhaustive search method to decrypt a ciphertext of t bytes. Estimate the
probability of uniquely recovering the plaintext corresponding to the ciphertext for the
following values of t: 8, 64, and 512.
Solution Brute-force decryption generates 232 candidate plaintexts, one for each possible
key value. Each plaintext has probability 2−6.75t of being English text. Thus, the attack is
expected to produce 232−6.75t candidate English plaintexts. Since this number is less than
one for the given values of t, the attack is expected to always recover the plaintext.
Problem R-1.19
Suppose you could use all 128 characters in the ASCII character set in a password. What is
the number of 8-character passwords that could be constructed from such a character set?
How long, on average, would it take an attacker to guess such a password if he could test a
password every nanosecond?
Solution There are 1288 possible passwords with 8 ASCII characters. Guessing a pass-
word will take on average 12 1288 10−9 seconds. This is 9, 223, 372, 037 seconds or about 417
days.
Creativity
Problem C-1.2
Describe an instance of a file that contains evidence of its own integrity and authenticity.
Solution Take a file and concatenate a digital signature on that file from the owner of
that file or from another trusted authority. Don’t forget to include the digital certificate of
the signer.
Problem C-1.3
Suppose an Internet service provider (ISP) has a voice over IP (VoIP) telephone system
that it manages and sells. Suppose further that this ISP is deliberately dropping 25% of
the packets used in its competitors VoIP system when those packets are going through this
ISP’s routers. Describe how a user could discover that his ISP is doing this.
Solution Suppose the user bought both VoIP solutions. He could then do a set of simple
end-to-end performance tests to see if one had degraded throughput with respect to the
other in terms of packet delivery. If, say, in 10 tests, one is 25% worse than the other, then
it is highly likely that this is due to a deliberate packet dropping strategy on the part of
the ISP.
4