In cryptography, forward secrecy (FS), also known as perfect forward secrecy (PFS), is a property of secure communication protocols in which compromises of long-term keys do not compromise past session keys . Forward secrecy protects past sessions against future compromises of secret keys or passwords.If forward secrecy is used, encrypted communications and sessions recorded in the past cannot be retrieved and decrypted should long-term secret keys or passwords be compromised in the future, even if the adversary actively interfered, for example via a man-in-the-middle attack.

The following is a hypothetical example of a simple instant messaging protocol that employs forward secrecy:

  1. Alice and Bob each generate a pair of long-term, asymmetric public and private keys, then verify public-key fingerprints in person or over an already-authenticated channel. The only thing these keys will be used for is authentication, including signing messages and signing things during session key exchange. These keys will not be used for encryption of any kind.
  2. Alice and Bob use a key exchange algorithm such as Diffie–Hellman, to securely agree on an ephemeral session key. They use the keys from step 1 only to authenticate one another during this process.
  3. Alice sends Bob a message, encrypting it with a symmetric cipher using the session key negotiated in step 2.
  4. Bob decrypts Alice's message using the key negotiated in step 2.
  5. The process repeats for each new message sent, starting from step 2 (and switching Alice and Bob's roles as sender/receiver as appropriate). Step 1 is never repeated.

Forward secrecy (achieved by generating new session keys for each message) ensures that past communications cannot be decrypted if one of the keys generated in an iteration of step 2 is compromised, since such a key is only used to encrypt a single message. Forward secrecy also ensures that past communications cannot be decrypted if the long-term private keys from step 1 are compromised, however, masquerading as Alice or Bob would be possible going forward if this occurred, possibly compromising all future messages.

Forward secrecy is designed to prevent the compromise of a long-term secret key from affecting the confidentiality of past conversations. However, forward secrecy cannot defend against a successful cryptanalysis of the underlying ciphers being used, since a cryptanalysis consists of finding a way to decrypt an encrypted message without the key, and forward secrecy only protects keys, not the ciphers themselves. A patient attacker can capture a conversation whose confidentiality is protected through the use of public-key cryptography and wait until the underlying cipher is broken (e.g. large quantum computers could be created which allow the discrete logarithm problem to be computed quickly). This would allow the recovery of old plaintexts even in a system employing forward secrecy.

Weak perfect forward secrecy (wPFS) is the weaker property whereby when agents' long-term keys are compromised, the secrecy of previously established session-keys is guaranteed, but only for sessions in which the adversary did not actively interfere. This new notion, and the distinction between this and forward secrecy was introduced by Hugo Krawczyk in 2005. This weaker definition implicitly requires that full (perfect) forward secrecy maintains the secrecy of previously established session keys even in sessions where the adversary did actively interfere, or attempted to act as a man in the middle.

Forward secrecy is present in several major protocol implementations, such as SSH and as an optional feature in IPsec (RFC 2412). Off-the-Record Messaging, a cryptography protocol and library for many instant messaging clients, provides forward secrecy as well as deniable encryption.

In Transport Layer Security (TLS), Diffie–Hellman key exchange-based PFSs (DHE-RSA, DHE-DSA) and elliptic curve Diffie–Hellman-based PFSs (ECDHE-RSA, ECDHE-ECDSA) are available. In theory, TLS can choose appropriate ciphers since SSLv3, but in everyday practice many implementations have refused to offer forward secrecy or only provide it with very low encryption grade.[8]

OpenSSL supports forward secrecy using elliptic curve Diffie–Hellman since version 1.0,[9] with a computational overhead of approximately 15%.[10]

The Signal Protocol uses the Double Ratchet Algorithm to provide forward secrecy.[11]

On the other hand, among popular protocols currently in use, WPA doesn't support forward secrecy.

Forward secrecy is seen as an important security feature by several large Internet information providers. Since late 2011, Google provided forward secrecy with TLS by default to users of its Gmail service, Google Docs service, and encrypted search services.[9] Since November 2013, Twitter provided forward secrecy with TLS to its users.[12] Wikis hosted by the Wikimedia Foundation have all provided forward secrecy to users since July 2014.[13]

Facebook reported as part of an investigation into email encryption that, as of May 2014, 74% of hosts that support STARTTLS also provide Forward Secrecy.[14] As of June 2016, 51.9% of TLS-enabled websites are configured to use cipher suites that provide forward secrecy to modern web browsers.[15]

At WWDC 2016, Apple announced that all iOS apps would need to use "ATS" (App Transport Security), a feature which enforces the use of HTTPS transmission. Specifically, ATS requires the use of an encryption cipher that provides forward secrecy.[16]ATS became mandatory for apps on Jan 1st, 2017.[17]

Forward secrecy的更多相关文章

  1. iOS的ATS配置 - 2017年前ATS规定的适配

    苹果规定 从2017年1月1日起,新提交的 app 不允许使用NSAllowsArbitraryLoads来绕过ATS(全称:App Transport Security)的限制. 以前为了能兼容ht ...

  2. 著名ERP厂商的SSO单点登录解决方案介绍一

          SSO英文全称Single Sign On,单点登录.SSO是在多个应用系统中,用户只需要登录一次就可以访问所有相互信任的应用系统.它包括可以将这次主要的登录映射到其他应用中用于同一个用户 ...

  3. Windows Server 2008 R2 下配置TLS1.2,添加自签名证书

    前言 2017年1月1日起App Store上的所有App应用将强制开启ATS功能. 苹果的ATS(App Transport Security)对服务器硬性3点要求: ① ATS要求TLS1.2或者 ...

  4. iOS9网络适配(ATS)

    [转]iOS9 new_001:iOS9网络适配(ATS) 下载Xcode7打开APP后大家都发现自己的APP无法联网了,why? 苹果官方文档介绍如下: App Transport Security ...

  5. 小众Tox——大众的“去中心化”聊天软件

    ★Tox是什么 一个反窥探的开源项目:一种基于DHT(BitTorrent)技术的即时通讯协议:一个为安全而生的加密通讯系统 .美国棱镜计划曝光后,一个名为 irungentoo 的牛人于17天后的2 ...

  6. openswan-ipsec.conf配置说明

    Name ipsec.conf - IPsec configuration and connections Description The optional ipsec.conf file speci ...

  7. 在服务器上启用HTTPS的详细教程

    现在,你应该能在访问https://konklone.com的时候,在地址栏里看到一个漂亮的小绿锁了,因为我把这个网站换成了HTTPS协议.一分钱没花就搞定了. 为什么要使用HTTPS协议: 虽然SS ...

  8. Neutron 理解(10):虚拟专用网(VPN)虚拟化 [How Neutron implements VPN Virtualization]

    学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GR ...

  9. iOS:根据日志去定位网络请求发生的错误是由于服务端造成的,还是客户端造成的?

    一.介绍 在项目开发中,服务端和客户端的协作尤为重要,而连接它们的最重要的环节之一就是网络请求,对于服务端而言,如果这个环节出现了错误,那么安全性就无从谈起,同时对于客户端而言,如果这个模块出现了错误 ...

随机推荐

  1. spring配置文件详解以及beans:beans标签

    第一行的意思就是你这个文件的默认schema为security,所以你的beans定义就需要加上前缀beans 一般的定义文件默认都是beans: 下面是spring配置文件的详解: 转自:http: ...

  2. Codeforces 258C Little Elephant and LCM

    Little Elephant and LCM #include<bits/stdc++.h> #define LL long long #define fi first #define ...

  3. P1855 榨取kkksc03 二维费用背包

    Kkksc03的时间和金钱是有限的,所以他很难满足所有同学的愿望.所以他想知道在自己的能力范围内,最多可以完成多少同学的愿望? 输入输出格式 输入格式: 第一行,n M T,表示一共有n(n<= ...

  4. 局域网内其他主机如何访问运行在宿主机的虚拟机中的Django项目(转)

    局域网内其他主机如何访问运行在宿主机的虚拟机中的Django项目     1.在宿主机cmd中查看宿主机的ip(注意区分主机中虚拟机的ip) 我连的是无线,IP如下 2.在Django项目的mysit ...

  5. 优雅的将Map转为String工具类

    import com.alibaba.fastjson.JSONObject;import org.apache.commons.lang3.StringUtils; import java.lang ...

  6. ThreadLocal和InheritableThreadLocal使用

    InheritableThreadLocal代码 public class InheritableThreadLocal<T> extends ThreadLocal<T> { ...

  7. ip后面带端口号如何做域名解析

    最近自己购买了个云服务器(阿里)和域名(腾讯,需要备案,相对比较麻烦),放上自己的工程,通过如下配置 服务器设置: 域名设置: 这样就可以通过默认的域名解析可以通过外网来访问自己的服务. 当然在内网的 ...

  8. 试图(View)

    试图是通过命名约定与动作方法想关联的.这个动作方法称为Index,控制器名称为Home; 添加试图,试图名与该试图相关联的动作方法的名称一致.

  9. 网络与多线程---OC中多线程方法GCD(二)

    小编在前一篇中介绍了多线程实现的五种常用方法.在接下来所介绍的这种方法是最具有魅力的,最具有诱惑的实现多线程的方案---GCD 一.什么是GCD GCD是Grand Central Dispatch的 ...

  10. UVALive 6915 Leveling Ground 倍增RMQ

    Leveling Ground 题目连接: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid ...