I have a question regarding the TLS handshake. As of my reading I came to know that
master_secret will be derived from
pre_master_secret shared by client as follows:
master_secret = PRF(pre_master_secret, "master secret", lientHello.random + ServerHello.random)
master_secretthe below session keys are derived.
On client side:
client_write_MAC_secret[SecurityParameters.hash_size] client_write_key[SecurityParameters.key_material_length] client_write_IV[SecurityParameters.IV_size]
On server side:
server_write_MAC_secret[SecurityParameters.hash_size] server_write_key[SecurityParameters.key_material_length] server_write_IV[SecurityParameters.IV_size]
Wwhen these session keys are generated separately on the client and the server and never exchanged and transmitted between them, how does the server decrypt the client's encrypted message and vice-versa?
Or all the 6 session keys are created on both client and server individually and hope they are similar. If this is true then both the client and the server can decrypt each others encrypted messages.