1. 11 1月, 2017 1 次提交
  2. 06 1月, 2017 1 次提交
  3. 09 12月, 2016 11 次提交
  4. 06 12月, 2016 1 次提交
  5. 23 11月, 2016 3 次提交
    • M
      Ensure the end of first server flight processing is done · 7776a36c
      Matt Caswell 提交于
      There is a set of miscellaneous processing for OCSP, CT etc at the end of
      the ServerDone processing. In TLS1.3 we don't have a ServerDone, so this
      needs to move elsewhere.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      7776a36c
    • M
      Update state machine to be closer to TLS1.3 · 92760c21
      Matt Caswell 提交于
      This is a major overhaul of the TLSv1.3 state machine. Currently it still
      looks like TLSv1.2. This commit changes things around so that it starts
      to look a bit less like TLSv1.2 and bit more like TLSv1.3.
      
      After this commit we have:
      
      ClientHello
      + key_share          ---->
                                 ServerHello
                                 +key_share
                                 {CertificateRequest*}
                                 {Certificate*}
                                 {CertificateStatus*}
                           <---- {Finished}
      {Certificate*}
      {CertificateVerify*}
      {Finished}           ---->
      [ApplicationData]    <---> [Application Data]
      
      Key differences between this intermediate position and the final TLSv1.3
      position are:
      - No EncryptedExtensions message yet
      - No server side CertificateVerify message yet
      - CertificateStatus still exists as a separate message
      - A number of the messages are still in the TLSv1.2 format
      - Still running on the TLSv1.2 record layer
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      92760c21
    • M
      Implement tls13_change_cipher_state() · 0d9824c1
      Matt Caswell 提交于
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      0d9824c1
  6. 16 11月, 2016 4 次提交
    • M
      Fixed various style issues in the key_share code · 94ed2c67
      Matt Caswell 提交于
      Numerous style issues as well as references to TLS1_3_VERSION instead of
      SSL_IS_TLS13(s)
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      94ed2c67
    • M
      Start using the key_share data to derive the PMS · 0f1e51ea
      Matt Caswell 提交于
      The previous commits put in place the logic to exchange key_share data. We
      now need to do something with that information. In <= TLSv1.2 the equivalent
      of the key_share extension is the ServerKeyExchange and ClientKeyExchange
      messages. With key_share those two messages are no longer necessary.
      
      The commit removes the SKE and CKE messages from the TLSv1.3 state machine.
      TLSv1.3 is completely different to TLSv1.2 in the messages that it sends
      and the transitions that are allowed. Therefore, rather than extend the
      existing <=TLS1.2 state transition functions, we create a whole new set for
      TLSv1.3. Intially these are still based on the TLSv1.2 ones, but over time
      they will be amended.
      
      The new TLSv1.3 transitions remove SKE and CKE completely. There's also some
      cleanup for some stuff which is not relevant to TLSv1.3 and is easy to
      remove, e.g. the DTLS support (we're not doing DTLSv1.3 yet) and NPN.
      
      I also disable EXTMS for TLSv1.3. Using it was causing some added
      complexity, so rather than fix it I removed it, since eventually it will not
      be needed anyway.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      0f1e51ea
    • M
      d7c42d71
    • M
      Add the key_share processing to the server side · b1834ad7
      Matt Caswell 提交于
      At the moment the server doesn't yet do anything with this information.
      We still need to send the server's key_share info back to the client. That
      will happen in subsequent commits.
      Reviewed-by: NRich Salz <rsalz@openssl.org>
      b1834ad7
  7. 15 11月, 2016 2 次提交
  8. 09 11月, 2016 2 次提交
  9. 04 11月, 2016 2 次提交
  10. 03 10月, 2016 1 次提交
  11. 30 9月, 2016 1 次提交
  12. 29 9月, 2016 1 次提交
  13. 22 9月, 2016 1 次提交
  14. 21 9月, 2016 1 次提交
  15. 20 9月, 2016 1 次提交
  16. 13 9月, 2016 1 次提交
  17. 19 8月, 2016 1 次提交
    • M
      Fix DTLS replay protection · 1fb9fdc3
      Matt Caswell 提交于
      The DTLS implementation provides some protection against replay attacks
      in accordance with RFC6347 section 4.1.2.6.
      
      A sliding "window" of valid record sequence numbers is maintained with
      the "right" hand edge of the window set to the highest sequence number we
      have received so far. Records that arrive that are off the "left" hand
      edge of the window are rejected. Records within the window are checked
      against a list of records received so far. If we already received it then
      we also reject the new record.
      
      If we have not already received the record, or the sequence number is off
      the right hand edge of the window then we verify the MAC of the record.
      If MAC verification fails then we discard the record. Otherwise we mark
      the record as received. If the sequence number was off the right hand edge
      of the window, then we slide the window along so that the right hand edge
      is in line with the newly received sequence number.
      
      Records may arrive for future epochs, i.e. a record from after a CCS being
      sent, can arrive before the CCS does if the packets get re-ordered. As we
      have not yet received the CCS we are not yet in a position to decrypt or
      validate the MAC of those records. OpenSSL places those records on an
      unprocessed records queue. It additionally updates the window immediately,
      even though we have not yet verified the MAC. This will only occur if
      currently in a handshake/renegotiation.
      
      This could be exploited by an attacker by sending a record for the next
      epoch (which does not have to decrypt or have a valid MAC), with a very
      large sequence number. This means the right hand edge of the window is
      moved very far to the right, and all subsequent legitimate packets are
      dropped causing a denial of service.
      
      A similar effect can be achieved during the initial handshake. In this
      case there is no MAC key negotiated yet. Therefore an attacker can send a
      message for the current epoch with a very large sequence number. The code
      will process the record as normal. If the hanshake message sequence number
      (as opposed to the record sequence number that we have been talking about
      so far) is in the future then the injected message is bufferred to be
      handled later, but the window is still updated. Therefore all subsequent
      legitimate handshake records are dropped. This aspect is not considered a
      security issue because there are many ways for an attacker to disrupt the
      initial handshake and prevent it from completing successfully (e.g.
      injection of a handshake message will cause the Finished MAC to fail and
      the handshake to be aborted). This issue comes about as a result of trying
      to do replay protection, but having no integrity mechanism in place yet.
      Does it even make sense to have replay protection in epoch 0? That
      issue isn't addressed here though.
      
      This addressed an OCAP Audit issue.
      
      CVE-2016-2181
      Reviewed-by: NRichard Levitte <levitte@openssl.org>
      1fb9fdc3
  18. 17 8月, 2016 1 次提交
  19. 21 7月, 2016 1 次提交
  20. 19 7月, 2016 3 次提交