Articles & Resources > Cybersecurity >

Perfect Forward Secrecy

Perfect Forward Secrecy

A computer generated image of a person typing on a hologram touch screen with buttons that have various symbols on them.

Last Updated March 8, 2024

Data encryption over the internet depends on the successful exchange of public and private keys. Perfect forward secrecy (PFS) is a key-agreement protocol that uses sophisticated nondeterministic mathematical algorithms to compute a unique public key for each session. The key that results is never used to derive another key, and any material used in creating the current key is never used to generate a subsequent key. This ensures that a current session cannot be compromised by using a key derived from any previous session, and previous sessions cannot be decrypted by anyone who manages to acquire the current key.

This key agreement protocol depends upon values exchanged between the client and server during each session. The values are used to determine a shared session key. Due to the complex mathematical processes involved, this key-agreement protocol discourages brute force hacking attempts. If the private key held by the server is somehow discovered, it doesn’t aid the attacker since the associated public key has not been used to secure any data.

In theory this method can be compromised, given enough time and computing power, but since the payoff is so small and the effort so great, such an endeavor would not normally be seen as profitable. This make PFS a highly effective tool for maintaining the confidentiality of messages passed between client and server.

PFS replaces the current method of transferring secret session keys across the network with a method that does not transfer them. Keys are computed at the client and server from mathematical values they exchange with each other. Since session keys are never transferred, even in an encrypted form, they can’t be intercepted by a third party. This method increases the burden on the CPU, since the cryptographic process is resource intensive, but the benefit outweighs the increased activity in most environments.

In 2014, the popular Heartbleed bug took advantage of vulnerable servers to steal usernames, email, passwords and other data from memory, including session data and the server’s private key. This gave attackers the ability to impersonate the server by using the associated certificate. It also gave them the ability to decrypt data they may have already intercepted and stored, data that they could not read until obtaining the server’s private key. This could include months or even years of online sales that contain credit card numbers and personal identification data.

Since Heartbleed let attackers acquire the private key, they could decrypt the entire backlog of saved messages. PFS eliminates threats from attacks like this by making each session dependent on a unique key. Even if an attacker somehow derives a session key, the worst that could happen is the attacker gains the ability to read a single session, which is unlikely to contain complete, valuable information.

The size and reach of the Internet, and the type of data transferred, makes it an irresistible target for espionage and criminal enterprises. Information assurance specialists work with governments and businesses to guard against attacks and make sure information stays secure. The Cybersecurity Certificate, offered by Villanova University Online, provides expert-level training in the latest detection and prevention techniques, risk assessment, encryption and more. It provides an increased level of training for those who possess Security+™ certification, and helps prepare students to take the CASP™ certification exam.