General purpose cryptographic library based on the code from GnuPG