PKI theory
In this section, we will cover the necessary theory and terminology that will be used later on in the chapter. First of all, what is public key cryptography? It is an asymmetric cryptographic system that uses a pair of related keys. Secondly, how does it work? In plain words, the user generates two keys (private and public) and uses the private key for decryption/signing the message. The second key is available for everyone (which is why it is called public) to encrypt/check the signature of the message. These two keys are mathematically tied, but it is not possible to recover the private key from the public key. Keeping in mind the concept that has just been described, we can now discuss PKI in more detail.
The most important components of PKI are the Certification Authority (CA), Registration Authority (RA), central directory, certificate management system, and certificate policy. The CA is the heart of PKI. Using its own private key, it signs the public key bound to...