The Mathematics of Network Security

Modern cryptography relies heavily on mathematical principles. Here we explore some of the key formulae that underpin network security.

RSA Key Generation#

The security of RSA depends on the difficulty of factoring large semiprimes. Given two large primes $p$ and $q$, we compute:

$$n = p \cdot q$$

The totient is calculated as:

$$\phi(n) = (p - 1)(q - 1)$$

We then choose $e$ such that $1 < e < \phi(n)$ and $\gcd(e, \phi(n)) = 1$, and compute the private key $d$ where: