For small networks, the use of preshared keys in an IPSec configuration is often sufficient. However, as a network grows, it can become a challenge to add new preshared keys on the local routing platform and all new and existing IPSec peers. One solution for scaling an IPSec network is to use digital certificates.
A digital certificate implementation uses the public key infrastructure (PKI), which requires you to generate a key pair consisting of a public key and a private key. The keys are created with a random number generator and are used to encrypt and decrypt data. In networks that do not use digital certificates, an IPSec-enabled device encrypts data with the private key and IPSec peers decrypt the data with the public key.
With digital certificates, the key sharing process requires an additional level of complexity. First, you and your IPSec peers request a certificate authority (CA) to send you a CA certificate that contains the public key of the CA. Next, you request the CA to enroll a local digital certificate that contains your public key and some additional information. When the CA processes your request, it signs your local certificate with the private key of the CA. Then you install the CA certificate and the local certificate in your local routing platform and load the CA certificate in the remote devices before you can establish IPSec tunnels with your peers.
When you request a peering relationship with an IPSec peer, the peer receives a copy of your local certificate. Because the peer already has the CA certificate loaded, it can use the CA’s public key contained in the CA certificate to decrypt your local certificate that has been signed by the CA’s private key. As a result, the peer now has a copy of your public key. The peer encrypts data with your public key before sending it to you. When your local routing platform receives the data, it decrypts the data with your private key.
In the JUNOS software, you must implement the following steps to be able to initially use digital certificates:
Optionally, you can do the following:
For more details on managing digital certificates, configuring them in an IPSec service set, and monitoring and clearing them, see Option: Using Digital Certificates and Example: AS PIC IKE Dynamic SA with Digital Certificates Configuration.