Libgcrypt is a general purpose crypto library based on the code used in GnuPG.