SSL/TLS
What Ciphers to Use A TLS session negotiates four ciphers Cipher used for authentication of server and optionally client (RSA DSS- Digital Signature Algorithm(really rare)/ EC-DSA) Cipher used for key exchange (RSA, E-DHE Ephemeral (Key is temporal) Cipher used for symmetric confidentiality (RC4, AES, DES) Cipher used for integrity (HMAC-MD5, HMAC-SHA) Negotiated in a 5-step session initiations protocol
TLS Cipher Negotiation Client Server Supported ciphers, client random
TLS Cipher Negotiation Client Server Supported ciphers, client random Chosen ciphers, server random, certificate
TLS Cipher Negotiation Client Server Supported ciphers, client random Chosen ciphers, server random, SSL TLS certificate & Public key
TLS Cipher Negotiation Client Server Supported ciphers, client random Chosen ciphers, server random, SSL TLS certificate & Public key Pre-master session key
Session Key
TLS Cipher Negotiation Client Server Supported ciphers, client random Chosen ciphers, server random, SSL TLS certificate & Public key Pre-master session key Message after this are encrypted
Computer The Master Secret from the premaster secret Premaster secret did not take into account anything from the server. Open to replay attacks: master_secret = PRF(pre_master_secret, "master secret", ClientHello.random + ServerHello.random) The “master secret” is simply a string whose ASCII bytes (e.g. “6d 61 73 74 65 72 …”) TLS's PRF is created by splitting the secret into two halves and using one half to generate data with P_MD5 and the other half to generate data with P_SHA-1, then exclusive-or'ing the outputs of these two expansion functions together.