xref: /openbsd-src/lib/libcrypto/man/DSA_generate_key.3 (revision 66c749efc0f32a6add489c4c641a5d26d2ed0bef)
1*66c749efStb.\"	$OpenBSD: DSA_generate_key.3,v 1.11 2023/12/29 19:12:47 tb Exp $
2190fafb9Sschwarze.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3190fafb9Sschwarze.\"
4190fafb9Sschwarze.\" This file was written by Ulf Moeller <ulf@openssl.org>.
5190fafb9Sschwarze.\" Copyright (c) 2000 The OpenSSL Project.  All rights reserved.
6190fafb9Sschwarze.\"
7190fafb9Sschwarze.\" Redistribution and use in source and binary forms, with or without
8190fafb9Sschwarze.\" modification, are permitted provided that the following conditions
9190fafb9Sschwarze.\" are met:
10190fafb9Sschwarze.\"
11190fafb9Sschwarze.\" 1. Redistributions of source code must retain the above copyright
12190fafb9Sschwarze.\"    notice, this list of conditions and the following disclaimer.
13190fafb9Sschwarze.\"
14190fafb9Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
15190fafb9Sschwarze.\"    notice, this list of conditions and the following disclaimer in
16190fafb9Sschwarze.\"    the documentation and/or other materials provided with the
17190fafb9Sschwarze.\"    distribution.
18190fafb9Sschwarze.\"
19190fafb9Sschwarze.\" 3. All advertising materials mentioning features or use of this
20190fafb9Sschwarze.\"    software must display the following acknowledgment:
21190fafb9Sschwarze.\"    "This product includes software developed by the OpenSSL Project
22190fafb9Sschwarze.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
23190fafb9Sschwarze.\"
24190fafb9Sschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
25190fafb9Sschwarze.\"    endorse or promote products derived from this software without
26190fafb9Sschwarze.\"    prior written permission. For written permission, please contact
27190fafb9Sschwarze.\"    openssl-core@openssl.org.
28190fafb9Sschwarze.\"
29190fafb9Sschwarze.\" 5. Products derived from this software may not be called "OpenSSL"
30190fafb9Sschwarze.\"    nor may "OpenSSL" appear in their names without prior written
31190fafb9Sschwarze.\"    permission of the OpenSSL Project.
32190fafb9Sschwarze.\"
33190fafb9Sschwarze.\" 6. Redistributions of any form whatsoever must retain the following
34190fafb9Sschwarze.\"    acknowledgment:
35190fafb9Sschwarze.\"    "This product includes software developed by the OpenSSL Project
36190fafb9Sschwarze.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
37190fafb9Sschwarze.\"
38190fafb9Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
39190fafb9Sschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
40190fafb9Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
41190fafb9Sschwarze.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
42190fafb9Sschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
43190fafb9Sschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44190fafb9Sschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
45190fafb9Sschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
46190fafb9Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
47190fafb9Sschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
48190fafb9Sschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49190fafb9Sschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE.
508974101aSjmc.\"
51*66c749efStb.Dd $Mdocdate: December 29 2023 $
52fec9a10dSschwarze.Dt DSA_GENERATE_KEY 3
53fec9a10dSschwarze.Os
54fec9a10dSschwarze.Sh NAME
55fec9a10dSschwarze.Nm DSA_generate_key
56fec9a10dSschwarze.Nd generate DSA key pair
57fec9a10dSschwarze.Sh SYNOPSIS
58fec9a10dSschwarze.In openssl/dsa.h
59fec9a10dSschwarze.Ft int
60fec9a10dSschwarze.Fo DSA_generate_key
61fec9a10dSschwarze.Fa "DSA *a"
62fec9a10dSschwarze.Fc
63fec9a10dSschwarze.Sh DESCRIPTION
64fec9a10dSschwarze.Fn DSA_generate_key
65fec9a10dSschwarzeexpects
66fec9a10dSschwarze.Fa a
67fec9a10dSschwarzeto contain DSA parameters.
68fec9a10dSschwarzeIt generates a new key pair and stores it in
69fec9a10dSschwarze.Fa a->pub_key
70fec9a10dSschwarzeand
71fec9a10dSschwarze.Fa a->priv_key .
728974101aSjmc.Sh RETURN VALUES
73fec9a10dSschwarze.Fn DSA_generate_key
74fec9a10dSschwarzereturns 1 on success or 0 otherwise.
75fec9a10dSschwarzeThe error codes can be obtained by
76fec9a10dSschwarze.Xr ERR_get_error 3 .
77fec9a10dSschwarze.Sh SEE ALSO
78*66c749efStb.Xr DSA_generate_parameters_ex 3 ,
796f64bd5eSschwarze.Xr DSA_get0_key 3 ,
80ab3cf6dbSschwarze.Xr DSA_new 3
81fec9a10dSschwarze.Sh HISTORY
82fec9a10dSschwarze.Fn DSA_generate_key
8310e00d17Sschwarzefirst appeared in SSLeay 0.6.0 and has been available since
849cb92ae1Sschwarze.Ox 2.4 .
85