This book offers a comprehensive yet relentlessly practical overview of the fundamentals of modern cryptography. It contains a wide-ranging library of code in C and C++, including the RSA algorithm, completed by an extensive Test Suite that proves that the code works correctly. Readers will learn, step by step, how to implement a platform-independent library for the all-important multiprecision arithmetic used in modern cryptography. This is followed by an implementation of the cryptographic algorithms themselves.

This book covers everything you need to know to write professional-level cryptographic code. This expanded, improved second edition includes about 100 pages of new material as well as numerous improvements to the original text.

The chapter about random number generation has been completely rewritten, and the latest cryptographic techniques are covered in detail. Furthermore, this book covers the recent improvements in primality testing.

Modular Arithmetic: Calculating with Residue Classes

Basic Number-Theoretic Functions

Let C++ Simplify Your Life

The LINT Public Interface: Members and Friends

REVIEW