This is DEPRECATED, because Gavin Stark wrote a native ruby class last month. I will leave this up if someone wants a C implementation for OSX, but after that Gavin did the work in Ruby and I encourage looking there:
http://hasmanyquestions.wordpress.com/2007/11/23/perfect-paper-passwords-in-ruby/
Ruby Extension for GRC’s Perfect Paper Passwords V3.
UPDATE 12/11/2007, current version only supports Mac OSX, I will be creating a Linux version shortly. Not sure if I’ll wrap a Windows version.
Ruby Extension for GRC’s Perfect Paper Passwords/PPP C (http://www.grc.com/ppp/) implementation by John Graham-Cumming.
Create with SWIG.
Version .01
CODE/LIB: http://www.1000fires.com/ppp3-Ruby-extension.zip
C Ref: http://www.jgc.org/blog/2007/11/steve-gibsons-ppp-new-version-3-in-java.html
NOTE: Because of the way C works, the first argument must be a space (not a null char).
Entry point to ppp3 is “Ppp3.main” Ruby call after include with a Ruby array as argument.
USAGE in ruby:
require ‘ppp3′ #ppp3.bundle#Usage 1, just get a random sequence key.
Ppp3.main([” “,” “])# Usage 2, create an array and call with arguments.
# call the Ppp3.main call with this array:a = Array[”",”efbda242bd1db23fd343b516a2a10d0eed08250e542a789811307f2011a92df6″,”0″,”2″]
Ppp3.main(a)#Usage 3, call with implied array string.
Ppp3.main([”",”efbda242bd1db23fd343b516a2a10d0eed08250e542a789811307f2011a92df6″,”0″,”70″])
TODO. Add a Ruby convenience library to do some parsing and pretty printing as well as prepare for Rails integration.

December 13th, 2007 at 3:29 pm
Thanks for the reference! When Steve posts the official specs on the V3.1 of PPP I’ll work on a native version of that. I wrote the V2 of PPP as an exercise, mostly to see if I could do it and how it would compare to the Java/C/Perl versions. I think the Ruby version holds up nicely…