<div dir="ltr"><div>I am trying to decrypt TLS 1.2 records that is using the TLS_AES_128_GCM_SHA256 cipher-suite using openssl's EVP API. <br><br></div><div>Per RFC 5246, decryption needs 4 inputs. <br>"
<pre class="gmail-newpage">   In order to decrypt and verify, the cipher takes as input the key,
   nonce, the "additional_data", and the AEADEncrypted value.  The
   output is either the plaintext or an error indicating that the
   decryption failed.  There is no separate integrity check.  That is:

      TLSCompressed.fragment = AEAD-Decrypt(write_key, nonce,
                                            AEADEncrypted,
                                            additional_data)</pre>

"<br><br></div><div>But, in the AES-GCM decryption example on openssl wiki at <a href="https://wiki.openssl.org/index.php/EVP_Authenticated_Encryption_and_Decryption">https://wiki.openssl.org/index.php/EVP_Authenticated_Encryption_and_Decryption</a> shows the decryption also takes as input the<b> tag </b>to be verified. <br><br></div><div>I know that the Authentication tag is the last 16 bytes of the TLS 1.2 record payload. But, my confusion is why the RFC has no mention of the Authentication tag. <br><br></div><div>And so, to decrypt the TLS record, should I follow the example on openssl wiki?<br></div><div><br></div><div><br></div><div><br></div><br></div>