|
Packit Service |
4684c1 |
.\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
|
|
Packit Service |
4684c1 |
.TH "gnutls_privkey_generate" 3 "3.6.14" "gnutls" "gnutls"
|
|
Packit Service |
4684c1 |
.SH NAME
|
|
Packit Service |
4684c1 |
gnutls_privkey_generate \- API function
|
|
Packit Service |
4684c1 |
.SH SYNOPSIS
|
|
Packit Service |
4684c1 |
.B #include <gnutls/abstract.h>
|
|
Packit Service |
4684c1 |
.sp
|
|
Packit Service |
4684c1 |
.BI "int gnutls_privkey_generate(gnutls_privkey_t " pkey ", gnutls_pk_algorithm_t " algo ", unsigned int " bits ", unsigned int " flags ");"
|
|
Packit Service |
4684c1 |
.SH ARGUMENTS
|
|
Packit Service |
4684c1 |
.IP "gnutls_privkey_t pkey" 12
|
|
Packit Service |
4684c1 |
An initialized private key
|
|
Packit Service |
4684c1 |
.IP "gnutls_pk_algorithm_t algo" 12
|
|
Packit Service |
4684c1 |
is one of the algorithms in \fBgnutls_pk_algorithm_t\fP.
|
|
Packit Service |
4684c1 |
.IP "unsigned int bits" 12
|
|
Packit Service |
4684c1 |
the size of the parameters to generate
|
|
Packit Service |
4684c1 |
.IP "unsigned int flags" 12
|
|
Packit Service |
4684c1 |
Must be zero or flags from \fBgnutls_privkey_flags_t\fP.
|
|
Packit Service |
4684c1 |
.SH "DESCRIPTION"
|
|
Packit Service |
4684c1 |
This function will generate a random private key. Note that this
|
|
Packit Service |
4684c1 |
function must be called on an initialized private key.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
The flag \fBGNUTLS_PRIVKEY_FLAG_PROVABLE\fP
|
|
Packit Service |
4684c1 |
instructs the key generation process to use algorithms like Shawe\-Taylor
|
|
Packit Service |
4684c1 |
(from FIPS PUB186\-4) which generate provable parameters out of a seed
|
|
Packit Service |
4684c1 |
for RSA and DSA keys. See \fBgnutls_privkey_generate2()\fP for more
|
|
Packit Service |
4684c1 |
information.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
Note that when generating an elliptic curve key, the curve
|
|
Packit Service |
4684c1 |
can be substituted in the place of the bits parameter using the
|
|
Packit Service |
4684c1 |
\fBGNUTLS_CURVE_TO_BITS()\fP macro. The input to the macro is any curve from
|
|
Packit Service |
4684c1 |
\fBgnutls_ecc_curve_t\fP.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
For DSA keys, if the subgroup size needs to be specified check
|
|
Packit Service |
4684c1 |
the \fBGNUTLS_SUBGROUP_TO_BITS()\fP macro.
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
It is recommended to do not set the number of \fIbits\fP directly, use \fBgnutls_sec_param_to_pk_bits()\fP instead .
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
See also \fBgnutls_privkey_generate2()\fP.
|
|
Packit Service |
4684c1 |
.SH "RETURNS"
|
|
Packit Service |
4684c1 |
On success, \fBGNUTLS_E_SUCCESS\fP (0) is returned, otherwise a
|
|
Packit Service |
4684c1 |
negative error value.
|
|
Packit Service |
4684c1 |
.SH "SINCE"
|
|
Packit Service |
4684c1 |
3.3.0
|
|
Packit Service |
4684c1 |
.SH "REPORTING BUGS"
|
|
Packit Service |
4684c1 |
Report bugs to <bugs@gnutls.org>.
|
|
Packit Service |
4684c1 |
.br
|
|
Packit Service |
4684c1 |
Home page: https://www.gnutls.org
|
|
Packit Service |
4684c1 |
|
|
Packit Service |
4684c1 |
.SH COPYRIGHT
|
|
Packit Service |
4684c1 |
Copyright \(co 2001- Free Software Foundation, Inc., and others.
|
|
Packit Service |
4684c1 |
.br
|
|
Packit Service |
4684c1 |
Copying and distribution of this file, with or without modification,
|
|
Packit Service |
4684c1 |
are permitted in any medium without royalty provided the copyright
|
|
Packit Service |
4684c1 |
notice and this notice are preserved.
|
|
Packit Service |
4684c1 |
.SH "SEE ALSO"
|
|
Packit Service |
4684c1 |
The full documentation for
|
|
Packit Service |
4684c1 |
.B gnutls
|
|
Packit Service |
4684c1 |
is maintained as a Texinfo manual.
|
|
Packit Service |
4684c1 |
If the /usr/share/doc/gnutls/
|
|
Packit Service |
4684c1 |
directory does not contain the HTML form visit
|
|
Packit Service |
4684c1 |
.B
|
|
Packit Service |
4684c1 |
.IP https://www.gnutls.org/manual/
|
|
Packit Service |
4684c1 |
.PP
|