Update KDF documentation
[openssl.git] / doc / man3 / EVP_PKEY_CTX_set1_pbe_pass.pod
1 =pod
2
3 =head1 NAME
4
5 EVP_PKEY_CTX_set1_pbe_pass
6 - generic KDF support functions
7
8 =head1 SYNOPSIS
9
10  #include <openssl/kdf.h>
11
12  int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *pctx, unsigned char *pass,
13                                 int passlen);
14
15 =head1 DESCRIPTION
16
17 These functions are generic support functions for all KDF algorithms.
18
19 EVP_PKEY_CTX_set1_pbe_pass() sets the password to the B<passlen> first
20 bytes from B<pass>.
21
22 =begin comment
23
24 We really should have a few more, such as EVP_PKEY_CTX_set1_kdf_salt,
25 EVP_PKEY_CTX_set1_kdf_key (to be used by the algorithms that use a
26 key, such as hkdf), EVP_PKEY_CTX_set1_kdf_md (same thing here).
27
28 =end comment
29
30 =head1 STRING CTRLS
31
32 There is also support for string based control operations via
33 L<EVP_PKEY_CTX_ctrl_str(3)>.
34 The B<password> can be directly specified using the B<type> parameter
35 "pass" or given in hex encoding using the "hexpass" parameter.
36
37 =begin comment
38
39 Just as for the function description, the strings "salt", "hexsalt",
40 "key", "hexkey" and "md" should be generically specified, and
41 supported by the algorithms that use them.
42
43 =end comment
44
45 =head1 RETURN VALUES
46
47 All these functions return 1 for success and 0 or a negative value for failure.
48 In particular a return value of -2 indicates the operation is not supported by
49 the public key algorithm.
50
51 =head1 SEE ALSO
52
53 L<EVP_PKEY_CTX_new(3)>,
54 L<EVP_PKEY_CTX_ctrl_str(3)>,
55 L<EVP_PKEY_derive(3)>
56
57 =head1 HISTORY
58
59 EVP_PKEY_CTX_set1_pbe_pass() was converted from a macro to a function in
60 OpenSSL 3.0.
61
62 =head1 COPYRIGHT
63
64 Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
65
66 Licensed under the Apache License 2.0 (the "License").  You may not use
67 this file except in compliance with the License.  You can obtain a copy
68 in the file LICENSE in the source distribution or at
69 L<https://www.openssl.org/source/license.html>.
70
71 =cut