In the SSL 3.0 protocol the Master secret (MS) is generated as:

MS = MD5(PMS||SHA(‘A’||PMS||R1||R2))||

where || represent the concatenation of values, PMS is the Pre-Master Secret, and Ri are exchanged random values.

Can someone explain the use and need for the ‘A’, ‘BB’ and ‘CCC’ constants in the TLS master secret generation?

  • Where did you get that from?
    – schroeder
    Commented Jan 27, 2019 at 20:45

1 Answer 1


Just imagine if these different constants where not there: then the MS would consists of three equal parts and would therefore be much weaker. The value of the constants actually does not matter, but they should be different and be the same in both client and server.

That a concatenation of the results of same basic algorithm but with different constants is done in the first place, is necessary since a single MD5 does not provide sufficient length for the master secret. See also How key materials are generated in SSL V3 from master secret and also have a look at the definition of P_hash in TLS 1.2 which uses a similar construct.

  • question was edited to ssl
    – schroeder
    Commented Jan 27, 2019 at 20:54
  • The resource I was reading spoke as if it was the TLS sorry.
    – Lymmuar
    Commented Jan 27, 2019 at 20:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .