<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 21:55:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Hasin Hayder's Blog: RSA Encrypting and Decrypting data with Zend_Crypt_Rsa Library]]></title>
      <guid>http://www.phpdeveloper.org/news/16846</guid>
      <link>http://www.phpdeveloper.org/news/16846</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> has recently posted a tutorial to his blog showing how to <a href="http://hasin.wordpress.com/2011/09/11/rsa-encrypting-and-decrypting-data-with-zend_crypt_rsa-library/">use the Zend_Crypt_Rsa library for encrypting/decrytping data</a> in a Zend Framework application.
</p>
<blockquote>
Public/private key based encryption is very popular because of the strength it sets in encryption, specially above 1024 bits. Now there are external library to encrypt data using <a href="http://en.wikipedia.org/wiki/RSA">RSA encryption</a> like <a href="http://www.phpclasses.org/package/4121-PHP-Encrypt-and-decrypt-data-with-RSA-public-keys.html">RSA</a> in <a href="http://phpclasses.org/">phpclasses.org</a> - the fun is we were also using this library in one of our ZF based project. But last week I've found that there is a hidden gem in the Library/Zend/Crypt folder (Zend_Crypt_Rsa) which can do the same thing using openssl library. 
</blockquote>
<p>
He couldn't find much in the way of documentation for the component, so he wrote up how to use it in three easy steps:
</p>
<ul>
<li>Create your RSA public/private key using ssh-keygen
<li>Encrypt data using your public key
<li>Decrypt the cipher
</ul>
<p>
The Zend_Crypt_Rsa makes it simple to encrypt/decrypt the data, just taking in a passphrase, a path to the RSA key file and the message contents.
</p>]]></description>
      <pubDate>Mon, 12 Sep 2011 11:17:08 -0500</pubDate>
    </item>
  </channel>
</rss>
