gnutls_privkey_decrypt_data2(3)
β¨ gnutls_privkey_decrypt_data2 β¨
okay bestie, so we're in the gnutls manual, and today's main character is gnutls_privkey_decrypt_data2 π
it's an API function, it's iconic, and it's about decrypting stuff in the most paranoid-but-make-it-chic way possible. let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <gnutls/abstract.h>
int gnutls_privkey_decrypt_data2(gnutls_privkey_t key, unsigned int
flags, const gnutls_datum_t * ciphertext, unsigned char * plaintext,
size_t plaintext_size);
π ARGUMENTS π
gnutls_privkey_t keyβ holds the key, like literally the whole point, it's giving key holder energy πunsigned int flagsβ zero for now. that's it. that's the tea. zero. for now. πconst gnutls_datum_t * ciphertextβ this is holding the data that's about to get decrypted π¦unsigned char * plaintextβ a preallocated buffer, and it will get filled with the plaintext, no cap β¨size_t plaintext_sizeβ the size of the plaintext, and heads up, it's in/out π
π DESCRIPTION π
so this function decrypts the data you give it, using whatever algorithm your private key supports. simple, slay.
BUT. here's the plot twist that makes her special: unlike gnutls_privkey_decrypt_data(), this one operates in constant time and constant memory access β±οΈπ which is the cryptographic way of saying "she does not leak your secrets through side channels, she is a professional, she is unbothered, she is moored."
β RETURNS β
if it worked? you get GNUTLS_E_SUCCESS (which is 0), and honestly that's the vibe check passing π
otherwise? a negative error value. π rude but informative.
π¦ SINCE π¦
3.6.5 β so she's been around a minute, she's established, she's got seniority π
π§ REPORTING BUGS π§
found a bug? spill to <bugs@gnutls.org> π§
home page: https://www.gnutls.org
π COPYRIGHT π
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. so like, go off, redistribute responsibly π«Ά
π 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 π
this was gnutls version 3.8.13, page gnutls_privkey_decrypt_data2(3), and she ate, no crumbs. stay constant-time, stay iconic β¨π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms