Certificates give a very practical example of applied math.
Our Example Certificate tells us that we should use the RSA algorithm to check the signature. RSA found a clever way to combine ideas spanning 2,000 years of math development to come up with a beautifully simple algorithm:
It is really important to remember that "e" and "d" are inverses of each other.
Now, if you have some Message, you just need to interpret its bytes as a number "M"
A Private Key can be used for Decryption of a message that was encrypted using the corresponding Public Key, or to sign a message; but a Private Key cannot be used for the Encryption of a message.
Just as interesting is that the person with Private Key "d" can "sign" a document by raising a Message "M" to the "d" Public Key Certificate Exponent:
Md ≡ S (mod n)
This works because "signer" makes Public "S", "M", "e", and "n." Anyone can verify the signature S with a simple calculation:
Se ≡ (Md)e ≡ Me*d ≡ Me*d ≡ M1 ≡ M (mod n)
Reducing everything "mod n" makes it impossible to use the easy techniques that we were used to such as normal logarithms.
The magic of RSA works because you can calculate/Encrypt:
C ≡ Me (mod n)
very quickly, but it is really hard to calculate/decrypt
Cd ≡ M (mod n)
without knowing "d"
As we saw earlier, "d", is derived from factoring "n" back to its "p" and "q", which is a tough problem.