liveBook · Manning

One-time pad

A one-time pad is a symmetric encryption technique that combines plaintext with a truly random, equally long secret key that is never reused.

How 2 Manning books explain it

Hacking Cryptography

A one-time pad is an encryption technique that combines plaintext with a truly random key of equal length that is never reused.

How it is used
Frames XOR encryption as a perfectly secure construction and contrasts it with practical stream-cipher designs.
How deep it goes
Defines the construction, derives XOR attacks, and explains key transport limits without detailing a complete production implementation.
Examples
Uses “HELLO WORLD,” guessed greetings, XOR equations, and WEP compromise to demonstrate construction and failure.
What you can do after
Build it from scratch with random equal-length keys, apply XOR correctly, and diagnose known-plaintext or key-reuse exposure.

Read how Hacking Cryptography explains one-time pad →

Classic Computer Science Problems in Swift: Essential techniques for practicing programmers

A symmetric encryption technique that combines plaintext with an equally long, secret, random pad so that the plaintext cannot be recovered without both resulting components.

How it is used
Uses byte-wise encryption to demonstrate a small, reusable programming building block.
How deep it goes
Explains pad criteria, UTF-8 byte handling, XOR, and Swift encryption and decryption, but stops short of formal security proofs.
Examples
Demonstrates encrypting a UTF-8 String in Swift and proposes encrypting and decrypting images.
What you can do after
Build it from scratch with Swift byte arrays, random pads, XOR encryption, and UTF-8 decryption.

Read how Classic Computer Science Problems in Swift: Essential techniques for practicing programmers explains one-time pad →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.