I've never heard of it myself, but Wikipedia says:

PBKDF2 (Password-Based Key Derivation Function) is a key derivation function that is part of RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, specifically PKCS #5 v2.0
The specification is available in RFC 2898, and I found an OSS Perl implementation on Google's code search from Palm::Keyring, which I list below:

Thanks to Jochen Hoenicke <hoenicke@gmail.com> # (one of the authors of Palm Keyring) # for these next two subs. # Usage pbkdf2(password, salt, iter, keylen, prf) # iter is number of iterations # keylen is length of generated key in bytes # prf is the pseudo random function (e.g. hmac_sha1) # returns the key. sub _pbkdf2($$$$$) { my ($password, $salt, $iter, $keylen, $prf) = @_; my ($k, $t, $u, $ui, $i); $t = ""; for ($k = 1; length($t) < $keylen; $k++) { $u = $ui = &$prf($salt.pack('N', $k), $password); for ($i = 1; $i < $iter; $i++) { $ui = &$prf($ui, $password); $u ^= $ui; } $t .= $u; } return substr($t, 0, $keylen); }

Whether it conforms to the spec or not is another question :)

If it does, consider CPAN'ing it (with the author's permission)

Clint


In reply to Re: PBKDF2 crypt by clinton
in thread PBKDF2 crypt by dsheroh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.