diff options
author | jmc <> | 2016-11-08 22:19:45 +0000 |
---|---|---|
committer | jmc <> | 2016-11-08 22:19:45 +0000 |
commit | 940c272713242bcc8ff6a54576c20345a43a098c (patch) | |
tree | 766ec4c7fc8764a33b9f81c723fee3779331be6b /src/lib/libcrypto/man/BN_num_bytes.3 | |
parent | 225a4b22cb848306a5f851162860ae2ef943de83 (diff) | |
download | openbsd-940c272713242bcc8ff6a54576c20345a43a098c.tar.gz openbsd-940c272713242bcc8ff6a54576c20345a43a098c.tar.bz2 openbsd-940c272713242bcc8ff6a54576c20345a43a098c.zip |
some cleanup;
Diffstat (limited to 'src/lib/libcrypto/man/BN_num_bytes.3')
-rw-r--r-- | src/lib/libcrypto/man/BN_num_bytes.3 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/BN_num_bytes.3 b/src/lib/libcrypto/man/BN_num_bytes.3 index 5223ff1116..3e96a401a5 100644 --- a/src/lib/libcrypto/man/BN_num_bytes.3 +++ b/src/lib/libcrypto/man/BN_num_bytes.3 | |||
@@ -1,11 +1,11 @@ | |||
1 | .\" $OpenBSD: BN_num_bytes.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: BN_num_bytes.3,v 1.3 2016/11/08 22:19:45 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 8 2016 $ |
4 | .Dt BN_NUM_BYTES 3 | 4 | .Dt BN_NUM_BYTES 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
7 | .Nm BN_num_bits , | ||
8 | .Nm BN_num_bytes , | 7 | .Nm BN_num_bytes , |
8 | .Nm BN_num_bits , | ||
9 | .Nm BN_num_bits_word | 9 | .Nm BN_num_bits_word |
10 | .Nd get BIGNUM size | 10 | .Nd get BIGNUM size |
11 | .Sh SYNOPSIS | 11 | .Sh SYNOPSIS |
@@ -25,12 +25,12 @@ | |||
25 | .Sh DESCRIPTION | 25 | .Sh DESCRIPTION |
26 | .Fn BN_num_bytes | 26 | .Fn BN_num_bytes |
27 | returns the size of a | 27 | returns the size of a |
28 | .Sy BIGNUM | 28 | .Vt BIGNUM |
29 | in bytes. | 29 | in bytes. |
30 | .Pp | 30 | .Pp |
31 | .Fn BN_num_bits_word | 31 | .Fn BN_num_bits_word |
32 | returns the number of significant bits in a word. | 32 | returns the number of significant bits in a word. |
33 | If we take 0x00000432 as an example, it returns 11, not 16, not 32. | 33 | As an example, 0x00000432 returns 11, not 16 or 32. |
34 | Basically, except for a zero, it returns | 34 | Basically, except for a zero, it returns |
35 | .Pp | 35 | .Pp |
36 | .D1 floor(log2( Ns Fa w ) ) No + 1 . | 36 | .D1 floor(log2( Ns Fa w ) ) No + 1 . |
@@ -43,9 +43,7 @@ following the same principle as | |||
43 | .Pp | 43 | .Pp |
44 | .Fn BN_num_bytes | 44 | .Fn BN_num_bytes |
45 | is a macro. | 45 | is a macro. |
46 | .Sh RETURN VALUES | 46 | .Pp |
47 | The size. | ||
48 | .Sh NOTES | ||
49 | Some have tried using | 47 | Some have tried using |
50 | .Fn BN_num_bits | 48 | .Fn BN_num_bits |
51 | on individual numbers in RSA keys, DH keys and DSA keys, and found that | 49 | on individual numbers in RSA keys, DH keys and DSA keys, and found that |
@@ -65,6 +63,8 @@ or use | |||
65 | .Fn BN_num_bytes | 63 | .Fn BN_num_bytes |
66 | and multiply with 8 (although there's no real guarantee that will match | 64 | and multiply with 8 (although there's no real guarantee that will match |
67 | the "key size", just a lot more probability). | 65 | the "key size", just a lot more probability). |
66 | .Sh RETURN VALUES | ||
67 | The size. | ||
68 | .Sh SEE ALSO | 68 | .Sh SEE ALSO |
69 | .Xr bn 3 , | 69 | .Xr bn 3 , |
70 | .Xr DH_size 3 , | 70 | .Xr DH_size 3 , |