title: How Can We Use GCM Mode Encryption in PHP?
body: <p>I have been reading a lot about <strong>GCM</strong> and how awesome it is and I would like to know how could I use <strong>AES-GCM</strong> authenticated encryption using <strong>PHP</strong>. Is it supported in <code>mcrypt()</code>? I found some references to <strong>GCM</strong> in the Codeigniter framework documentation which leads me to believe it is possible to use in <a href="http://www.storycon.us/ci3/libraries/encryption.html" rel="noreferrer">Codeigniter</a>.</p>
  
  <p>And I also came across something in a doc about <strong>Zend</strong>. I'm not looking to use a <em>Codeigniter</em> driver though as I don't use any framework and don't intend to for my current projects. It seems to me however that if <em>Codeigniter</em> is able to do it then so should we be able to without the framework.</p>
  
  <p>It seems as though <strong>GCM</strong> is the way to go for security as well as performance (I saw very impressive performance figures). My feeling is we need this but I can't find any examples. Someone must have an idea of how to accomplish this. I know it is supported by <strong>OpenSSL</strong>.</p>
  
  <p>Any help will be greatly appreciated.</p>