xref: /freebsd/crypto/openssl/doc/man3/SRP_Calc_B.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1*b077aed3SPierre Pronchery=pod
2*b077aed3SPierre Pronchery
3*b077aed3SPierre Pronchery=head1 NAME
4*b077aed3SPierre Pronchery
5*b077aed3SPierre ProncherySRP_Calc_server_key,
6*b077aed3SPierre ProncherySRP_Calc_A,
7*b077aed3SPierre ProncherySRP_Calc_B_ex,
8*b077aed3SPierre ProncherySRP_Calc_B,
9*b077aed3SPierre ProncherySRP_Calc_u_ex,
10*b077aed3SPierre ProncherySRP_Calc_u,
11*b077aed3SPierre ProncherySRP_Calc_x_ex,
12*b077aed3SPierre ProncherySRP_Calc_x,
13*b077aed3SPierre ProncherySRP_Calc_client_key_ex,
14*b077aed3SPierre ProncherySRP_Calc_client_key
15*b077aed3SPierre Pronchery- SRP authentication primitives
16*b077aed3SPierre Pronchery
17*b077aed3SPierre Pronchery=head1 SYNOPSIS
18*b077aed3SPierre Pronchery
19*b077aed3SPierre Pronchery #include <openssl/srp.h>
20*b077aed3SPierre Pronchery
21*b077aed3SPierre ProncheryThe following functions have been deprecated since OpenSSL 3.0, and can be
22*b077aed3SPierre Proncheryhidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
23*b077aed3SPierre Proncherysee L<openssl_user_macros(7)>:
24*b077aed3SPierre Pronchery
25*b077aed3SPierre Pronchery /* server side .... */
26*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
27*b077aed3SPierre Pronchery                             const BIGNUM *b, const BIGNUM *N);
28*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
29*b077aed3SPierre Pronchery                       const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
30*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
31*b077aed3SPierre Pronchery                   const BIGNUM *v);
32*b077aed3SPierre Pronchery
33*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
34*b077aed3SPierre Pronchery                       OSSL_LIB_CTX *libctx, const char *propq);
35*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
36*b077aed3SPierre Pronchery
37*b077aed3SPierre Pronchery /* client side .... */
38*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
39*b077aed3SPierre Pronchery                             const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
40*b077aed3SPierre Pronchery                             OSSL_LIB_CTX *libctx, const char *propq);
41*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
42*b077aed3SPierre Pronchery                             const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
43*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
44*b077aed3SPierre Pronchery                       OSSL_LIB_CTX *libctx, const char *propq);
45*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
46*b077aed3SPierre Pronchery BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);
47*b077aed3SPierre Pronchery
48*b077aed3SPierre Pronchery=head1 DESCRIPTION
49*b077aed3SPierre Pronchery
50*b077aed3SPierre ProncheryAll of the functions described on this page are deprecated. There are no
51*b077aed3SPierre Proncheryavailable replacement functions at this time.
52*b077aed3SPierre Pronchery
53*b077aed3SPierre ProncheryThe SRP functions described on this page are used to calculate various
54*b077aed3SPierre Proncheryparameters and keys used by SRP as defined in RFC2945. The server key and I<B>
55*b077aed3SPierre Proncheryand I<u> parameters are used on the server side and are calculated via
56*b077aed3SPierre ProncherySRP_Calc_server_key(), SRP_Calc_B_ex(), SRP_Calc_B(), SRP_Calc_u_ex() and
57*b077aed3SPierre ProncherySRP_Calc_u(). The client key and B<x> and B<A> parameters are used on the
58*b077aed3SPierre Proncheryclient side and are calculated via the functions SRP_Calc_client_key_ex(),
59*b077aed3SPierre ProncherySRP_Calc_client_key(), SRP_Calc_x_ex(), SRP_Calc_x() and SRP_Calc_A(). See
60*b077aed3SPierre ProncheryRFC2945 for a detailed description of their usage and the meaning of the various
61*b077aed3SPierre ProncheryBIGNUM parameters to these functions.
62*b077aed3SPierre Pronchery
63*b077aed3SPierre ProncheryMost of these functions come in two forms. Those that take a I<libctx> and
64*b077aed3SPierre ProncheryI<propq> parameter, and those that don't. Any cryptogrpahic functions that
65*b077aed3SPierre Proncheryare fetched and used during the calculation use the provided I<libctx> and
66*b077aed3SPierre ProncheryI<propq>. See L<crypto(7)/ALGORITHM FETCHING> for more details. The variants
67*b077aed3SPierre Proncherythat do not take a I<libctx> and I<propq> parameter use the default library
68*b077aed3SPierre Proncherycontext and property query string. The SRP_Calc_server_key() and SRP_Calc_A()
69*b077aed3SPierre Proncheryfunctions do not have a form that takes I<libctx> or I<propq> parameters because
70*b077aed3SPierre Proncherythey do not need to fetch any cryptographic algorithms.
71*b077aed3SPierre Pronchery
72*b077aed3SPierre Pronchery=head1 RETURN VALUES
73*b077aed3SPierre Pronchery
74*b077aed3SPierre ProncheryAll these functions return the calculated key or parameter, or NULL on error.
75*b077aed3SPierre Pronchery
76*b077aed3SPierre Pronchery=head1 SEE ALSO
77*b077aed3SPierre Pronchery
78*b077aed3SPierre ProncheryL<openssl-srp(1)>,
79*b077aed3SPierre ProncheryL<SRP_VBASE_new(3)>,
80*b077aed3SPierre ProncheryL<SRP_user_pwd_new(3)>
81*b077aed3SPierre Pronchery
82*b077aed3SPierre Pronchery=head1 HISTORY
83*b077aed3SPierre Pronchery
84*b077aed3SPierre ProncherySRP_Calc_B_ex, SRP_Calc_u_ex, SRP_Calc_client_key_ex and SRP_Calc_x_ex were
85*b077aed3SPierre Proncheryintroduced in OpenSSL 3.0.
86*b077aed3SPierre Pronchery
87*b077aed3SPierre ProncheryAll of the other functions were added in OpenSSL 1.0.1.
88*b077aed3SPierre Pronchery
89*b077aed3SPierre ProncheryAll of these functions were deprecated in OpenSSL 3.0.
90*b077aed3SPierre Pronchery
91*b077aed3SPierre Pronchery=head1 COPYRIGHT
92*b077aed3SPierre Pronchery
93*b077aed3SPierre ProncheryCopyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
94*b077aed3SPierre Pronchery
95*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
96*b077aed3SPierre Proncherythis file except in compliance with the License.  You can obtain a copy
97*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at
98*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>.
99*b077aed3SPierre Pronchery
100*b077aed3SPierre Pronchery=cut
101