EVP_KDF-SS - Online Linux Manual PageSection : 7ossl
Updated : 2023-03-21
Source : 3.0.8
Note : OpenSSL
NAMEEVP_KDF−SS − The Single Step / One Step EVP_KDF implementation

DESCRIPTIONThe EVP_KDF−SS algorithm implements the Single Step key derivation function (SSKDF). SSKDF derives a key using input such as a shared secret key (that was generated during the execution of a key establishment scheme) and fixedinfo. SSKDF is also informally referred to as 'Concat KDF'.

Auxiliary functionThe implementation uses a selectable auxiliary function H, which can be one of: H(x) = hash(x, digest=md) H(x) = HMAC_hash(x, key=salt, digest=md) 
.IP "H(x) = KMACxxx(x, key=salt, custom=""KDF"", outlen=mac_size)" 4
Both the HMAC and KMAC implementations set the key using the 'salt' value. The hash and HMAC also require the digest to be set.

Identity"SSKDF" is the name for this implementation; it can be used with the EVP_KDF_fetch() function.

Supported parametersThe supported parameters are: .IP """properties"" (OSSL_KDF_PARAM_PROPERTIES) <UTF8 string>" 4 .IP """digest"" (OSSL_KDF_PARAM_DIGEST) <UTF8 string>" 4 This parameter is ignored for KMAC. .IP """mac"" (OSSL_KDF_PARAM_MAC) <UTF8 string>" 4 .IP """maclen"" (OSSL_KDF_PARAM_MAC_SIZE) <unsigned integer>" 4 .IP """salt"" (OSSL_KDF_PARAM_SALT) <octet string>" 4 These parameters work as described in "PARAMETERS" in EVP_KDF(3). .IP """key"" (EVP_KDF_CTRL_SET_KEY) <octet string>" 4 This parameter set the shared secret that is used for key derivation. .IP """info"" (OSSL_KDF_PARAM_INFO) <octet string>" 4 This parameter sets an optional value for fixedinfo, also known as otherinfo.

NOTESA context for SSKDF can be obtained by calling: ​ EVP_KDF *kdf = EVP_KDF_fetch(NULL, "SSKDF", NULL); ​ EVP_KDF_CTX *kctx = EVP_KDF_CTX_new(kdf); The output length of an SSKDF is specified via the keylen parameter to the EVP_KDF_derive(3) function.

EXAMPLESThis example derives 10 bytes using H(x) = SHA−256, with the secret key "secret" and fixedinfo value "label": ​ EVP_KDF *kdf; ​ EVP_KDF_CTX *kctx; ​ unsigned char out[10]; ​ OSSL_PARAM params[4], *p = params; ​ ​ kdf = EVP_KDF_fetch(NULL, "SSKDF", NULL); ​ kctx = EVP_KDF_CTX_new(kdf); ​ EVP_KDF_free(kdf); ​ ​ *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST, ​ SN_sha256, strlen(SN_sha256)); ​ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_KEY, ​ "secret", (size_t)6); ​ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, ​ "label", (size_t)5); ​ *p = OSSL_PARAM_construct_end(); ​ if (EVP_KDF_derive(kctx, out, sizeof(out), params) <= 0) { ​ error("EVP_KDF_derive"); ​ } ​ ​ EVP_KDF_CTX_free(kctx); This example derives 10 bytes using H(x) = HMAC(SHA−256), with the secret key "secret", fixedinfo value "label" and salt "salt": ​ EVP_KDF *kdf; ​ EVP_KDF_CTX *kctx; ​ unsigned char out[10]; ​ OSSL_PARAM params[6], *p = params; ​ ​ kdf = EVP_KDF_fetch(NULL, "SSKDF", NULL); ​ kctx = EVP_KDF_CTX_new(kdf); ​ EVP_KDF_free(kdf); ​ ​ *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_MAC, ​ SN_hmac, strlen(SN_hmac)); ​ *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST, ​ SN_sha256, strlen(SN_sha256)); ​ *p++ = OSSL_PARAM_construct_octet_string(EVP_KDF_CTRL_SET_KEY, ​ "secret", (size_t)6); ​ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, ​ "label", (size_t)5); ​ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT, ​ "salt", (size_t)4); ​ *p = OSSL_PARAM_construct_end(); ​ if (EVP_KDF_derive(kctx, out, sizeof(out), params) <= 0) { ​ error("EVP_KDF_derive"); ​ } ​ ​ EVP_KDF_CTX_free(kctx); This example derives 10 bytes using H(x) = KMAC128(x,salt,outlen), with the secret key "secret" fixedinfo value "label", salt of "salt" and KMAC outlen of 20: ​ EVP_KDF *kdf; ​ EVP_KDF_CTX *kctx; ​ unsigned char out[10]; ​ OSSL_PARAM params[6], *p = params; ​ ​ kdf = EVP_KDF_fetch(NULL, "SSKDF", NULL); ​ kctx = EVP_KDF_CTX_new(kdf); ​ EVP_KDF_free(kdf); ​ ​ *p++ = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_MAC, ​ SN_kmac128, strlen(SN_kmac128)); ​ *p++ = OSSL_PARAM_construct_octet_string(EVP_KDF_CTRL_SET_KEY, ​ "secret", (size_t)6); ​ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_INFO, ​ "label", (size_t)5); ​ *p++ = OSSL_PARAM_construct_octet_string(OSSL_KDF_PARAM_SALT, ​ "salt", (size_t)4); ​ *p++ = OSSL_PARAM_construct_size_t(OSSL_KDF_PARAM_MAC_SIZE, (size_t)20); ​ *p = OSSL_PARAM_construct_end(); ​ if (EVP_KDF_derive(kctx, out, sizeof(out), params) <= 0) { ​ error("EVP_KDF_derive"); ​ } ​ ​ EVP_KDF_CTX_free(kctx);

CONFORMING TONIST SP800−56Cr1.

SEE ALSOEVP_KDF(3), ​EVP_KDF_CTX_new(3), ​EVP_KDF_CTX_free(3), ​EVP_KDF_CTX_set_params(3), ​EVP_KDF_CTX_get_kdf_size(3), ​EVP_KDF_derive(3), "PARAMETERS" in EVP_KDF(3)

HISTORYThis functionality was added in OpenSSL 3.0.

COPYRIGHTCopyright 2019−2023 The OpenSSL Project Authors. All Rights Reserved. Copyright (c) 2019, Oracle and/or its affiliates. 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>.

Johanes Gumabo
Data Size   :   20,637 byte man-EVP_KDF-SS.7osslBuild   :   2024-12-29, 07:25   :   1
Visitor Screen   :   1280 x 720
Visitor Counter ( page / site )   :   2 / 262,358
Visitor ID   :     :  
Visitor IP   :   18.117.73.51   :  
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.29
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_|252|EVP_KDF-SS.7ossl|24/25|el══─{─══.|.el══─{─══. ds C` )         (htmlprn|149|EVP_KDF-SS.7ossl|24/25|.el══─{─══. ds C` |.el══─{─══. ds C` )         (parse_manual_page_|252|EVP_KDF-SS.7ossl|27|br══─}─══|'br══─}─══ )         (htmlprn|149|EVP_KDF-SS.7ossl|27|'br══─}─══ |'br══─}─══ )         (rof_IP|5|EVP_KDF-SS.7ossl|79|5|.IP "\fBH(x) = KMACxxx(x, key=salt, custom=""KDF"", outlen=mac_size)\fR" 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|92|5|.IP """properties"" (\fBOSSL_KDF_PARAM_PROPERTIES\fR) " 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|95|5|.IP """digest"" (\fBOSSL_KDF_PARAM_DIGEST\fR) " 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|99|5|.IP """mac"" (\fBOSSL_KDF_PARAM_MAC\fR) " 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|102|5|.IP """maclen"" (\fBOSSL_KDF_PARAM_MAC_SIZE\fR) " 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|104|5|.IP """salt"" (\fBOSSL_KDF_PARAM_SALT\fR) " 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|108|5|.IP """key"" (\fBEVP_KDF_CTRL_SET_KEY\fR) " 4 )         (rof_IP|5|EVP_KDF-SS.7ossl|111|5|.IP """info"" (\fBOSSL_KDF_PARAM_INFO\fR) " 4 )