DTLS 1.2 Key Expansion I am using DTLS 1.2 and my cipher is TLS_ECDHE_WITH_AES_128_GCM_SHA256

According to RFC 5246(RFC 5246 key calculation) i am calculating keys but i can not find the size of these keys in this RFC.

What is the size of following keys.

1- Client_Write_Mac_Key

2- Server_Write_Mac_Key

3- Client_Write_key

4- Server_Write_key

5- Client_Write_IV

6- Server_Write_IV
In the case of a GCM-based ciphersuite, there is no MAC key. If the tool insists on a size, give it 0.

See RFC5246 section 6.2.3.3 (which discusses AEAD ciphers, of which GCM is one example); it explicitly states that, in this case, no MAC key is used.

In addition, the IV sizes are 4 bytes; these 4 bytes are combined with the 8 bytes from the TLS record to form the 12 byte GCM nonce; see RFC5288 second 3.

And, of course, the encryption keys for GCM128 is 16 bytes, yielding a total of:


  1- Client_Write_Mac_Key - 0 bytes
  
  2- Server_Write_Mac_Key - 0 bytes
  
  3- Client_Write_key - 16 bytes
  
  4- Server_Write_key - 16 bytes
  
  5- Client_Write_IV - 4 bytes
  
  6- Server_Write_IV - 4 bytes