EVP_KDF_CTX - Online Linux Manual PageSection : 3
Updated : 2021-03-26
Source : 1.1.1k
Note : OpenSSL
NAMEEVP_KDF_CTX, EVP_KDF_CTX_new_id, EVP_KDF_CTX_free, EVP_KDF_reset, EVP_KDF_ctrl, EVP_KDF_vctrl, EVP_KDF_ctrl_str, EVP_KDF_size, EVP_KDF_derive − EVP KDF routines
SYNOPSIS #include <openssl/kdf.h>
typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
EVP_KDF_CTX *EVP_KDF_CTX_new_id(int id);
void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx);
void EVP_KDF_reset(EVP_KDF_CTX *ctx);
int EVP_KDF_ctrl(EVP_KDF_CTX *ctx, int cmd, ...);
int EVP_KDF_vctrl(EVP_KDF_CTX *ctx, int cmd, va_list args);
int EVP_KDF_ctrl_str(EVP_KDF_CTX *ctx, const char *type, const char *value);
size_t EVP_KDF_size(EVP_KDF_CTX *ctx);
int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen);
DESCRIPTIONThe EVP KDF routines are a high level interface to Key Derivation Function algorithms and should be used instead of algorithm-specific functions. After creating a EVP_KDF_CTX for the required algorithm using EVP_KDF_CTX_new_id(), inputs to the algorithm are supplied using calls to EVP_KDF_ctrl(), EVP_KDF_vctrl() or EVP_KDF_ctrl_str() before calling EVP_KDF_derive() to derive the key.
TypesEVP_KDF_CTX is a context type that holds the algorithm inputs.
Context manipulation functionsEVP_KDF_CTX_new_id() creates a KDF context for the algorithm identified by the specified NID. EVP_KDF_CTX_free() frees up the context ctx. If ctx is NULL, nothing is done.
Computing functionsEVP_KDF_reset() resets the context to the default state as if the context had just been created. EVP_KDF_ctrl() is used to provide inputs to the KDF algorithm prior to EVP_KDF_derive() being called. The inputs that may be provided will vary depending on the KDF algorithm or its implementation. This functions takes variable arguments, the exact expected arguments depend on cmd. See ‟CONTROLS” below for a description of standard controls. EVP_KDF_vctrl() is the variant of EVP_KDF_ctrl() that takes a va_list argument instead of variadic arguments. EVP_KDF_ctrl_str() allows an application to send an algorithm specific control operation to a context ctx in string form. This is intended to be used for options specified on the command line or in text files. EVP_KDF_size() returns the output size if the algorithm produces a fixed amount of output and SIZE_MAX otherwise. If an error occurs then 0 is returned. For some algorithms an error may result if input parameters necessary to calculate a fixed output size have not yet been supplied. EVP_KDF_derive() derives keylen bytes of key material and places it in the key buffer. If the algorithm produces a fixed amount of output then an error will occur unless the keylen parameter is equal to that output size, as returned by EVP_KDF_size().
CONTROLSThe standard controls are: EVP_KDF_CTRL_SET_PASS This control expects two arguments: unsigned char *pass, size_t passlen Some KDF implementations require a password. For those KDF implementations that support it, this control sets the password. EVP_KDF_ctrl_str() takes two type strings for this control: ``pass'' The value string is used as is. ``hexpass'' The value string is expected to be a hexadecimal number, which will be decoded before being passed on as the control value. EVP_KDF_CTRL_SET_SALT This control expects two arguments: unsigned char *salt, size_t saltlen Some KDF implementations can take a salt. For those KDF implementations that support it, this control sets the salt. The default value, if any, is implementation dependent. EVP_KDF_ctrl_str() takes two type strings for this control: ``salt'' The value string is used as is. ``hexsalt'' The value string is expected to be a hexadecimal number, which will be decoded before being passed on as the control value. EVP_KDF_CTRL_SET_ITER This control expects one argument: int iter Some KDF implementations require an iteration count. For those KDF implementations that support it, this control sets the iteration count. The default value, if any, is implementation dependent. EVP_KDF_ctrl_str() type string: ‟iter” The value string is expected to be a decimal number. EVP_KDF_CTRL_SET_MD This control expects one argument: EVP_MD *md For MAC implementations that use a message digest as an underlying computation algorithm, this control sets what the digest algorithm should be. EVP_KDF_CTRL_SET_CIPHER This control expects one argument: EVP_CIPHER *cipher For MAC implementations that use a cipher as an underlying computation algorithm, this control sets what the cipher algorithm should be. EVP_KDF_ctrl_str() type string: ‟md” The value string is expected to be the name of a digest. EVP_KDF_CTRL_SET_KEY This control expects two arguments: unsigned char *key, size_t keylen Some KDF implementations require a key. For those KDF implementations that support it, this control sets the key. EVP_KDF_ctrl_str() takes two type strings for this control: ``key'' The value string is used as is. ``hexkey'' The value string is expected to be a hexadecimal number, which will be decoded before being passed on as the control value. EVP_KDF_CTRL_SET_MAXMEM_BYTES This control expects one argument: uint64_t maxmem_bytes Memory-hard password-based KDF algorithms, such as scrypt, use an amount of memory that depends on the load factors provided as input. For those KDF implementations that support it, this control sets an upper limit on the amount of memory that may be consumed while performing a key derivation. If this memory usage limit is exceeded because the load factors are chosen too high, the key derivation will fail. The default value is implementation dependent. EVP_KDF_ctrl_str() type string: ‟maxmem_bytes” The value string is expected to be a decimal number.
RETURN VALUESEVP_KDF_CTX_new_id() returns either the newly allocated EVP_KDF_CTX structure or NULL if an error occurred. EVP_KDF_CTX_free() and EVP_KDF_reset() do not return a value. EVP_KDF_size() returns the output size. SIZE_MAX is returned to indicate that the algorithm produces a variable amount of output; 0 to indicate failure. The remaining functions return 1 for success and 0 or a negative value for failure. In particular, a return value of −2 indicates the operation is not supported by the KDF algorithm.
SEE ALSOEVP_KDF_SCRYPT (7)
COPYRIGHTCopyright 2018 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the ‟License”). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>. 0
Johanes Gumabo
Data Size : 24,491 byte
man-EVP_KDF_vctrl.3sslBuild : 2024-12-05, 20:55 :
Visitor Screen : x
Visitor Counter ( page / site ) : 5 / 169,940
Visitor ID : :
Visitor IP : 3.14.131.115 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.05
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.
ERROR : Need New Coding : (parse_manual_page_|249|E___VP_KDF_ctrl.3ssl|36/37|el══─{─══.|.el══─{─══. ds -- \|\(em\|
) (htmlprn|149|E___VP_KDF_ctrl.3ssl|36/37|.el══─{─══. ds -- — |.el══─{─══. ds -- \|\(em\|
) (parse_manual_page_|249|E___VP_KDF_ctrl.3ssl|43|br══─}─══|'br══─}─══
) (htmlprn|149|E___VP_KDF_ctrl.3ssl|43|'br══─}─══ |'br══─}─══
)