In TLS RFC, Security Parameters in Record Layer are defined

      BulkCipherAlgorithm    bulk_cipher_algorithm;
      CipherType             cipher_type;
      uint8                  enc_key_length;
      uint8                  block_length;
      uint8                  fixed_iv_length;
      uint8                  record_iv_length;
      MACAlgorithm           mac_algorithm;
      uint8                  mac_length;
      uint8                  mac_key_length;
      CompressionMethod      compression_algorithm;
      opaque                 master_secret[48];
      opaque                 client_random[32];
      opaque                 server_random[32];

master_secret, clinetrandom ..etc are exchanged in handshakeprotocol

But cipherAlgorithm, mac algorithm?

These are exchanged in handshakeprotocol too?

I read RFC but I couldnt find about it

When these values(about encryption and mac ) are exchanged?

1 Answer 1


The cipher an mac algorithms are defined by the cipher suite which gets negotiated during the TLS handshake. The client offers a list of supported cipher suites in the ClientHello and the server accepts a specific one inside the ServerHello. See also section 8 of RFC 5246 (TLS 1.2):

  1. Cryptographic Computations
    ... The authentication, encryption, and MAC algorithms are determined by the cipher_suite selected by the server and revealed in the ServerHello message.

In Appendix C of RFC 5246 you then find some mappings of cipher suite to cipher and mac algorithms:

Cipher Suite                            Key        Cipher         Mac

TLS_NULL_WITH_NULL_NULL                 NULL         NULL         NULL
TLS_RSA_WITH_NULL_MD5                   RSA          NULL         MD5
TLS_RSA_WITH_NULL_SHA                   RSA          NULL         SHA
TLS_RSA_WITH_NULL_SHA256                RSA          NULL         SHA256
TLS_RSA_WITH_RC4_128_MD5                RSA          RC4_128      MD5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.