summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-02-24 15:18:47 +0000
committerschwarze <>2018-02-24 15:18:47 +0000
commit57336a7c259046cd409d3ba5ffe7387aee4d16cf (patch)
tree88ad5c07fe48ada09cda4375502ec1a2dc9eb16e
parent133614e30799c337e9726b3e2634169cc587adc4 (diff)
downloadopenbsd-57336a7c259046cd409d3ba5ffe7387aee4d16cf.tar.gz
openbsd-57336a7c259046cd409d3ba5ffe7387aee4d16cf.tar.bz2
openbsd-57336a7c259046cd409d3ba5ffe7387aee4d16cf.zip
In dh.h rev. 1.23 2018/02/20 17:59:31, tb@ provided DH_bits(3).
Merge the documentation from OpenSSL, tweaked by me.
-rw-r--r--src/lib/libcrypto/man/DH_size.331
1 files changed, 21 insertions, 10 deletions
diff --git a/src/lib/libcrypto/man/DH_size.3 b/src/lib/libcrypto/man/DH_size.3
index e566e52357..71b55dbfb1 100644
--- a/src/lib/libcrypto/man/DH_size.3
+++ b/src/lib/libcrypto/man/DH_size.3
@@ -1,8 +1,9 @@
1.\" $OpenBSD: DH_size.3,v 1.5 2018/02/17 16:59:48 schwarze Exp $ 1.\" $OpenBSD: DH_size.3,v 1.6 2018/02/24 15:18:47 schwarze Exp $
2.\" OpenSSL 4d524e10 Feb 24 11:55:57 2000 +0000 2.\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3.\" 3.\"
4.\" This file was written by Ulf Moeller <ulf@openssl.org>. 4.\" This file was written by Ulf Moeller <ulf@openssl.org>
5.\" Copyright (c) 2000 The OpenSSL Project. All rights reserved. 5.\" and Kurt Roeckx <kurt@roeckx.be>.
6.\" Copyright (c) 2000, 2015 The OpenSSL Project. All rights reserved.
6.\" 7.\"
7.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
8.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
@@ -48,31 +49,38 @@
48.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
49.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
50.\" 51.\"
51.Dd $Mdocdate: February 17 2018 $ 52.Dd $Mdocdate: February 24 2018 $
52.Dt DH_SIZE 3 53.Dt DH_SIZE 3
53.Os 54.Os
54.Sh NAME 55.Sh NAME
55.Nm DH_size 56.Nm DH_size ,
57.Nm DH_bits
56.Nd get Diffie-Hellman prime size 58.Nd get Diffie-Hellman prime size
57.Sh SYNOPSIS 59.Sh SYNOPSIS
58.In openssl/dh.h 60.In openssl/dh.h
59.Ft int 61.Ft int
60.Fo DH_size 62.Fo DH_size
61.Fa "DH *dh" 63.Fa "const DH *dh"
64.Fc
65.Ft int
66.Fo DH_size
67.Fa "const DH *dh"
62.Fc 68.Fc
63.Sh DESCRIPTION 69.Sh DESCRIPTION
64This function returns the Diffie-Hellman size in bytes. 70.Fn DH_size
71returns the Diffie-Hellman prime size in bytes.
65It can be used to determine how much memory must be allocated for the 72It can be used to determine how much memory must be allocated for the
66shared secret computed by 73shared secret computed by
67.Xr DH_compute_key 3 . 74.Xr DH_compute_key 3 .
68.Pp 75.Pp
76.Fn DH_bits
77returns the number of significant bits in the key.
78.Pp
69.Fa dh 79.Fa dh
70and 80and
71.Fa dh->p 81.Fa dh->p
72must not be 82must not be
73.Dv NULL . 83.Dv NULL .
74.Sh RETURN VALUES
75The size in bytes.
76.Sh SEE ALSO 84.Sh SEE ALSO
77.Xr BN_num_bytes 3 , 85.Xr BN_num_bytes 3 ,
78.Xr DH_generate_key 3 , 86.Xr DH_generate_key 3 ,
@@ -81,3 +89,6 @@ The size in bytes.
81.Sh HISTORY 89.Sh HISTORY
82.Fn DH_size 90.Fn DH_size
83is available in all versions of SSLeay and OpenSSL. 91is available in all versions of SSLeay and OpenSSL.
92.Pp
93.Fn DH_bits
94first appeared in OpenSSL 1.1.0.