Refactored the Crypto-nomicon Pontifex perl script