gnutls_x509_privkey_get_seed(3)

๐Ÿ’– gnutls_x509_privkey_get_seed(3) ๐Ÿ’–

okay bestie, sit down, we're reading a gnutls manpage together and honestly? it's giving โœจniche cryptographic loreโœจ. this one lives in the gnutls manual, and it's all about pulling the seed back out of a private key. yes, the literal origin story of your key. main character energy fr fr ๐ŸŒฑ


๐ŸŒธ NAME ๐ŸŒธ

gnutls_x509_privkey_get_seed โ€” it's an API function, bestie, that's the whole vibe ๐Ÿ’…


โœจ SYNOPSIS โœจ

#include <gnutls/x509.h>

int gnutls_x509_privkey_get_seed(gnutls_x509_privkey_t key,
gnutls_digest_algorithm_t * digest, void * seed, size_t * seed_size);

๐ŸŽ€ ARGUMENTS ๐ŸŽ€

  • gnutls_x509_privkey_t key โ€” this one should contain a gnutls_x509_privkey_t type. it's the key you're interrogating, the one you're asking "so... where did you come from?" ๐Ÿ•ต๏ธโ€โ™€๏ธ
  • gnutls_digest_algorithm_t * digest โ€” if it's non-NULL, it will contain the digest algorithm that was used for key generation (if applicable). so like, if there's a digest to report, it goes here ๐Ÿงพ
  • void * seed โ€” where seed will be copied to. that's the destination, the lil home for your seed ๐Ÿ 
  • size_t * seed_size โ€” originally holds the size of seed, and will be updated with the actual size. so it goes in as "here's how much room i have" and comes out as "here's how much i actually used". glow-up, honestly ๐Ÿ’ซ

๐Ÿ’œ DESCRIPTION ๐Ÿ’œ

this function will return the seed that was used to generate the given private key. that's it, that's the whole job โ€” reverse-engineering the ~origin story~ of your key ๐Ÿ”ฎ

but not me warning you: that function will succeed only if the key was generated as a provable key. no provable key? no seed. it's giving exclusive club, and not everyone has a membership card ๐ŸŽŸ๏ธ


๐Ÿ”ฅ RETURNS ๐Ÿ”ฅ

on success, GNUTLS_E_SUCCESS (0) is returned โ€” slay, zero, we love a zero ๐ŸŽ‰

otherwise, a negative error value. so if you see a negative number, that's the universe saying "no seed for you today" ๐Ÿ˜ญ


๐Ÿฆ‹ SINCE ๐Ÿฆ‹

3.5.0 โ€” this has been serving looks since version 3.5.0, periodt ๐Ÿ‘‘


๐Ÿ› REPORTING BUGS ๐Ÿ›

found a bug? don't suffer in silence, tell the people:

report bugs to <bugs@gnutls.org>.

home page: https://www.gnutls.org


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. (yes bestie, that means you can share it, just keep the receipts ๐Ÿงพ)


๐ŸŒˆ 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 type, every word, all accounted for ๐Ÿซถ

this was gnutls version 3.8.13, and the page is gnutls_x509_privkey_get_seed(3) โ€” stay hydrated, read your manpages, and may your keys always be provable ๐Ÿ’–โœจ๐ŸŒธ๐Ÿฆ‹๐Ÿ’…

๐Ÿ“ฆ where this page comes from