1 of 20

C H A P T E R 8

Cryptography

Cipher Methods • Algorithms • Tools • Secure Protocols

Principles of Information Security, 6th Edition | Whitman & Mattord

2 of 20

Learning Objectives

1. Define cryptology, cryptography, and cryptanalysis; explain plaintext, ciphertext, key, key space, work factor

2. Describe cipher methods: substitution, transposition, XOR, one-time pad, book, and running key ciphers

3. Explain symmetric encryption: DES (broken), 3DES (deprecated), AES, Blowfish, RC4 (broken)

4. Explain asymmetric (public key) encryption: RSA, Diffie-Hellman, ECC, El Gamal

5. Describe cryptographic hash functions: MD5 (broken), SHA-1 (broken), SHA-256, SHA-3, HMAC

6. Explain digital signatures, digital certificates, Certificate Authorities, and PKI

7. Understand TLS (versions 1.0–1.3), S/MIME, PGP, SSH, and HTTPS protocols

8. Describe IPSec (AH vs ESP, Transport vs Tunnel mode) and wireless security (WEP→WPA3)

Chapter 8: Cryptography

Objectives

3 of 20

Foundations of Cryptology — Core Terminology

CRYPTOLOGY

Science of both making (cryptography) and breaking (cryptanalysis) secret codes

PLAINTEXT

Original readable message before encryption is applied

CIPHERTEXT

Scrambled, unreadable output produced by encryption

CIPHER

The algorithm used to transform plaintext into ciphertext and back

KEY

Value used by the algorithm to control encryption/decryption

KEY SPACE

All possible key values: 2^n for n-bit key — larger = more secure

WORK FACTOR

Computational effort to break a cipher — measures cryptographic strength

STEGANOGRAPHY

Hiding the EXISTENCE of a message in a carrier — different from encryption

KEY SPACE & BRUTE-FORCE RESISTANCE

40-bit key

~1 trillion

Seconds (WEP — BROKEN)

56-bit key

~72 quadrillion

Hours (DES — BROKEN)

128-bit key

~340 undecillion

Billions of years (AES-128)

256-bit key

~1.16×10^77

Quantum-safe (AES-256)

Chapter 8: Cryptography

Cryptology Foundations

4 of 20

Cipher Methods — Substitution, Transposition, XOR & One-Time Pad

Substitution

Replaces each plaintext element with another according to a rule. Monoalphabetic (Caesar: shift by 3) or Polyalphabetic (Vigenère: keyword determines shift).

Weakness: Frequency analysis breaks monoalphabetic ciphers; Kasiski examination breaks polyalphabetic

Transposition

Rearranges the POSITIONS of plaintext elements without changing them. Rail fence: write diagonally then read rows. Columnar: write in rows, read columns in key order.

Weakness: Letter frequency is preserved; statistical attacks possible on simple transposition

XOR Operation

Fundamental binary operation: output=1 if inputs differ. Reversible: Ciphertext=Plaintext XOR Key; Plaintext=Ciphertext XOR Key. Core of all stream ciphers and most block ciphers.

Weakness: If key is reused (same IV), XOR of two ciphertexts = XOR of plaintexts (crib-dragging)

One-Time Pad (OTP)

Vernam cipher with truly random key, same length as message, used ONLY ONCE. Information-theoretically UNBREAKABLE — ciphertext reveals nothing about plaintext. Impractical due to key distribution.

Weakness: Only weakness: key distribution, reuse, and non-random generation destroy security

Book Cipher

Key derived from an agreed-upon book or text. Page/line/word numbers serve as key. Security depends entirely on secrecy of which book is used.

Weakness: If the book is discovered, entire system is broken

Running Key Cipher

Like Vigenère but uses a long (non-repeating) text as the key — as long as the message. Avoids periodic repetition, defeating Kasiski examination.

Weakness: Security depends on randomness and secrecy of the key text

Chapter 8: Cryptography

Cipher Methods

5 of 20

Symmetric Encryption Algorithms

Symmetric encryption: SAME key for encrypt and decrypt. Fast (100–1000× asymmetric). Key distribution problem: must securely share key before communicating.

DES

BROKEN

Key:

56-bit

Block:

64-bit

1977 NIST standard. 16-round Feistel network. Brute-forced in 56 hrs (1998 EFF). Key space too small.

3DES

Deprecated

Key:

112/168-bit

Block:

64-bit

EDE: Encrypt-Decrypt-Encrypt with 2 or 3 keys. NIST deprecated 2017; disallowed after 2023.

AES-128

✓ Standard

Key:

128-bit

Block:

128-bit

FIPS 197 (2001). Rijndael algorithm. 10 rounds. Efficient in HW and SW. Current minimum standard.

AES-256

✓ Quantum-safe

Key:

256-bit

Block:

128-bit

14 rounds. Highest security. Grover's algorithm: 256→128-bit effective. Quantum-resistant.

RC4

BROKEN

Key:

Variable

Block:

Stream

Ron Rivest stream cipher. Used in WEP and early SSL. RC4 bias attacks (NOMORE). RFC 7465 bans in TLS.

Blowfish

Legacy

Key:

32–448-bit

Block:

64-bit

Bruce Schneier (1993). Patent-free and fast. 64-bit block → SWEET32 birthday attack. Superseded by Twofish.

Chapter 8: Cryptography

Symmetric Algorithms

6 of 20

Asymmetric (Public Key) Encryption

Key pair: PUBLIC key (freely shared) + PRIVATE key (kept secret). What one key encrypts, only the other decrypts.

CONFIDENTIALITY

1

Encrypt with recipient's PUBLIC key

2

Only recipient's PRIVATE key decrypts

3

Anyone can send; only recipient reads

AUTHENTICATION (Digital Signature)

1

Sign with sender's PRIVATE key

2

Anyone with sender's PUBLIC key verifies

3

Only the private key holder could have signed

RSA

Prime factorization

Most widely used. 2048-bit minimum. Key exchange, digital signatures, certificates. Named after Rivest, Shamir, Adleman (1977).

Diffie-Hellman

Discrete logarithm

Key exchange ONLY (not encryption). Invented 1976. First practical solution to key distribution problem. Vulnerable to MitM without authentication.

ECC

Elliptic curves

Elliptic Curve Cryptography. 256-bit ECC ≈ 3072-bit RSA. More efficient — ideal for mobile and IoT. Used in TLS (ECDHE), Bitcoin.

El Gamal

Discrete logarithm

Used for encryption and signatures. Basis for DSA (Digital Signature Standard). Ciphertext ~2× plaintext size. Used in PGP/GPG.

★ Sign with PRIVATE key → verify with PUBLIC key. Encrypt with PUBLIC key → decrypt with PRIVATE key.

Chapter 8: Cryptography

Asymmetric Encryption

7 of 20

Cryptographic Hash Functions

One-way function: any-length input → fixed-length output (digest). Cannot be reversed. Properties: pre-image resistance, collision resistance, avalanche effect.

Algorithm

Output

Status

Notes / Use Case

MD5

128 bits

BROKEN

Collision attacks demonstrated 1996, practical 2004. Non-security checksums only. NEVER for passwords.

SHA-1

160 bits

BROKEN

SHAttered attack (2017) — full collision demonstrated. Banned in certificates. Do NOT use.

SHA-256

256 bits

✓ Standard

SHA-2 family. Current minimum for security applications. TLS, code signing, Bitcoin blockchain.

SHA-384

384 bits

✓ High Sec

SHA-2 family. NSA Suite B. High-security TLS configurations.

SHA-512

512 bits

✓ High Sec

SHA-2 family. Faster than SHA-256 on 64-bit systems.

SHA-3 (Keccak)

224–512b

✓ Modern

Different design (sponge construction vs Merkle-Damgård). NIST 2015. Not widely deployed yet.

bcrypt/Argon2

Variable

✓ Passwords

Deliberately SLOW + salted. Purpose-built for password storage. Use instead of SHA for passwords.

★ MD5 & SHA-1 are BROKEN. Use SHA-256+ for integrity. Use bcrypt/Argon2 for passwords. NEVER store unsalted hashes.

Chapter 8: Cryptography

Hash Functions

8 of 20

Digital Signatures, Certificates & PKI

DIGITAL SIGNATURE PROCESS

SIGN (Sender)

Hash the message → Encrypt hash with PRIVATE key → Attach signature

SEND

Message + digital signature transmitted to recipient

VERIFY (Recipient)

Decrypt signature with sender's PUBLIC key → Compare with hash of received message → MATCH = valid

PKI TRUST HIERARCHY

Root CA

Self-signed; kept OFFLINE for security; trust anchor; signs intermediate CA certs only

Intermediate CA

Online; signs end-entity certificates; if compromised, limited scope revocation

End-Entity Cert

Server (TLS), person (S/MIME), code (signing); contains subject's public key

PKI COMPONENTS

CRL:

Certificate Revocation List — list of revoked certificate serial numbers published by CA

OCSP:

Online Certificate Status Protocol — real-time single-certificate validity checking

RA:

Registration Authority — handles identity verification on behalf of CA

LDAP:

Certificate repository — stores certificates and CRLs for retrieval

Chapter 8: Cryptography

Digital Signatures & PKI

9 of 20

SSL/TLS — Securing Web and Network Communications

TLS VERSION STATUS

SSL 2.0

BROKEN

Multiple critical flaws. Deprecated 2011.

SSL 3.0

POODLE

POODLE attack. Deprecated 2015.

TLS 1.0

Deprecated

BEAST, POODLE; PCI DSS prohibited since 2018.

TLS 1.1

Deprecated

RFC 8996 deprecated. PCI DSS prohibited.

TLS 1.2

Min. Standard

Secure when configured correctly. Avoid weak ciphers.

TLS 1.3

✓ BEST

Forward secrecy mandatory. All weak ciphers removed. Faster.

TLS HANDSHAKE (HYBRID ENCRYPTION)

1

1. Client Hello:

Supported TLS versions + cipher suites

2

2. Server Hello + Cert:

Chosen cipher suite + X.509 certificate

3

3. Key Exchange:

Verify cert; DHE/ECDHE generates session keys (PFS)

4

4. Session Keys:

Both derive symmetric session key from exchange

5

5. Symmetric Data:

All application data encrypted with AES-GCM/ChaCha20

TLS = HYBRID: Asymmetric (RSA/ECDHE) for key exchange + Symmetric (AES) for bulk data.

Chapter 8: Cryptography

TLS/SSL

10 of 20

Email Security — S/MIME vs PGP

S/MIME

Secure/Multipurpose Internet Mail Extensions

Trust: Hierarchical PKI — X.509 Certificates from Certificate Authorities

Sender signs email with own PRIVATE key

Recipient encrypts with sender's PUBLIC key (from X.509 cert)

Both parties need valid X.509 certificates

Built into Outlook, iOS Mail, Apple Mail

✓ Enterprise-friendly; managed PKI; certificate revocation support

✗ Requires certificate from CA; cost; PKI administration overhead

PGP / GPG

Pretty Good Privacy / GNU Privacy Guard

Trust: Web of Trust — users vouch for each other's public keys

Same encrypt/sign operations as S/MIME

Keys generated by users; no CA required

Users exchange public keys directly or via keyserver

GPG is free, open-source OpenPGP implementation

✓ No CA required; free; strong security; suitable for individual use

✗ Decentralized key management; harder for enterprise; requires plugin

Chapter 8: Cryptography

S/MIME & PGP

11 of 20

IPSec — Internet Protocol Security

IPSec: Security at the IP layer (Layer 3). Used for VPNs. Two protocols: AH (auth only) and ESP (encryption + auth). Two modes: Transport and Tunnel.

AH — Authentication Header

Provides: Authentication + Integrity — NO encryption

• Authenticates entire IP packet (including outer header)

• Provides data integrity and source authentication

• Does NOT encrypt — content visible to eavesdroppers

• Incompatible with NAT (covers IP header which NAT modifies)

ESP — Encapsulating Security Payload

Provides: Encryption + Authentication + Integrity

• Encrypts IP payload (data)

• Optional authentication of packet

• NAT-compatible (does not cover outer IP header)

• The most commonly used IPSec protocol in practice

IPSEC MODES

TRANSPORT MODE

Protects: IP PAYLOAD only (data)

Header: Original IP header visible

Use: Host-to-host protection. Two systems communicating directly.

TUNNEL MODE

Protects: ENTIRE original packet

Header: New outer IP header added

Use: Site-to-site VPN. Gateway-to-gateway. Entire packet encrypted.

Chapter 8: Cryptography

IPSec

12 of 20

SSH, HTTPS & Secure Protocol Port Reference

SSH (Secure Shell) (Port TCP 22)

Secure remote administration, file transfer (SFTP/SCP), and port forwarding. Replaced: Telnet (23), FTP (21), rsh/rlogin. Authentication: password or public key (preferred).

HTTPS (Port TCP 443)

HTTP over TLS. Server certificate verifies website identity. All data encrypted. HSTS (HTTP Strict Transport Security) prevents SSL stripping downgrade attacks.

SECURE PROTOCOL PORT REFERENCE

Protocol

Port

Purpose

HTTPS

443

HTTP over TLS — secure web browsing

SMTPS

465 / 587

SMTP over TLS — secure email sending

IMAPS

993

IMAP over TLS — secure email retrieval

POP3S

995

POP3 over TLS — secure email retrieval

SSH / SFTP / SCP

22

Secure shell, secure file transfer, secure copy

FTPS

990 (implicit) / 21 (explicit)

FTP over TLS — secure file transfer

LDAPS

636

LDAP over TLS — secure directory services

DNSSEC

53

DNS with digital signatures (integrity, not encryption)

Chapter 8: Cryptography

SSH & Protocol Ports

13 of 20

Wireless Security Protocols — WEP, WPA, WPA2, WPA3

WEP

1999

COMPLETELY BROKEN

Encryption:

RC4 (40/104-bit)

Key Mgmt:

Static IV (24-bit)

IV too short (24-bit) — reused quickly. RC4 keystream recovery in minutes. Aircrack-ng breaks WEP trivially. NEVER USE.

WPA

2003

DEPRECATED — avoid

Encryption:

TKIP (RC4-based)

Key Mgmt:

Per-packet key mixing

TKIP was interim fix for WEP. RC4 still vulnerable. WPA PSK offline dictionary attacks remain possible. Use WPA2 minimum.

WPA2

2004

CURRENT MINIMUM ✓

Encryption:

CCMP (AES-128)

Key Mgmt:

4-way handshake + PSK

802.11i standard. AES/CCMP is strong. KRACK (2017) affects handshake but patched. WPA2-Enterprise (802.1X) preferred over PSK for corporate.

WPA3

2018

RECOMMENDED BEST ✓✓

Encryption:

GCMP (AES-256)

Key Mgmt:

SAE (Dragonfly)

SAE replaces PSK — eliminates offline dictionary attacks. PMF (Protected Management Frames) mandatory. 192-bit mode for enterprise. Forward secrecy per session.

★ WEP = BROKEN (never use). WPA = deprecated. WPA2 = current minimum. WPA3 = best standard (SAE, PMF).

Chapter 8: Cryptography

Wireless Security

14 of 20

Key Exam Distinctions — Chapter 8 Cryptography

Symmetric vs Asymmetric?

Symmetric: same key, fast, key distribution problem. Asymmetric: key pair (public/private), slow, solves key distribution. Hybrid systems use both.

Sign vs Encrypt key direction?

Sign: PRIVATE key signs, PUBLIC key verifies. Encrypt: PUBLIC key encrypts, PRIVATE key decrypts. Opposite directions — common exam trap.

Hash vs HMAC vs Digital Signature?

Hash: integrity only. HMAC: integrity + authentication (shared key). Digital Signature: integrity + authentication + non-repudiation (key pair).

DES vs AES status?

DES (56-bit) = BROKEN (brute-forceable). 3DES = deprecated. AES-128 = current minimum. AES-256 = quantum-resistant. AES = NIST FIPS 197.

MD5 vs SHA-1 vs SHA-256?

MD5 = BROKEN (collisions 2004). SHA-1 = BROKEN (SHAttered 2017). SHA-256 = current minimum standard. Use bcrypt/Argon2 for passwords.

IPSec AH vs ESP?

AH: authentication/integrity ONLY, no encryption, incompatible with NAT. ESP: encryption + authentication, NAT-compatible, most common. ESP can include AH's functions.

Transport mode vs Tunnel mode?

Transport: encrypts payload only, original IP header visible, host-to-host. Tunnel: encrypts entire original packet, new outer header added, site-to-site VPN.

S/MIME vs PGP trust model?

S/MIME: hierarchical PKI — X.509 certificates from Certificate Authorities. PGP: web of trust — users vouch for each other's public keys. No CA required.

Chapter 8: Cryptography

Key Distinctions

15 of 20

Algorithm & Protocol Quick Reference

Algorithm

Type

Key/Output

Status

Quantum?

Primary Use

DES

Sym Block

56-bit

BROKEN

✗ No

Legacy only — do not use

3DES

Sym Block

112/168-bit

Deprecated

✗ No

Phasing out

AES-128

Sym Block

128-bit

✓ Standard

TLS, disk enc, WPA2

AES-256

Sym Block

256-bit

✓ Quantum-safe

High security, long-term

RC4

Stream

Variable

BROKEN

✗ No

Banned in TLS (RFC 7465)

Blowfish

Sym Block

32–448-bit

Legacy

✗ No

Not recommended (64-bit block)

RSA-2048

Asymmetric

2048-bit

✓ Min. Std.

Key exchange, signatures, certs

ECC P-256

Asymmetric

256-bit

✓ Recommended

TLS, mobile, IoT, Bitcoin

Diff-Hellman

Key Exch

2048+

✓ (DHE=PFS)

Key exchange in TLS, IPSec

MD5

Hash

128-bit out

BROKEN

✗ No

Checksums only — not security

SHA-1

Hash

160-bit out

BROKEN

✗ No

Do not use — deprecated

SHA-256

Hash

256-bit out

✓ Standard

TLS, code signing, Bitcoin

HMAC-SHA256

MAC

256-bit out

✓ Standard

TLS record integrity, IPSec

Chapter 8: Cryptography

Algorithm Quick Ref

16 of 20

Exam Tips — Chapter 8 Cryptography

1

DES (56-bit) = BROKEN. 3DES = deprecated. AES-128 = current standard (FIPS 197). AES-256 = quantum-resistant. Never deploy DES.

2

Symmetric: same key, fast, key distribution problem. Asymmetric: key pair, slow, solves key distribution. TLS uses HYBRID: ECDHE (key exchange) + AES (bulk data).

3

Sign with PRIVATE key → verify with PUBLIC key. Encrypt with PUBLIC key → decrypt with PRIVATE key. These use keys in OPPOSITE directions.

4

MD5 = BROKEN (2004). SHA-1 = BROKEN (SHAttered 2017). SHA-256 = current minimum. Argon2/bcrypt for passwords (deliberately slow + salted).

5

HMAC = hash + secret key → integrity AND authentication. Plain hash → integrity only. Digital signature → integrity + auth + non-repudiation.

6

IPSec: AH = auth/integrity only (NO encryption, NAT-incompatible). ESP = encryption + auth (NAT-compatible, most common). Transport = payload only. Tunnel = full packet.

7

TLS 1.0/1.1 = deprecated. TLS 1.2 = minimum. TLS 1.3 = best (forward secrecy mandatory). S/MIME = X.509 PKI. PGP = web of trust. SSH port 22.

8

WEP = BROKEN (24-bit IV). WPA = deprecated (TKIP). WPA2 = current minimum (AES-CCMP). WPA3 = best (SAE eliminates offline dict attacks, PMF mandatory).

Chapter 8: Cryptography

Exam Tips

17 of 20

Key Management & Cryptographic Tools — Supporting Infrastructure

KEY MANAGEMENT LIFECYCLE

1

Generation:

CSPRNG (Cryptographically Secure PRNG). Hardware RNG for high-value keys. Entropy quality critical.

2

Distribution:

Key encapsulation with asymmetric crypto; Diffie-Hellman; secure key exchange protocols.

3

Storage:

Hardware Security Module (HSM); encrypt keys at rest; separate key from encrypted data.

4

Rotation:

Replace before expiry; re-encrypt data with new key; automate rotation where possible.

5

Destruction:

Cryptographic erasure; multiple overwrites; HSM key zeroization; certificate of destruction.

CRYPTOGRAPHIC TOOLS

HSM (Hardware Security Module)

Physical device for secure key generation, storage, and management. Keys never leave the HSM in plaintext. Tamper-resistant. Required for PKI root keys and payment systems.

Certificate Authority Software

Issues and manages digital certificates. Examples: Microsoft AD CS, OpenSSL, Let's Encrypt (free DV certificates for HTTPS).

Key Management Service (KMS)

Cloud-based or on-premise systems managing cryptographic keys at scale. AWS KMS, Azure Key Vault, Google Cloud KMS, HashiCorp Vault.

Password Hashing Tools

bcrypt, scrypt, Argon2 — deliberately slow hash functions with built-in salting for secure password storage. NIST recommends Argon2.

Chapter 8: Cryptography

Key Management & Tools

18 of 20

Hybrid Encryption in Practice — How TLS Works

TLS combines ALL THREE cryptography types: Asymmetric (key exchange + auth) + Symmetric (bulk encryption) + Hash (integrity). This is HYBRID encryption.

1

Authentication

Asymmetric Phase

Server presents X.509 certificate. Client verifies using CA chain. RSA or ECDSA signature proves server identity.

Solves authentication problem — confirms you're talking to the real server

2

Key Exchange (ECDHE)

Asymmetric Phase

Ephemeral Diffie-Hellman generates new session key material for THIS session only. Neither party transmits the actual key.

Provides Perfect Forward Secrecy (PFS) — compromise of server key does not expose past sessions

3

Session Key Derivation

Symmetric Phase

Both sides derive the same symmetric session keys from the DH exchange. AES-128 or AES-256 keys generated.

Fast symmetric keys ready for bulk data — solves the speed problem

4

Record Integrity (HMAC/AEAD)

Hash/MAC Phase

Each TLS record authenticated with HMAC or AEAD (GCM). Prevents tampering with encrypted data in transit.

Detects any modification to encrypted traffic — provides integrity alongside confidentiality

Chapter 8: Cryptography

Hybrid Encryption / TLS

19 of 20

Historical Ciphers & Steganography

HISTORICAL CIPHERS — Foundation Concepts

Caesar Cipher

~50 BC

Shifts each letter by 3 (A→D). Monoalphabetic substitution. Broken by frequency analysis — "E" is most common letter.

Vigenère

1553

Polyalphabetic: keyword determines shift at each position. Resists simple frequency analysis. Broken by Kasiski examination.

Enigma Machine

WWII

German electro-mechanical rotor cipher. Broke by Turing at Bletchley Park using cribs (known plaintext). Changed WWII outcome.

One-Time Pad

1917

Vernam cipher. Theoretically unbreakable if used correctly. Impractical due to key distribution problem (key as long as message).

DES

1977

First US government encryption standard. 56-bit key. Broken by EFF Deep Crack in 56 hours (1998). Replaced by AES (2001).

STEGANOGRAPHY vs CRYPTOGRAPHY

CRYPTOGRAPHY: Hides the CONTENT of a message (message existence is known)

STEGANOGRAPHY: Hides the EXISTENCE of a message inside a carrier (image, audio)

Chapter 8: Cryptography

Historical Ciphers & Steg

20 of 20

Chapter 8 Summary — Key Takeaways

1

Cipher methods: Substitution (replace elements) + Transposition (rearrange positions). XOR is the core operation. One-time pad = theoretically unbreakable.

2

Symmetric encryption: DES (BROKEN/56-bit), 3DES (deprecated), AES-128 (current standard), AES-256 (quantum-resistant). RC4 = BROKEN stream cipher.

3

Asymmetric: RSA (factoring), Diffie-Hellman (key exchange only, discrete log), ECC (256-bit ≈ 3072-bit RSA), El Gamal (basis for DSA/PGP).

4

Hash functions: MD5 (BROKEN), SHA-1 (BROKEN), SHA-256 (current standard). HMAC = hash + key. Digital signature = integrity + auth + non-repudiation.

5

PKI: Root CA (offline) → Intermediate CA → End-entity cert (X.509). CRL = revocation list. OCSP = real-time. S/MIME = PKI. PGP = web of trust.

6

TLS 1.0/1.1 = deprecated. TLS 1.2 = minimum. TLS 1.3 = best (PFS mandatory). Hybrid: ECDHE (key exchange) + AES (encryption) + HMAC (integrity).

7

IPSec: AH = auth only (no encryption, NAT-incompatible). ESP = encryption + auth. Transport mode = payload. Tunnel mode = full packet (site-to-site VPN).

8

WEP = BROKEN (24-bit IV). WPA = deprecated (TKIP). WPA2 = current minimum (AES-CCMP). WPA3 = best (SAE, PMF). SSH port 22. HTTPS port 443.

Principles of Information Security, 6th Edition | Whitman & Mattord | Chapter 8: Cryptography