changes to allow using nettle instead of libtomcrypt