<?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>Wed, 23 May 2012 03:58:14 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: Properly Salting Passwords, The Case Against Pepper ]]></title>
      <guid>http://www.phpdeveloper.org/news/17832</guid>
      <link>http://www.phpdeveloper.org/news/17832</link>
      <description><![CDATA[<p>
In <a href="http://blog.ircmaxell.com/2012/04/properly-salting-passwords-case-against.html">this new post</a> to his blog <i>Anthony Ferrara</i> looks at a common idea that comes up when the discussion of encryption of passwords in PHP - the global salt (or "pepper").
</p>
<blockquote>
The other day I <a href="http://blog.ircmaxell.com/2012/04/introducing-passwordlib.html">announced the release</a> of my new password hashing library, <a href="https://github.com/ircmaxell/PHP-PasswordLib">PasswordLib</a>. As I've come to expect, <a href="http://www.reddit.com/r/PHP/comments/s9r6f/introducing_passwordlib_a_library_for_hashing/">Reddit</a> was full of interesting commentary on the topic. Some was good, some was bad and some surprised me. What surprised me was the insistence on a global salt (otherwise known as a "<a href="http://barkingiguana.com/2009/08/03/securing-passwords-with-salt-pepper-and-rainbows/">pepper</a>"). So, I started thinking about it some more, and I figured I'd write a post on why I don't use peppers in my hashing algorithms (and why you may want to rethink it too).
</blockquote>
<p>
He starts with an explanation of what a salt is (and isn't) to lead naturally into the idea of a "pepper", a single unique value that's used across an entire site/application for password encryption. He covers four flaws inherent with this method:
</p>
<ul>
<li>There's no proof that using them increases your security.
<li>There are no publicly vetted hashing algorithms that accept a pepper as an argument. 
<li>Using a block cipher instead of a pepper provides a stronger level of encryption and protection.
<li>The entire concept of a pepper is based around a flawed premise. [...] The flaw in that premise is that it's often not just your database that's leaked.
</ul>]]></description>
      <pubDate>Wed, 18 Apr 2012 09:23:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Michael Nitschinger's Blog: Session Encryption with Lithium]]></title>
      <guid>http://www.phpdeveloper.org/news/17427</guid>
      <link>http://www.phpdeveloper.org/news/17427</link>
      <description><![CDATA[<p>
<i>Michael Nitschinger</i> has a new post for the <a href="http://lithify.me/">Lithium framework</a> users out there - a quick tutorial about <a href="http://nitschinger.at/Session-Encryption-with-Lithium">encrypting your session information</a> with the new built in "Encrypt" strategy feature.
</p>
<blockquote>
If you check out the master branch, you can use the new Encrypt strategy to encrypt your session data automatically. This means that you can read and write session data in cleartext and they will be encrypted on the fly before getting stored (in a cookie, for example). 
</blockquote>
<p>
You'll need the <a href="http://php.net/manual/en/book.mcrypt.php">mcrypt extension</a> installed for it to work correctly, but it makes storing the encrypted version of your data more or less automatic. Just set up your Session configuration to use it as a strategy and any time you call a "read" or "write" the hard work is handled for you. For those more interests in what's "under the hood" he goes on to talk about how the strategy works, what cipher it uses by default, how to change it and the default string to use in hashing. 
</p>]]></description>
      <pubDate>Fri, 20 Jan 2012 12:09:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[WebReference.com: Encryption Techniques for Your PHP Development]]></title>
      <guid>http://www.phpdeveloper.org/news/14475</guid>
      <link>http://www.phpdeveloper.org/news/14475</link>
      <description><![CDATA[<p>
On WebReference.om today <i>Leidago Noabeb</i> has kicked off a series with <a href="http://www.webreference.com/programming/php/encryption_1/">part one</a> of his look at encryption in PHP applications and how it can keen you from ending up like him.
</p>
<blockquote>
Recently, an attacker hacked into my database and stole all the passwords and usernames stored there. Needless to say, I had to change everything and it cost me time and money. What made the crime easy for the attacker is that I never encrypted any of the passwords in the database. I've learned my lesson and now I'm passing along that wisdom with this article about encryption in PHP. Using some of the encryption techniques that PHP offers, you can safeguard your information in various ways.
</blockquote>
<p>
He lays the foundation for the series by talking about three different kinds of encryption that can help you protect your data - one-way encryption, symmetric (using a key) and asymmetric (shared key locking).
</p>]]></description>
      <pubDate>Thu, 06 May 2010 13:09:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Juozas Kaziukenas' Blog: PayPal payment with encryption]]></title>
      <guid>http://www.phpdeveloper.org/news/12002</guid>
      <link>http://www.phpdeveloper.org/news/12002</link>
      <description><![CDATA[<p>
<i>Juozas Kaziukenas</i> points out a new class in his <a href="http://dev.juokaz.com/php/paypal-payment-with-encryption">latest blog post</a> that can be used to make secure connections over to PayPal (encrypted) using their <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=p/xcl/rec/ewp-intro-outside">Encrypted Website Payment</a> method.
</p>
<blockquote>
In my situation, PayPal is only used to pay for orders - cart and order setup is done in our shop, so I do not want to have additional problems with users changing orders numbers, amount to be paid, etc. [...] Only PayPal knows how to decrypt it, because it uses public key encryption technology (you need to upload your certificate in PayPal account).
</blockquote>
<p>
Some sample usage code is included as is a <a href="http://www.pdncommunity.com/pdn/attachments/pdn/ewp/87/1/paypalewp.php">link to the class</a> itself. His example takes a payment transaction including the item name, amount and currency type and sends it off to the PayPal servers in a connection protected by certificates.
</p>]]></description>
      <pubDate>Mon, 23 Feb 2009 12:04:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Padraic Brady's Blog: PEAR::Encryption and Zend_Crypt Revisited]]></title>
      <guid>http://www.phpdeveloper.org/news/10429</guid>
      <link>http://www.phpdeveloper.org/news/10429</link>
      <description><![CDATA[<p>
<i>Padraic Brady</i> has <a href="http://blog.astrumfutura.com/archives/380-PEAREncryption-and-Zend_Crypt-Revisited.html">a new post</a> today mentioning both the PEAR::Encryption package and the Zend_Crypt component of the <a href="http://framework.zend.com">Zend Framework</a>.
</p>
<blockquote>
It's been a while since I did some active ZF/PEAR component development. It's been one of those 6 month periods where time to commit was a rarity for a few reasons. So now that I'm back on the road, where to?
</blockquote>
<p>
He sets his sights on the Zend_Crypt component and details some of the encryption methods it contains - HMAC, the Diffie-Hellman Key Agreement Protocol, a hashing wrapper and proposed support for a RSA public key cryptography. He mentions that a lot of this support is already in a beta package for <a href="http://pear.php.net">PEAR</a>.
</p>]]></description>
      <pubDate>Tue, 17 Jun 2008 15:32:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ryan Malesevich's Blog: MD5 to SHA-1 in PHP and MySQL (Part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/6397</guid>
      <link>http://www.phpdeveloper.org/news/6397</link>
      <description><![CDATA[<p>
<i>Ryan Malesevich</i> is taking a break from his look at some handy WordPress packages to share a small series on how to move from using MD5 hashes out to SHA-1 hashes for passwords in a MySQL database. He's posted <a href="http://ryanslife.net/2006/10/01/md5-to-sha-1-in-php-and-mysql-part-1/">part one</a> today.
</p>
<blockquote>
What if you're using MD5 in your web application and want to switch over to another encryption method. It's actually not that hard and I plan to cover them in this multi-part tutorial (I know I planned on writing this months ago, but it's better late then never). In this first part I plan on going over updating the database structure and a 'pseudo-code' of what will need to be done.
</blockquote>
<p>
As mentioned, he <a href="http://ryanslife.net/2006/10/01/md5-to-sha-1-in-php-and-mysql-part-1/">gives the outline</a> (pseudo-code) of how the process will work - basically, creating an SHA1 hash of the MD5 and the username in a "newpassword" column added to your database.
</p>]]></description>
      <pubDate>Mon, 02 Oct 2006 09:31:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: PHP encryption for the common man]]></title>
      <guid>http://www.phpdeveloper.org/news/5868</guid>
      <link>http://www.phpdeveloper.org/news/5868</link>
      <description><![CDATA[<p>
Encryption can be a difficult issue to comprehend, inside of PHP or not. Thankfully, there are resources out there that can help simplify things and bring them down to where they're really useful. <a href="http://www-128.ibm.com/developerworks/opensource/library/os-php-encrypt/?ca=dgr-btw04PHP-encrypt">This new tutorial</a> from the IBM developerWorks site today is just such a resource.
</p>
<blockquote>
In this increasingly virtual online world, you have to be careful to protect your data. Learn the basics of encoding and encrypting important bits of information, such as passwords, credit card numbers, and even entire messages. Get an overview of what it means to encrypt and decrypt information, as well as some practical examples involving passwords and other data, using PHP's built-in functionality.
</blockquote>
<p>
They <a href="http://www-128.ibm.com/developerworks/opensource/library/os-php-encrypt/?ca=dgr-btw04PHP-encrypt">start off</a> where any good encryption article should - with a primer in cyrptography. You can't understand the advanced without a good grasp on the basic. Using this knowledge, they start to work up their form, a simple username and password validation system.
</p>
<p>
They provide all of the code you'll need to build the form, and even intorduce you to the crypt() function. A bad use of this functionality is also illustrated. Of course, encryption is only half the fun, so they <a href="http://www-128.ibm.com/developerworks/opensource/library/os-php-encrypt/?ca=dgr-btw04PHP-encrypt">also include</a> an example of decrypting the same information.
</p>]]></description>
      <pubDate>Tue, 25 Jul 2006 12:45:30 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Houle's Blog: Easy PHP en/decryption tutorial]]></title>
      <guid>http://www.phpdeveloper.org/news/5451</guid>
      <link>http://www.phpdeveloper.org/news/5451</link>
      <description><![CDATA[<p>
On his blog today, <i>Joshua Houle</i> has posted <a href="http://www.joshuahoule.com/">a tutorial</a> that looks at some simple encrpytion/decryption functions that he's whipped up for his everyday use.
</p>
<quote>
<i>
Our first function is our encryption function called createsecretmessage. It takes two arguments, the message we want to encrypt and the <a href="http://en.wikipedia.org/wiki/Key_%28cryptography%29">key</a>. The second function is the decryption function. It also takes two arguements, the encrypted message and the key.
</i>
</quote>
<p>
Before he even gets into the code, he explains how the encryption portion of it works, complete with a chart representing the encryption process. Following this,the two functions are explained, each with their own code to make cut and paste simple.
</p>]]></description>
      <pubDate>Fri, 26 May 2006 06:14:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Private Pages with PHP and Text Files]]></title>
      <guid>http://www.phpdeveloper.org/news/4904</guid>
      <link>http://www.phpdeveloper.org/news/4904</link>
      <description><![CDATA[DevShed has <a href="http://www.devshed.com/c/a/PHP/Private-Pages-with-PHP-and-Text-Files/">this new tutorial</a> posted today concerning the use of text file authentication to create "private pages" in your site.
<p>
<quote>
<i>
You run a website that is simple enough it doesn't require a database. But your site features certain pages to which you'd like to limit access. Most of the time, that implies using a database to store passwords and usernames. There is an easier way, however. It's less secure, but it involves a lot less coding.
</i>
</quote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Private-Pages-with-PHP-and-Text-Files/">step you through</a> the process - creating the form, making the PHP page for it to submit to, checking the password (including a bit on encryption), and validating the user's entry against it.]]></description>
      <pubDate>Mon, 27 Feb 2006 09:16:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sjon.Blog:  Protecting your property (PHP Encryption)]]></title>
      <guid>http://www.phpdeveloper.org/news/4584</guid>
      <link>http://www.phpdeveloper.org/news/4584</link>
      <description><![CDATA[There's always been several PHP developers out there looking to protect the source that they so lovingly crafted. They look for alternatives to keeping it safe, but sometimes it's just not enough. In <a href="http://sjon.hortensius.net/blog/2005/12/protecting-your-property">this new post</a> on the Sjon.Blog today, he mentions some of the frustrations he's had already with exectly this.
<p>
<quote>
<i>
Zend almost convinced me that their <a href="http://www.zend.com/store/products/zend-safeguard-suite.php">Safeguard Suite</a> really secured your PHP scripts. Ofcourse I know that scripts need to be interpreted and executed and are therefore never 100% safe; but I expected some form of obfuscation and rewriting to prevent this. This <a href="http://www.phpdecode.com/">doesn't seem</a> to be the case though. I have had a look at <a href="http://pobs.mywalhalla.net/">PHP Obfuscator/Obscurer</a>, but a good illustration of the quality of that script can be illustrated with a simple, readable example.
<p>
Also, obfuscating <a href="http://www.react.nl/">React</a> took me almost an hour; which isn't that strange when you have had a look at the sourcecode. 
</i>
</quote>
<p>
As far as I've heard/seen so far, there's not really a good solution to <a href="http://sjon.hortensius.net/blog/2005/12/protecting-your-property">this dilema</a>. Sure, some are better than others, but there's still a hole there that is just waiting to be filled with an application anyone can use...]]></description>
      <pubDate>Fri, 30 Dec 2005 07:15:19 -0600</pubDate>
    </item>
  </channel>
</rss>

