One-Step KDF. More...
Go to the source code of this file.
Macros | |
| #define | TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Functions | |
| error_t | oneStepKdf (OneStepKdfType type, const HashAlgo *hashAlgo, const uint8_t *z, size_t zLen, const uint8_t *salt, size_t saltLen, const uint8_t *otherInfo, size_t otherInfoLen, uint8_t *dk, size_t dkLen) |
| One-Step KDF function. More... | |
| error_t | oneStepKdfHash (const HashAlgo *hashAlgo, const uint8_t *z, size_t zLen, const uint8_t *otherInfo, size_t otherInfoLen, uint8_t *dk, size_t dkLen) |
| One-Step KDF function (with hash-based auxiliary function) More... | |
| error_t | oneStepKdfHmac (const HashAlgo *hashAlgo, const uint8_t *z, size_t zLen, const uint8_t *salt, size_t saltLen, const uint8_t *otherInfo, size_t otherInfoLen, uint8_t *dk, size_t dkLen) |
| One-Step KDF function (with HMAC-based auxiliary function) More... | |
| error_t | oneStepKdfKmac (uint_t strength, size_t hLen, const uint8_t *z, size_t zLen, const uint8_t *salt, size_t saltLen, const uint8_t *otherInfo, size_t otherInfoLen, uint8_t *dk, size_t dkLen) |
| One-Step KDF function (with KMAC-based auxiliary function) More... | |
Detailed Description
One-Step KDF.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2026 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneCRYPTO Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Description
One-Step KDF is a key derivation function defined by NIST SP 800-56C revision 1, section 4
- Version
- 2.6.6
Definition in file one_step_kdf.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL CRYPTO_TRACE_LEVEL |
Definition at line 37 of file one_step_kdf.c.
Function Documentation
◆ oneStepKdf()
| error_t oneStepKdf | ( | OneStepKdfType | type, |
| const HashAlgo * | hashAlgo, | ||
| const uint8_t * | z, | ||
| size_t | zLen, | ||
| const uint8_t * | salt, | ||
| size_t | saltLen, | ||
| const uint8_t * | otherInfo, | ||
| size_t | otherInfoLen, | ||
| uint8_t * | dk, | ||
| size_t | dkLen | ||
| ) |
One-Step KDF function.
- Parameters
-
[in] type Auxiliary function H (hash, HMAC or KMAC) [in] hashAlgo Underlying hash function (for hash and HMAC-based auxiliary functions only) [in] z Shared secret Z [in] zLen Length of the shared secret Z, in bytes [in] salt Salt value (for HMAC and KMAC-based auxiliary functions only) [in] saltLen Length of the salt value, in bytes [in] otherInfo Context-specific information (optional parameter) [in] otherInfoLen Length of the context-specific information, in bytes [out] dk Derived keying material [in] dkLen Length of the keying material to be generated, in bytes
- Returns
- Error code
Definition at line 80 of file one_step_kdf.c.
◆ oneStepKdfHash()
| error_t oneStepKdfHash | ( | const HashAlgo * | hashAlgo, |
| const uint8_t * | z, | ||
| size_t | zLen, | ||
| const uint8_t * | otherInfo, | ||
| size_t | otherInfoLen, | ||
| uint8_t * | dk, | ||
| size_t | dkLen | ||
| ) |
One-Step KDF function (with hash-based auxiliary function)
- Parameters
-
[in] hashAlgo Underlying hash function [in] z Shared secret Z [in] zLen Length of the shared secret Z, in bytes [in] otherInfo Context-specific information (optional parameter) [in] otherInfoLen Length of the context-specific information, in bytes [out] dk Derived keying material [in] dkLen Length of the keying material to be generated, in bytes
- Returns
- Error code
Definition at line 131 of file one_step_kdf.c.
◆ oneStepKdfHmac()
| error_t oneStepKdfHmac | ( | const HashAlgo * | hashAlgo, |
| const uint8_t * | z, | ||
| size_t | zLen, | ||
| const uint8_t * | salt, | ||
| size_t | saltLen, | ||
| const uint8_t * | otherInfo, | ||
| size_t | otherInfoLen, | ||
| uint8_t * | dk, | ||
| size_t | dkLen | ||
| ) |
One-Step KDF function (with HMAC-based auxiliary function)
- Parameters
-
[in] hashAlgo Underlying hash function [in] z Shared secret Z [in] zLen Length of the shared secret Z, in bytes [in] salt Salt value [in] saltLen Length of the salt, in bytes [in] otherInfo Context-specific information (optional parameter) [in] otherInfoLen Length of the context-specific information, in bytes [out] dk Derived keying material [in] dkLen Length of the keying material to be generated, in bytes
- Returns
- Error code
Definition at line 212 of file one_step_kdf.c.
◆ oneStepKdfKmac()
| error_t oneStepKdfKmac | ( | uint_t | strength, |
| size_t | hLen, | ||
| const uint8_t * | z, | ||
| size_t | zLen, | ||
| const uint8_t * | salt, | ||
| size_t | saltLen, | ||
| const uint8_t * | otherInfo, | ||
| size_t | otherInfoLen, | ||
| uint8_t * | dk, | ||
| size_t | dkLen | ||
| ) |
One-Step KDF function (with KMAC-based auxiliary function)
- Parameters
-
[in] strength Number of bits of security (128 for KMAC128 and 256 for KMAC256) [in] hLen Length of of the auxiliary function output, in bytes [in] z Shared secret Z [in] zLen Length of the shared secret Z, in bytes [in] salt Salt value [in] saltLen Length of the salt, in bytes [in] otherInfo Context-specific information (optional parameter) [in] otherInfoLen Length of the context-specific information, in bytes [out] dk Derived keying material [in] dkLen Length of the keying material to be generated, in bytes
- Returns
- Error code
Definition at line 314 of file one_step_kdf.c.
