GNUTLS_CRYPTO_REGISTER_AEAD_CIPHER(3)

πŸ’– NAME πŸ’–

gnutls_crypto_register_aead_cipher β€” it's an API function, bestie. That's the whole vibe. It registers an AEAD cipher with GnuTLS. ✨

This page lives in the gnutls manual (section 3, the library-calls girlies), so if you were looking for the man page, you found her. πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/crypto.h>

int gnutls_crypto_register_aead_cipher(gnutls_cipher_algorithm_t
algorithm, int priority, gnutls_cipher_init_func init,
gnutls_cipher_setkey_func setkey, gnutls_cipher_aead_encrypt_func
aead_encrypt, gnutls_cipher_aead_decrypt_func aead_decrypt,
gnutls_cipher_deinit_func deinit);

Seven arguments. Seven. She's high maintenance and we love that for her. πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_cipher_algorithm_t algorithm β€” this is the GnuTLS AEAD cipher identifier, aka which cipher you're claiming. πŸ‘‘
  • int priority β€” the priority of the algorithm. Number go brrr, lowest one wins (more on that below, stay with me). 🌈
  • gnutls_cipher_init_func init β€” a function which initializes the cipher. Wake her up. ⭐
  • gnutls_cipher_setkey_func setkey β€” a function which sets the key of the cipher. Give her the keys to the kingdom. πŸ”‘
  • gnutls_cipher_aead_encrypt_func aead_encrypt β€” perform the AEAD encryption. Lock it in. πŸ”₯
  • gnutls_cipher_aead_decrypt_func aead_decrypt β€” perform the AEAD decryption. Unlock it. πŸ”“
  • gnutls_cipher_deinit_func deinit β€” a function which deinitializes the cipher. Say bye, she's going to sleep. 😴

✨ DESCRIPTION ✨

Okay so. This function will register a cipher algorithm to be used by gnutls. Like, you're sliding your own custom cipher into the rotation. πŸ’–

Any algorithm registered will override the included algorithms, and by convention kernel implemented algorithms have priority of 90 and CPU-assisted of 80. The algorithm with the lowest priority will be used by gnutls. Yes, lowest. Not highest. It's giving backwards but it's canon. 🫢

In the case the registered init or setkey functions return GNUTLS_E_NEED_FALLBACK, GnuTLS will attempt to use the next in priority registered cipher. So it's not a fail, it's a "next bestie up" situation. πŸ™ˆ

The functions registered will be used with the new AEAD API introduced in GnuTLS 3.4.0. Internally GnuTLS uses the new AEAD API. So like, this is the main character path, not the legacy side quest. πŸ‘‘


πŸ’€ DEPRECATED πŸ’€

since 3.7.0 it is no longer possible to override cipher implementation.

Not me delivering bad news but. Yeah. She's deprecated, bestie. Since 3.7.0 you literally cannot override the cipher implementation anymore. Pour one out. 😭


🌟 RETURNS 🌟

GNUTLS_E_SUCCESS on success, otherwise a negative error code. Classic. Negative means it's not giving what it's supposed to give. πŸ’œ


🧚 SINCE 🧚

3.4.0 β€” she's been around. Vintage. Iconic. ⭐


πŸ“ REPORTING BUGS πŸ“

Found a bug? Tell the gnutls girlies:


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. Slay, legally speaking. πŸŽ€


🌈 SEE ALSO 🌈

The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form, visit:

https://www.gnutls.org/manual/

And that's the whole page, bestie β€” no cap, every flag, every argument, every caveat, untouched. πŸ’–

This was the gnutls_crypto_register_aead_cipher(3) page from the gnutls manual, version 3.8.13. Mwah. 🫢✨

πŸ“¦ where this page comes from