wiki:how-to/servers/nginx_https_pfs

Version 2 (modified by IMC linksunten, 10 years ago) (diff)

--

Perfect Forward Secrecy with nginx on Debian Wheezy

Perfect Forward Secrecy (pfs) is a countermeasure against surveillance programs as PRISM by the NSA or Vorratsdatenspeicherung in Europe. These programs intercept and store ssl-encrypted traffic which became known as full take in the summer of Snowden in 2013.

This data can be decrypted at some point of time in the future after the ssl master key has been obtained. That is, unless perfect forward secrecy is used to negotiate session keys between server and client. pfs is based on Diffie-Hellman key exchange that never sends the session key which can therefore not be intercepted. The only advantage of stealing the ssl master key when PFS is employed would therefore be a stealthy man-in-the-middle attack.

One word of caution: if you change your setup to pfs you must re-key your server (and obtain a new ssl certificate) or your traffic until this moment will still be vulnerable to decryption if the master ssl key will be stolen in the future.

At the time of writing there are some practical problems when running web servers on Debian. The openssl library in Debian squeeze and the apache web server in Debian wheezy are too old for pfs. But nginx web server in Debian wheezy is ready for pfs and nginx makes a good ssl offloader.