[gnutls-help] GnuTLS cryptographic API questions
tzz at lifelogs.com
Wed Mar 29 19:26:38 CEST 2017
Hello! I am evaluating the integration of the GnuTLS cryptographic
functions into Emacs. My alternative is to use Nettle directly but I'd
rather use the GnuTLS API.
There are a few issues.
I found myself unable to list the ciphers, MACs, and digests supported.
Nettle exposes those lists but GnuTLS doesn't seem to. The problem with
an explicit list is that I end up with  which will be either too
limited (to support all platforms) or too aggressive. I don't think I
could maintain that list long-term, since it could change with every
GnuTLS release. How would you suggest I approach this for now?
I think these lists are available internally, so exposing them would be
very helpful going forward.
Also I had to manually map the MACs to the digests, there's no way to
tell which MACs don't have associated digests. Similarly there's no way
to tell which ciphers can be used for AEAD, but at least there's no
separate C type for AEAD ciphers. Maybe those correspondences could be
expressed by API functions so they don't have to be hard-coded?
const gnutls_cipher_algorithm_t gnutls_ciphers =
const gnutls_mac_algorithm_t gnutls_mac_algorithms =
/* Note this list has to be the same length as gnutls_mac_algorithms! */
const gnutls_digest_algorithm_t gnutls_digest_algorithms =
More information about the Gnutls-help