]>
Commit | Line | Data |
---|---|---|
a8ca496d RL |
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 NOTES | |
46 | ||
47 | All these functions are implemented as macros. | |
48 | ||
49 | =head1 RETURN VALUES | |
50 | ||
51 | All these functions return 1 for success and 0 or a negative value for failure. | |
52 | In particular a return value of -2 indicates the operation is not supported by | |
53 | the public key algorithm. | |
54 | ||
55 | =head1 SEE ALSO | |
56 | ||
57 | L<EVP_PKEY_CTX_new(3)>, | |
58 | L<EVP_PKEY_CTX_ctrl_str(3)>, | |
59 | L<EVP_PKEY_derive(3)> | |
60 | ||
61 | =head1 COPYRIGHT | |
62 | ||
63 | Copyright 2018 The OpenSSL Project Authors. All Rights Reserved. | |
64 | ||
4746f25a | 65 | Licensed under the Apache License 2.0 (the "License"). You may not use |
a8ca496d RL |
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 |