1EVP_PKEY_CTX_SET_SCRYPT_N(3)        OpenSSL       EVP_PKEY_CTX_SET_SCRYPT_N(3)
2
3
4

NAME

6       EVP_PKEY_CTX_set1_scrypt_salt, EVP_PKEY_CTX_set_scrypt_N,
7       EVP_PKEY_CTX_set_scrypt_r, EVP_PKEY_CTX_set_scrypt_p,
8       EVP_PKEY_CTX_set_scrypt_maxmem_bytes - EVP_PKEY scrypt KDF support
9       functions
10

SYNOPSIS

12        #include <openssl/kdf.h>
13
14        int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *pctx, unsigned char *salt,
15                                          int saltlen);
16
17        int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *pctx, uint64_t N);
18
19        int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *pctx, uint64_t r);
20
21        int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *pctx, uint64_t p);
22
23        int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *pctx,
24                                                 uint64_t maxmem);
25

DESCRIPTION

27       These functions are used to set up the necessary data to use the scrypt
28       KDF.  For more information on scrypt, see scrypt(7).
29
30       EVP_PKEY_CTX_set1_scrypt_salt() sets the saltlen bytes long salt value.
31
32       EVP_PKEY_CTX_set_scrypt_N(), EVP_PKEY_CTX_set_scrypt_r() and
33       EVP_PKEY_CTX_set_scrypt_p() configure the work factors N, r and p.
34
35       EVP_PKEY_CTX_set_scrypt_maxmem_bytes() sets how much RAM key derivation
36       may maximally use, given in bytes.  If RAM is exceeded because the load
37       factors are chosen too high, the key derivation will fail.
38

STRING CTRLS

40       scrypt also supports string based control operations via
41       EVP_PKEY_CTX_ctrl_str(3).  Similarly, the salt can either be specified
42       using the type parameter "salt" or in hex encoding by using the
43       "hexsalt" parameter.  The work factors N, r and p as well as
44       maxmem_bytes can be set by using the parameters "N", "r", "p" and
45       "maxmem_bytes", respectively.
46

NOTES

48       The scrypt KDF also uses EVP_PKEY_CTX_set1_pbe_pass() as well as the
49       value from the string controls "pass" and "hexpass".  See
50       EVP_PKEY_CTX_set1_pbe_pass(3).
51
52       All the functions described here are implemented as macros.
53

RETURN VALUES

55       All these functions return 1 for success and 0 or a negative value for
56       failure.  In particular a return value of -2 indicates the operation is
57       not supported by the public key algorithm.
58

SEE ALSO

60       scrypt(7), EVP_PKEY_CTX_new(3), EVP_PKEY_CTX_ctrl_str(3),
61       EVP_PKEY_derive(3)
62
64       Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
65
66       Licensed under the OpenSSL license (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       <https://www.openssl.org/source/license.html>.
70
71
72
731.1.1d                            2019-10-03      EVP_PKEY_CTX_SET_SCRYPT_N(3)
Impressum