Chapter 6

Crypto Basics

For there is nothing covered, that shall not be revealed; neither hid, that shall not be known.

—Luke 12:2

The magic words are squeamish ossifrage—Solution to RSA challenge problem posed in 1977 by Ron Rivest, who estimated that breaking the message would require 40 quadrillion years. It was broken in 1994.

6.1 Introduction

Perhaps the best ways to gain a strong understanding of cryptography is by trying to break ciphers. As an added bonus, breaking ciphers puts us in the role of our all-purpose attacker, Trudy, and we need to think like Trudy if we are going to make our systems more secure.

In previous chapters, we’ve seen a few simple cryptanalytic attacks. In this chapter, we kick it up a few notches and examine some relatively involved attacks. Specifically, we’ll discuss the following cryptanalytic attacks.

  • An attack on the most famous World War II cipher, the Enigma
  • The attack on RC4, as used in WEP
  • Linear and differential cryptanalysis of a block cipher
  • The lattice reduction attack on the knapsack
  • A timing attack on RSA

In World War II, the Nazis believed the Enigma cipher was invincible. Polish and British cryptanalysts proved otherwise. The idea behind the attack we describe was used to break Enigma messages, and yielded invaluable intelligence during the war. The attack illustrates some of the shortcomings of pre-modern ciphers.

Next, we consider an attack on RC4. This attack is specific to the way that RC4 is used in WEP. In this case, a relatively ...

Get Information Security: Principles and Practice, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.