Home Page

VPN & Cryptography


Email & Spam

Security Terminology


VPN Terminology

VPN Tutorial Guide



Aggressive Mode

Authentication Header

Asymmetric Encryption


Certification Authority

Data Integrity



Digital Certificate

Dynamic IP addresses





IPSec Quick Mode


Main Mode







Pre-Shared Key

Remote Access User


Security Association


Site to Site VPN


Transform Sets

Tunnel mode and Transport mode

VPN client tunneling option

VPN Topologies

VPN Tunnel


PFS (Perfect Forward Secrecy) - IPsec VPN Tutorial



PFS (Perfect Forward Secrecy) ensures the same key will not be generated and used again, and because of this, the VPN peers negotiate a new Diffie-Hellman key exchange. This would ensure if a hacker\criminal was to compromise the private key, they would only be able to access data in transit protected by that key. Any future data will not be compromised, as future data would not be associated with that compromised key.

Both sides of the VPN must be able to support PFS in order for PFS to work. When PFS is turned on, for every negotiation of a new phase 2 SA, the two gateways must generate a new set of phase 1 keys. This is an extra layer of protection that PFS adds, which ensures if the phase 2 SA’s have expired, the keys used for new phase 2 SA’s have not been generated from the current phase 1 keying material. Of course if PFS is not turned on then the current keying material already established at phase 1 will be used again to generate phase 2 SA’s.

Therefore, due to the above reason, using PFS provides a more secure VPN connection. Although using PFS does have its drawback however. It will require more processing power, and takes slightly longer for phase 1 and 2 to complete. PFS in general is known as a session key. A session key is a key created for a particular session, and when the session is bought down, the key is destroyed and is not used again. Next time a session is initiated a new and completely different session key is created.

You don't have to use PFS if you don't want to, you can just leave it disabled. However if you are protecting sensitive data, then it should be enabled and is best practice and recommended to use it. It depends on your requirements and security policies. It depends on how sensitive your data is and how often you would like to renew these keys. What is the worst that could happen if a criminal did get their hands on this sensitive data? This should give you a good indication to whether you should have it enabled and for how long each key is renewed or disabled. Just remember having it enabled and renewing keys more often will have a performance impact but provide better security.

In a nutshell, enabling PFS will improve security forcing a new key exchange. It does this every so often depending on the configured time settings.

Further Reading

Wikipedia's guide to PFS (Perfect Forward Secrecy)