Chapter 5:
Cryptography
- Cryptology is the art and
science of making and breaking "secret codes".
- Cryptography is the art and
science of making "secret codes".
- Cryptanalysis is the art and
science of breaking "secret codes".
- Crypto is an abbreviation
for any or all of the above, and then some.
- Example 1: Simple substitution
- Example 2: Double transposition
- Example 3: One-time pad
- A cryptosystem can be used to
encrypt "plain" information, or
plaintext.
The result of encryption is
ciphertext.
A cryptosystem must be invertible so that we can
decrypt
the ciphertext to recover the plaintext.
Keys
are used to configure a cryptosystem for
encryption and decryption.
In a symmetric key
cryptosystem, the same key is used to encrypt
and decrypt.
In a public key
cryptosystem, one key (a public key) is used to encrypt
and a different key (a private key) is used to decrypt.
Alternatively, a private key can be used to encrypt,
thus creating a digital signature.
- The security of a cryptosystem is
the amount of work required to break the system using the best
available attack. If any short-cut attack is known (whether
practical or not), a cryptosystem is usually considered
insecure.
- Types of cryptanalytic attacks:
- Ciphertext only
- Known plaintext
- Chosen plaintext
- Fundamental tenet of cryptography: If lots of people have failed
to solve a problem, then it probably won't be solved (soon).
-
Kerckhoff's Principle (or Shannon's Maxim)
states that the security of a system should not depend
on a "secret" design.
- History
- Taxonomy of cryptosystems
- Manual cryptosystems
- One-time pad (VENONA)
- Double transposition, etc.
- Machine cryptosystems
- Symmetric Key (or Secret Key) cryptography
- Stream ciphers --- often based on shift registers
- A5
- RC4
- PKZIP
- Military systems
- Hardware-based
- Block ciphers (Codebook algorithms) --- many modern block ciphers
use the method of Feistel
- DES and triple DES
- AES (or Rijndael)
- IDEA
- Blowfish
- RC5 and RC6
- TEA
- Modes of operation
- Uses for symmetric key cryptography
- Public Key (or 2-key) cryptography --- "trapdoor one-way function",
can be used to encrypt/decrypt
and for digital signatures
- Modular arithemetic
- Knapsack
- RSA
- Diffie-Hellman
- El Gamal
- Elliptic curves --- to speed up private key operations
- Uses for public key cryptography
- Secrecy/Confidentiality
- Transmitting data over an insecure channel
- Secure storage on insecure media
- Authentication
- Digital signature --- integrity and
non-repudiation
- Hash functions --- message digest or "one-way function"
- Necessary hash function properties
- Collisions and the birthday problem
- SHA-1
- MD5
- HMAC --- MAC or keyed hash
- Uses for hash functions
- Authentication (HMAC)
- Message integrity (HMAC)
- Message fingerprinting (hashes condense data)
- Data corruption detection (e.g., downloading a file)
- Digital signature efficiency
- Anything you can do with a symmetric key cryptosystem
- Other crypto topics
- Quotes
- On crypto in the real world:
"Crypto
is usually only part of a very much larger system. It gets
a lot of attention because it is mathematically interesting;
but as correspondingly little attention is paid to
the "boring" bits such as training, usability, standards,
and audit, it's rare that the bad guys have to
break the crypto to compromise a system." --- Ross Anderson
(in reference to ATM's)
- Of course, Schneier has an opinion: Goto
here
- On crypto in software: "I don't
know how to to be
confident even of a digital signature I make on my own PC,
and I've worked in security for over fifteen years. Checking all
of the software in the critical path between the display and the
signature software is way beyond my patience." --- Ross Anderson
- On cryptanalysis: "Crypto
experts won't trust a cryptosystem until they have attacked it...
But their attacks generally don't go any further than demonstrating a
system's vulnerabilities in the abstract. All they want to be able
to say [is that] in theory this system could be attacked
in the following way because from a formal number-theory standpoint
it belongs to such-and-such class of problems, and those problems
as a group take about so many processor cycles to attack... But
the gap between demonstrating the vulnerability of a cryptosystem
in the abstract and actually breaking a bunch of messages written
in that cryptosystem, is as wide, and as profound, as the gap
between being able to criticize a film (e.g., by slotting it into
a particular genre or movement) and being able to go out into the
world with a movie camera and a bunch of unexposed film and actually
make one." --- Neal Stephenson, Cryptonomicon,
Avon Books, New York, 1999, p. 742