Add X9.42 KDF.
[openssl.git] / doc / man3 / SRP_user_pwd_new.pod
1 =pod
2
3 =head1 NAME
4
5 SRP_user_pwd_new,
6 SRP_user_pwd_free,
7 SRP_user_pwd_set1_ids,
8 SRP_user_pwd_set_gN,
9 SRP_user_pwd_set0_sv
10 - Functions to create a record of SRP user verifier information
11
12 =head1 SYNOPSIS
13
14  #include <openssl/srp.h>
15
16  SRP_user_pwd *SRP_user_pwd_new(void);
17  void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
18
19  int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id, const char *info);
20  void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g, const BIGNUM *N);
21  int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
22
23 =head1 DESCRIPTION
24
25 The SRP_user_pwd_new() function allocates a structure to store a user verifier
26 record.
27
28 The SRP_user_pwd_free() function frees up the B<user_pwd> structure.
29 If B<user_pwd> is NULL, nothing is done.
30
31 The SRP_user_pwd_set1_ids() function sets the username to B<id> and the optional
32 user info to B<info> for B<user_pwd>.
33 The library allocates new copies of B<id> and B<info>, the caller still
34 owns the original memory.
35
36 The SRP_user_pwd_set0_sv() function sets the user salt to B<s> and the verifier
37 to B<v> for B<user_pwd>.
38 The library takes ownership of the values, they should not be freed by the caller.
39
40 The SRP_user_pwd_set_gN() function sets the SRP group parameters for B<user_pwd>.
41 The memory is not freed by SRP_user_pwd_free(), the caller must make sure it is
42 freed once it is no longer used.
43
44 =head1 RETURN VALUES
45
46 SRP_user_pwd_set1_ids() returns 1 on success and 0 on failure or if B<id> was NULL.
47
48 SRP_user_pwd_set0_sv() returns 1 if both B<s> and B<v> are not NULL, 0 otherwise.
49
50 =head1 SEE ALSO
51
52 L<srp(1)>,
53 L<SRP_create_verifier(3)>,
54 L<SRP_VBASE_new(3)>,
55 L<SSL_CTX_set_srp_password(3)>
56
57 =head1 HISTORY
58
59 These functions were made public in OpenSSL 3.0.0.
60
61 =head1 COPYRIGHT
62
63 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
64
65 Licensed under the Apache License 2.0 (the "License").  You may not use
66 this file except in compliance with the License.  You can obtain a copy
67 in the file LICENSE in the source distribution or at
68 L<https://www.openssl.org/source/license.html>.
69
70 =cut