At the time of writing, Debian Lenny supports Postgresql 8.3
sudo apt-get install postgresql-contrib-8.3
As your database login user:
psql -d dbname -f /usr/share/postgresql/8.3/contrib/pgcrypto.sql