NivaarExam PrepOfficial exam papers ↗

25-Comp-B10 Distributed Systems · May 2015

Question 5 of 7: Security

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

98-Comp-B10 Distributed Systems — National Examinations, May 2015. 3 hours, closed book, non-programmable calculator only. Candidates were instructed to answer any five of the seven questions, all carrying equal weight and mostly requiring essay-format answers; all seven are answered below as a complete study resource.

Reference texts: Coulouris, Dollimore, Kindberg & Blair, Distributed Systems: Concepts and Design (5th ed.) — system models, peer-to-peer systems and client-server architecture (ch. 1–2, 10), interprocess communication and the request-reply protocol (ch. 4–5), operating system support for distributed systems (ch. 7), security (ch. 11), distributed file systems (ch. 12–12.4, AFS/NFS), and time, coordination, replication and fault tolerance (ch. 14–15, 18).

Check — sub-part lettering. Both sub-parts of Questions 1 and 3 are lettered “a.” in the paper's numbering. Question 1 in fact has three genuinely distinct sub-parts and Question 3 has two; each is answered below relettered (a), (b), (c) in the order printed; content and marks weight are unaffected.

Question 5: Security

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

(a) PGP setup steps for privacy and authenticity. Before Alice and Bob can exchange email with both confidentiality and authenticity guarantees, the following must be in place: (1) Key-pair generation. Each user generates their own public/private key pair (traditionally RSA or a similar asymmetric scheme) and keeps the private key secret, protected locally by a passphrase. (2) Public-key distribution. Each user makes their public key available to the other — via a public key server, attaching it to an email, or direct exchange. (3) Authenticity verification of the received key (the critical, often-skipped step). Because a key obtained over an untrusted channel is vulnerable to a man-in-the-middle substitution, each user must verify the other's public key genuinely belongs to them before trusting it — PGP's usual mechanism is the web of trust: other users who have already verified a key (e.g. by comparing its fingerprint in person) sign it with their own private key, and Bob trusts Alice's key if it carries enough such signatures from people Bob already trusts, or Alice and Bob verify each other's key fingerprint directly out-of-band. Only once this is done can messages that follow be trusted to actually be exchanged with the intended party rather than an imposter.

With both keys generated, distributed and verified, an actual message is protected as follows, achieving both properties the question asks for: privacy is provided by the sender generating a random one-time session key, encrypting the message body with that session key using fast symmetric encryption, then encrypting the (short) session key itself with the recipient's public key and attaching it — only the recipient's private key can recover the session key and hence the message; authenticity is provided by the sender computing a hash (digest) of the message and signing that digest with their own private key before sending it, so the recipient can verify (using the sender's already-trusted public key) that the message truly came from the claimed sender and was not altered in transit. PGP performs both operations together on outgoing mail (sign-then-encrypt), so a single exchanged message carries both guarantees simultaneously.

(b) Estimating DES and IDEA brute-force cracking time.

Given. A 56-bit DES key and a 128-bit IDEA key; a brute-force trial costs 15 instructions per key value (this figure is taken to already include the work of encrypting the 8-byte test plaintext with the candidate key, as no separate per-block instruction count is given); attacker computers of 3000 MIPS and (after extrapolation) 300,000 MIPS.

Given data
QuantityValue
DES key length56 bits
IDEA key length128 bits
Instructions per key trial15
Attacker computer speed (case 1)3000 MIPS
Attacker computer speed (case 2)300,000 MIPS

Find. The estimated wall-clock time to brute-force a 56-bit DES key and a 128-bit IDEA key, at 3000 MIPS and at 300,000 MIPS.

Approach. Take the expected number of keys a brute-force search must try before finding the right one as half the key space, $2^{n-1}$ for an $n$-bit key (the attacker is expected to find the key on average halfway through an exhaustive, non-repeating search); multiply by 15 instructions per trial to get total instructions, then divide by the computer's instruction rate.

Check — average-case assumption. "Estimate the time required to crack" is read here as the expected (average-case) time, i.e. $2^{n-1}$ trials, which is the standard convention for brute-force key-search estimates; a worst-case estimate (trying the full $2^{n}$ key space) would simply double every figure below.
  1. Keys to try. DES: $\dfrac{2^{56}}{2}=2^{55}\approx 3.6029\times10^{16}$ keys. IDEA: $\dfrac{2^{128}}{2}=2^{127}\approx 1.7014\times10^{38}$ keys.
  2. Total instructions. DES: $2^{55}\times15\approx 5.4043\times10^{17}$ instructions. IDEA: $2^{127}\times15\approx 2.5521\times10^{39}$ instructions.
  3. Cracking time at 3000 MIPS ($3000\times10^{6}=3\times10^{9}$ instructions/s). DES: $$\boxed{t_{DES,3000}=\dfrac{5.4043\times10^{17}}{3\times10^{9}}\approx1.8014\times10^{8}\ \text{s}\approx5.71\ \text{years}}$$ IDEA: $$\boxed{t_{IDEA,3000}=\dfrac{2.5521\times10^{39}}{3\times10^{9}}\approx8.507\times10^{29}\ \text{s}\approx2.70\times10^{22}\ \text{years}}$$
  4. Extrapolate to 300,000 MIPS (a factor of 100 faster than 3000 MIPS, so every time above simply divides by 100). $$\boxed{t_{DES,300000}\approx1.8014\times10^{6}\ \text{s}\approx20.85\ \text{days}}$$ $$\boxed{t_{IDEA,300000}\approx8.507\times10^{27}\ \text{s}\approx2.70\times10^{20}\ \text{years}}$$
Final Results — Q5(b)
Key / attacker3000 MIPS300,000 MIPS
56-bit DES≈ 5.71 years≈ 20.85 days
128-bit IDEA≈ 2.70×1022 years≈ 2.70×1020 years

The hundred-fold speed-up moves 56-bit DES from a multi-year effort to a matter of weeks — well within reach of a well-resourced attacker or consortium, which is exactly the historical argument for retiring DES in favour of longer keys (Triple-DES, then AES). By contrast, no realistic increase in computing power makes 128-bit IDEA brute-forceable: even a further hundred-fold speed-up beyond 300,000 MIPS would still leave a cracking time many orders of magnitude longer than the age of the universe, because doubling the key length squares the size of the search space rather than merely doubling it.