title: AES GCM implementation in c#
body: <p>I am implementing an AES cipher in GCM mode in c#. My question pertains to the "additional authenticated data"(AAD). In the following code from </p>
  
  <p><a href="http://blogs.msdn.com/b/shawnfa/archive/2009/03/17/authenticated-symmetric-encryption-in-net.aspx" rel="nofollow">http://blogs.msdn.com/b/shawnfa/archive/2009/03/17/authenticated-symmetric-encryption-in-net.aspx</a></p>
  
  <p>it is unclear where I should get the AAD from, and how I should retrieve the AAD specific to this encryption during decryption:</p>
  
  <pre><code>// Authenticated data becomes part of the authentication tag that is generated during
  // encryption, however it is not part of the ciphertext.  That is, when decrypting the
  // ciphertext the authenticated data will not be produced.  However, if the
  // authenticated data does not match at encryption and decryption time, the
  // authentication tag will not validate.
  aes.AuthenticatedData = Encoding.UTF8.GetBytes("Additional authenticated data");
  </code></pre>
  
  <p>Any clarification on how to use this AAD would be much appreciated.
  Thanks</p>