1gnutls_tpm_privkey_generate(3)      gnutls      gnutls_tpm_privkey_generate(3)
2
3
4

NAME

6       gnutls_tpm_privkey_generate - API function
7

SYNOPSIS

9       #include <gnutls/tpm.h>
10
11       int  gnutls_tpm_privkey_generate(gnutls_pk_algorithm_t pk, unsigned int
12       bits,  const  char  *  srk_password,   const   char   *   key_password,
13       gnutls_tpmkey_fmt_t     format,    gnutls_x509_crt_fmt_t    pub_format,
14       gnutls_datum_t * privkey, gnutls_datum_t * pubkey, unsigned int flags);
15

ARGUMENTS

17       gnutls_pk_algorithm_t pk
18                   the public key algorithm
19
20       unsigned int bits
21                   the security bits
22
23       const char * srk_password
24                   a password to protect the exported key (optional)
25
26       const char * key_password
27                   the password for the TPM (optional)
28
29       gnutls_tpmkey_fmt_t format
30                   the format of the private key
31
32       gnutls_x509_crt_fmt_t pub_format
33                   the format of the public key
34
35       gnutls_datum_t * privkey
36                   the generated key
37
38       gnutls_datum_t * pubkey
39                   the corresponding public key (may be null)
40
41       unsigned int flags
42                   should be a list of GNUTLS_TPM_* flags
43

DESCRIPTION

45       This function will generate a private key in the TPM chip. The  private
46       key will be generated within the chip and will be exported in a wrapped
47       with TPM's master key form. Furthermore the wrapped  key  can  be  pro‐
48       tected with the provided  password .
49
50       Note that bits in TPM is quantized value. If the input value is not one
51       of the allowed values, then it will be quantized to one of  512,  1024,
52       2048, 4096, 8192 and 16384.
53
54       Allowed flags are:
55

RETURNS

57       On  success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative er‐
58       ror value.
59

SINCE

61       3.1.0
62

REPORTING BUGS

64       Report bugs to <bugs@gnutls.org>.
65       Home page: https://www.gnutls.org
66
67
69       Copyright © 2001-2023 Free Software Foundation, Inc., and others.
70       Copying and distribution of this file, with  or  without  modification,
71       are  permitted in any medium without royalty provided the copyright no‐
72       tice and this notice are preserved.
73

SEE ALSO

75       The full documentation for gnutls is maintained as  a  Texinfo  manual.
76       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
77       visit
78
79       https://www.gnutls.org/manual/
80
81gnutls                               3.8.2      gnutls_tpm_privkey_generate(3)
Impressum