Skip to main content
Corrected quote and formatting.
Source Link
Ilmari Karonen
  • 46.5k
  • 5
  • 111
  • 187
   key_block =  
key_block =
       MD5(master_secret + SHA('A' + master_secret + ServerHello.random +  
            ClientHello.random)) +  
        MD5(master_secret + SHA('BB' + master_secret + ServerHello.random +
            ClientHello.random)) +   
        MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random +  
            ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated".

The document says, it is done until "enough output has been generated".

"enough"[E]nough output has been generated" means uthat you have to continue this process until the key length is equal to the block length. i.eFor example, if the block length=512length is 512 bits, then the function MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) will

    MD5(master_secret + SHA('A' + master_secret + ServerHello.random +
        ClientHello.random))

needs to be repeated 4four times, because the output of MD5 is 128 bits.

So long, and 4 *× 128 = 512.

And ++ indicates concatenation.

key_block =
    MD5(master_secret + SHA('A' + master_secret + ServerHello.random +
        ClientHello.random)) +
    MD5(master_secret + SHA('BB' + master_secret + ServerHello.random +
        ClientHello.random)) +
    MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random +
        ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated".

"enough output has been generated" means u have to continue this process until the key length is equal to block length. i.e if block length=512 then the function MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) will be repeated 4 times because the output of MD5 is 128 bits.

So 4 * 128 = 512.

And + indicates concatenation.

   key_block =  
        MD5(master_secret + SHA('A' + master_secret + ServerHello.random +  
            ClientHello.random)) +  
        MD5(master_secret + SHA('BB' + master_secret + ServerHello.random +
            ClientHello.random)) +   
        MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random +  
            ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated".

"[E]nough output has been generated" means that you have to continue this process until the key length is equal to the block length. For example, if the block length is 512 bits, then the function

    MD5(master_secret + SHA('A' + master_secret + ServerHello.random +
        ClientHello.random))

needs to be repeated four times, because the output of MD5 is 128 bits long, and 4 × 128 = 512.

And + indicates concatenation.

key_block = MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA('BB' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random + ClientHello.random)) + [...];

key_block =
    MD5(master_secret + SHA('A' + master_secret + ServerHello.random +
        ClientHello.random)) +
    MD5(master_secret + SHA('BB' + master_secret + ServerHello.random +
        ClientHello.random)) +
    MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random +
        ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated". "enough

"enough output has been generated" means u have to continue this process until the key length is equal to block length. i.e if block length=512 then the function MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random))MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) will be repeated 4 times. because the output of MD5 is 128 bits. so 4*128=512

So 4 * 128 = 512.

And + indicates concatenation.

key_block = MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA('BB' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random + ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated". "enough output has been generated" means u have to continue this process until the key length is equal to block length. i.e if block length=512 then the function MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) will be repeated 4 times. because the output of MD5 is 128 bits. so 4*128=512.

And + indicates concatenation.

key_block =
    MD5(master_secret + SHA('A' + master_secret + ServerHello.random +
        ClientHello.random)) +
    MD5(master_secret + SHA('BB' + master_secret + ServerHello.random +
        ClientHello.random)) +
    MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random +
        ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated".

"enough output has been generated" means u have to continue this process until the key length is equal to block length. i.e if block length=512 then the function MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) will be repeated 4 times because the output of MD5 is 128 bits.

So 4 * 128 = 512.

And + indicates concatenation.

Source Link

key_block = MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA('BB' + master_secret + ServerHello.random + ClientHello.random)) + MD5(master_secret + SHA('CCC' + master_secret + ServerHello.random + ClientHello.random)) + [...];

The document says, it is done until "enough output has been generated". "enough output has been generated" means u have to continue this process until the key length is equal to block length. i.e if block length=512 then the function MD5(master_secret + SHA('A' + master_secret + ServerHello.random + ClientHello.random)) will be repeated 4 times. because the output of MD5 is 128 bits. so 4*128=512.

And + indicates concatenation.