summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorschwarze <>2022-07-13 21:44:23 +0000
committerschwarze <>2022-07-13 21:44:23 +0000
commit102b401d8783c6a4c5f9dc0c9a0ddb4bab2f402a (patch)
treee4124a66e92f1ed2cd034c83991ceb02bb85ce2c /src
parentb68d0bc6a9857dd9ce4ba6cd65d3c2e75b595544 (diff)
downloadopenbsd-102b401d8783c6a4c5f9dc0c9a0ddb4bab2f402a.tar.gz
openbsd-102b401d8783c6a4c5f9dc0c9a0ddb4bab2f402a.tar.bz2
openbsd-102b401d8783c6a4c5f9dc0c9a0ddb4bab2f402a.zip
In dsa.h rev. 1.34 (14 Jan 2022), tb@ provided DSA_bits(3).
Document it from scratch. While here, merge a few details from the OpenSSL 1.1.1 branch, which is still under a free license, into the documentation of DSA_size(3).
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/man/DSA_size.361
1 files changed, 51 insertions, 10 deletions
diff --git a/src/lib/libcrypto/man/DSA_size.3 b/src/lib/libcrypto/man/DSA_size.3
index 7e935e3a42..4786acc7e9 100644
--- a/src/lib/libcrypto/man/DSA_size.3
+++ b/src/lib/libcrypto/man/DSA_size.3
@@ -1,8 +1,26 @@
1.\" $OpenBSD: DSA_size.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $ 1.\" $OpenBSD: DSA_size.3,v 1.8 2022/07/13 21:44:23 schwarze Exp $
2.\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 2.\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>. 4.\" This file is a derived work.
5.\" Copyright (c) 2000, 2002 The OpenSSL Project. All rights reserved. 5.\" The changes are covered by the following Copyright and license:
6.\"
7.\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org>
8.\"
9.\" Permission to use, copy, modify, and distribute this software for any
10.\" purpose with or without fee is hereby granted, provided that the above
11.\" copyright notice and this permission notice appear in all copies.
12.\"
13.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
14.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
15.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
16.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
17.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
18.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
19.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
20.\"
21.\" The original file was written by Ulf Moeller <ulf@openssl.org>
22.\" and Dr. Stephen Henson <steve@openssl.org>.
23.\" Copyright (c) 2000, 2002, 2016 The OpenSSL Project. All rights reserved.
6.\" 24.\"
7.\" Redistribution and use in source and binary forms, with or without 25.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions 26.\" modification, are permitted provided that the following conditions
@@ -48,34 +66,57 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 66.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 67.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 68.\"
51.Dd $Mdocdate: March 27 2018 $ 69.Dd $Mdocdate: July 13 2022 $
52.Dt DSA_SIZE 3 70.Dt DSA_SIZE 3
53.Os 71.Os
54.Sh NAME 72.Sh NAME
55.Nm DSA_size 73.Nm DSA_size ,
56.Nd get DSA signature size 74.Nm DSA_bits
75.Nd get DSA signature or key size
57.Sh SYNOPSIS 76.Sh SYNOPSIS
58.In openssl/dsa.h 77.In openssl/dsa.h
59.Ft int 78.Ft int
60.Fo DSA_size 79.Fo DSA_size
61.Fa "const DSA *dsa" 80.Fa "const DSA *dsa"
62.Fc 81.Fc
82.Ft int
83.Fo DSA_bits
84.Fa "const DSA *dsa"
85.Fc
63.Sh DESCRIPTION 86.Sh DESCRIPTION
64This function returns the size of an ASN.1 encoded DSA signature in 87.Fn DSA_size
65bytes. 88returns the maximum size of an ASN.1 encoded DSA signature for the key
89.Fa dsa
90in bytes.
66It can be used to determine how much memory must be allocated for a DSA 91It can be used to determine how much memory must be allocated for a DSA
67signature. 92signature.
68.Pp 93.Pp
69.Fa dsa->q 94.Fa dsa->q
70must not be 95must not be
71.Dv NULL . 96.Dv NULL .
97.Pp
98.Fn DSA_bits
99returns the number of significant bits in the public domain parameter
100.Fa p
101contained in
102.Fa dsa .
103This is also the number of bits in the public key.
72.Sh RETURN VALUES 104.Sh RETURN VALUES
73The size in bytes. 105.Fn DSA_size
106returns the size of the signature in bytes.
107.Pp
108.Fn DSA_bits
109returns the size of the public key in bits.
74.Sh SEE ALSO 110.Sh SEE ALSO
75.Xr DSA_get0_pqg 3 , 111.Xr DSA_get0_pqg 3 ,
76.Xr DSA_new 3 , 112.Xr DSA_new 3 ,
113.Xr DSA_security_bits 3 ,
77.Xr DSA_sign 3 114.Xr DSA_sign 3
78.Sh HISTORY 115.Sh HISTORY
79.Fn DSA_size 116.Fn DSA_size
80first appeared in SSLeay 0.6.0 and has been available since 117first appeared in SSLeay 0.6.0 and has been available since
81.Ox 2.4 . 118.Ox 2.4 .
119.Pp
120.Fn DSA_bits
121first appeared in OpenSSL 1.1.0 and has been available since
122.Ox 7.1 .