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.
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.
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.
Related concepts
- logical XORuses · Logical XOR is a binary operation that produces true when exactly one operand is true and false when both operands have the same truth value.
- encryptionkind of · Encryption is the cryptographic transformation of readable data into ciphertext to conceal its contents, reversible through decryption with appropriate information.
- digital imageuses · A digital image is visual content encoded as data, typically as a two-dimensional arrangement of pixels or equivalent visual elements.
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.

