summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/BN_BLINDING_new.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/BN_BLINDING_new.3')
-rw-r--r--src/lib/libcrypto/man/BN_BLINDING_new.3332
1 files changed, 0 insertions, 332 deletions
diff --git a/src/lib/libcrypto/man/BN_BLINDING_new.3 b/src/lib/libcrypto/man/BN_BLINDING_new.3
deleted file mode 100644
index b507e5bca8..0000000000
--- a/src/lib/libcrypto/man/BN_BLINDING_new.3
+++ /dev/null
@@ -1,332 +0,0 @@
1.\" $OpenBSD: BN_BLINDING_new.3,v 1.11 2019/06/06 01:06:58 schwarze Exp $
2.\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
3.\"
4.\" This file was written by Nils Larsch <nils@openssl.org>.
5.\" Copyright (c) 2005, 2008, 2013, 2015 The OpenSSL Project.
6.\" All rights reserved.
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\"
12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer.
14.\"
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\" notice, this list of conditions and the following disclaimer in
17.\" the documentation and/or other materials provided with the
18.\" distribution.
19.\"
20.\" 3. All advertising materials mentioning features or use of this
21.\" software must display the following acknowledgment:
22.\" "This product includes software developed by the OpenSSL Project
23.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24.\"
25.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26.\" endorse or promote products derived from this software without
27.\" prior written permission. For written permission, please contact
28.\" openssl-core@openssl.org.
29.\"
30.\" 5. Products derived from this software may not be called "OpenSSL"
31.\" nor may "OpenSSL" appear in their names without prior written
32.\" permission of the OpenSSL Project.
33.\"
34.\" 6. Redistributions of any form whatsoever must retain the following
35.\" acknowledgment:
36.\" "This product includes software developed by the OpenSSL Project
37.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
38.\"
39.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\"
52.Dd $Mdocdate: June 6 2019 $
53.Dt BN_BLINDING_NEW 3
54.Os
55.Sh NAME
56.Nm BN_BLINDING_new ,
57.Nm BN_BLINDING_free ,
58.Nm BN_BLINDING_update ,
59.Nm BN_BLINDING_convert ,
60.Nm BN_BLINDING_invert ,
61.Nm BN_BLINDING_convert_ex ,
62.Nm BN_BLINDING_invert_ex ,
63.Nm BN_BLINDING_get_thread_id ,
64.Nm BN_BLINDING_set_thread_id ,
65.Nm BN_BLINDING_thread_id ,
66.Nm BN_BLINDING_get_flags ,
67.Nm BN_BLINDING_set_flags ,
68.Nm BN_BLINDING_create_param
69.Nd blinding related BIGNUM functions
70.Sh SYNOPSIS
71.In openssl/bn.h
72.Ft BN_BLINDING *
73.Fo BN_BLINDING_new
74.Fa "const BIGNUM *A"
75.Fa "const BIGNUM *Ai"
76.Fa "BIGNUM *mod"
77.Fc
78.Ft void
79.Fo BN_BLINDING_free
80.Fa "BN_BLINDING *b"
81.Fc
82.Ft int
83.Fo BN_BLINDING_update
84.Fa "BN_BLINDING *b"
85.Fa "BN_CTX *ctx"
86.Fc
87.Ft int
88.Fo BN_BLINDING_convert
89.Fa "BIGNUM *n"
90.Fa "BN_BLINDING *b"
91.Fa "BN_CTX *ctx"
92.Fc
93.Ft int
94.Fo BN_BLINDING_invert
95.Fa "BIGNUM *n"
96.Fa "BN_BLINDING *b"
97.Fa "BN_CTX *ctx"
98.Fc
99.Ft int
100.Fo BN_BLINDING_convert_ex
101.Fa "BIGNUM *n"
102.Fa "BIGNUM *r"
103.Fa "BN_BLINDING *b"
104.Fa "BN_CTX *ctx"
105.Fc
106.Ft int
107.Fo BN_BLINDING_invert_ex
108.Fa "BIGNUM *n"
109.Fa "const BIGNUM *r"
110.Fa "BN_BLINDING *b"
111.Fa "BN_CTX *ctx"
112.Fc
113.Fd #ifndef OPENSSL_NO_DEPRECATED
114.Ft unsigned long
115.Fo BN_BLINDING_get_thread_id
116.Fa "const BN_BLINDING *"
117.Fc
118.Ft void
119.Fo BN_BLINDING_set_thread_id
120.Fa "BN_BLINDING *"
121.Fa "unsigned long"
122.Fc
123.Fd #endif
124.Ft CRYPTO_THREADID *
125.Fo BN_BLINDING_thread_id
126.Fa "BN_BLINDING *"
127.Fc
128.Ft unsigned long
129.Fo BN_BLINDING_get_flags
130.Fa "const BN_BLINDING *"
131.Fc
132.Ft void
133.Fo BN_BLINDING_set_flags
134.Fa "BN_BLINDING *"
135.Fa "unsigned long"
136.Fc
137.Ft BN_BLINDING *
138.Fo BN_BLINDING_create_param
139.Fa "BN_BLINDING *b"
140.Fa "const BIGNUM *e"
141.Fa "BIGNUM *m"
142.Fa "BN_CTX *ctx"
143.Fa "int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,\
144 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)"
145.Fa "BN_MONT_CTX *m_ctx"
146.Fc
147.Sh DESCRIPTION
148.Fn BN_BLINDING_new
149allocates a new
150.Vt BN_BLINDING
151structure and copies the
152.Fa A
153and
154.Fa \&Ai
155values into the newly created
156.Vt BN_BLINDING
157object.
158.Pp
159.Fn BN_BLINDING_free
160frees the
161.Vt BN_BLINDING
162structure.
163If
164.Fa b
165is a
166.Dv NULL
167pointer, no action occurs.
168.Pp
169.Fn BN_BLINDING_update
170updates the
171.Vt BN_BLINDING
172parameters by squaring the
173.Fa A
174and
175.Fa \&Ai
176or, after a specific number of uses and if the necessary parameters are
177set, by re-creating the blinding parameters.
178.Pp
179.Fn BN_BLINDING_convert_ex
180multiplies
181.Fa n
182with the blinding factor
183.Fa A .
184If
185.Fa r
186is not
187.Dv NULL ,
188a copy of the inverse blinding factor
189.Fa \&Ai
190will be returned in
191.Fa r
192(this is useful if an
193.Vt RSA
194object is shared among several threads).
195.Fn BN_BLINDING_invert_ex
196multiplies
197.Fa n
198with the inverse blinding factor
199.Fa \&Ai .
200If
201.Fa r
202is not
203.Dv NULL ,
204it will be used as the inverse blinding.
205.Pp
206.Fn BN_BLINDING_convert
207and
208.Fn BN_BLINDING_invert
209are wrapper functions for
210.Fn BN_BLINDING_convert_ex
211and
212.Fn BN_BLINDING_invert_ex
213with
214.Fa r
215set to
216.Dv NULL .
217.Pp
218.Fn BN_BLINDING_thread_id
219provides access to the
220.Vt CRYPTO_THREADID
221object within the
222.Vt BN_BLINDING
223structure.
224This is to help users provide proper locking if needed for
225multi-threaded use.
226The thread ID object of a newly allocated
227.Vt BN_BLINDING
228structure is initialised to the thread ID in which
229.Fn BN_BLINDING_new
230was called.
231.Pp
232.Fn BN_BLINDING_get_flags
233returns the
234.Dv BN_BLINDING_*
235flags.
236Currently there are two supported flags:
237.Dv BN_BLINDING_NO_UPDATE
238and
239.Dv BN_BLINDING_NO_RECREATE .
240.Dv BN_BLINDING_NO_UPDATE
241inhibits the automatic update of the
242.Vt BN_BLINDING
243parameters after each use and
244.Dv BN_BLINDING_NO_RECREATE
245inhibits the automatic re-creation of the
246.Vt BN_BLINDING
247parameters after a fixed number of uses (currently 32).
248In newly allocated
249.Vt BN_BLINDING
250objects no flags are set.
251.Fn BN_BLINDING_set_flags
252sets the
253.Dv BN_BLINDING_*
254parameters flags.
255.Pp
256.Fn BN_BLINDING_create_param
257creates new
258.Vt BN_BLINDING
259parameters using the exponent
260.Fa e
261and the modulus
262.Fa m .
263.Fa bn_mod_exp
264and
265.Fa m_ctx
266can be used to pass special functions for exponentiation (normally
267.Xr BN_mod_exp 3
268and
269.Vt BN_MONT_CTX ) .
270.Sh RETURN VALUES
271.Fn BN_BLINDING_new
272returns the newly allocated
273.Vt BN_BLINDING
274structure or
275.Dv NULL
276in case of an error.
277.Pp
278.Fn BN_BLINDING_update ,
279.Fn BN_BLINDING_convert ,
280.Fn BN_BLINDING_invert ,
281.Fn BN_BLINDING_convert_ex
282and
283.Fn BN_BLINDING_invert_ex
284return 1 on success and 0 if an error occurred.
285.Pp
286.Fn BN_BLINDING_thread_id
287returns a pointer to the thread ID object within a
288.Vt BN_BLINDING
289object.
290.Pp
291.Fn BN_BLINDING_get_flags
292returns the currently set
293.Dv BN_BLINDING_*
294flags (an
295.Vt unsigned long
296value).
297.Pp
298.Fn BN_BLINDING_create_param
299returns the newly created
300.Vt BN_BLINDING
301parameters or
302.Dv NULL
303on error.
304.Sh SEE ALSO
305.Xr BN_new 3 ,
306.Xr RSA_blinding_on 3
307.Sh HISTORY
308.Fn BN_BLINDING_new ,
309.Fn BN_BLINDING_free ,
310.Fn BN_BLINDING_update ,
311.Fn BN_BLINDING_convert ,
312and
313.Fn BN_BLINDING_invert
314first appeared in SSLeay 0.9.0 and have been available since
315.Ox 2.4 .
316.Pp
317.Fn BN_BLINDING_convert_ex ,
318.Fn BN_BLINDIND_invert_ex ,
319.Fn BN_BLINDING_get_thread_id ,
320.Fn BN_BLINDING_set_thread_id ,
321.Fn BN_BLINDING_get_flags ,
322.Fn BN_BLINDING_set_flags ,
323and
324.Fn BN_BLINDING_create_param
325first appeared in OpenSSL 0.9.8 and have been available since
326.Ox 4.5 .
327.Pp
328.Fn BN_BLINDING_thread_id
329first appeared in OpenSSL 1.0.0 and has been available since
330.Ox 4.9 .
331.Sh AUTHORS
332.An Nils Larsch Aq Mt nils@openssl.org