SP 800-108 key derivation function. More...
#include "core/crypto.h"Go to the source code of this file.
Functions | |
| error_t | kbkdfCounterHmac (const HashAlgo *hashAlgo, uint_t r, const uint8_t *ki, size_t kiLen, const uint8_t *fixedData, size_t fixedDataLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (counter mode with HMAC) More... | |
| error_t | kbkdfCounterCmac (const CipherAlgo *cipherAlgo, uint_t r, const uint8_t *ki, size_t kiLen, const uint8_t *fixedData, size_t fixedDataLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (counter mode with CMAC) More... | |
| error_t | kbkdfFeedbackHmac (const HashAlgo *hashAlgo, uint_t r, const uint8_t *ki, size_t kiLen, const uint8_t *iv, size_t ivLen, const uint8_t *fixedData, size_t fixedDataLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (feedback mode with HMAC) More... | |
| error_t | kbkdfFeedbackCmac (const CipherAlgo *cipherAlgo, uint_t r, const uint8_t *ki, size_t kiLen, const uint8_t *iv, size_t ivLen, const uint8_t *fixedData, size_t fixedDataLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (feedback mode with CMAC) More... | |
| error_t | kbkdfDoublePipelineHmac (const HashAlgo *hashAlgo, uint_t r, const uint8_t *ki, size_t kiLen, const uint8_t *fixedData, size_t fixedDataLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (double-pipeline mode with HMAC) More... | |
| error_t | kbkdfDoublePipelineCmac (const CipherAlgo *cipherAlgo, uint_t r, const uint8_t *ki, size_t kiLen, const uint8_t *fixedData, size_t fixedDataLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (double-pipeline mode with CMAC) More... | |
| error_t | kbkdfKmac (uint_t strength, const uint8_t *ki, size_t kiLen, const uint8_t *context, size_t contextLen, const char_t *label, size_t labelLen, uint8_t *ko, size_t koLen) |
| KBKDF key derivation function (using KMAC) More... | |
Detailed Description
SP 800-108 key derivation function.
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.
- Version
- 2.6.6
Definition in file kbkdf.h.
Function Documentation
◆ kbkdfCounterCmac()
| error_t kbkdfCounterCmac | ( | const CipherAlgo * | cipherAlgo, |
| uint_t | r, | ||
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | fixedData, | ||
| size_t | fixedDataLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (counter mode with CMAC)
- Parameters
-
[in] cipherAlgo Underlying cipher algorithm [in] r Length of the binary encoding of the counter, in bits [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] fixedData Fixed input data [in] fixedDataLen Length of the fixed input data, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
◆ kbkdfCounterHmac()
| error_t kbkdfCounterHmac | ( | const HashAlgo * | hashAlgo, |
| uint_t | r, | ||
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | fixedData, | ||
| size_t | fixedDataLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (counter mode with HMAC)
- Parameters
-
[in] hashAlgo Underlying hash function [in] r Length of the binary encoding of the counter, in bits [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] fixedData Fixed input data [in] fixedDataLen Length of the fixed input data, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
◆ kbkdfDoublePipelineCmac()
| error_t kbkdfDoublePipelineCmac | ( | const CipherAlgo * | cipherAlgo, |
| uint_t | r, | ||
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | fixedData, | ||
| size_t | fixedDataLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (double-pipeline mode with CMAC)
- Parameters
-
[in] cipherAlgo Underlying cipher algorithm [in] r Length of the binary encoding of the counter, in bits [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] fixedData Fixed input data [in] fixedDataLen Length of the fixed input data, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
◆ kbkdfDoublePipelineHmac()
| error_t kbkdfDoublePipelineHmac | ( | const HashAlgo * | hashAlgo, |
| uint_t | r, | ||
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | fixedData, | ||
| size_t | fixedDataLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (double-pipeline mode with HMAC)
- Parameters
-
[in] hashAlgo Underlying hash function [in] r Length of the binary encoding of the counter, in bits [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] fixedData Fixed input data [in] fixedDataLen Length of the fixed input data, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
◆ kbkdfFeedbackCmac()
| error_t kbkdfFeedbackCmac | ( | const CipherAlgo * | cipherAlgo, |
| uint_t | r, | ||
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | iv, | ||
| size_t | ivLen, | ||
| const uint8_t * | fixedData, | ||
| size_t | fixedDataLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (feedback mode with CMAC)
- Parameters
-
[in] cipherAlgo Underlying cipher algorithm [in] r Length of the binary encoding of the counter, in bits [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] iv Initialization vector [in] ivLen Length of the initialization vector, in bytes [in] fixedData Fixed input data [in] fixedDataLen Length of the fixed input data, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
◆ kbkdfFeedbackHmac()
| error_t kbkdfFeedbackHmac | ( | const HashAlgo * | hashAlgo, |
| uint_t | r, | ||
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | iv, | ||
| size_t | ivLen, | ||
| const uint8_t * | fixedData, | ||
| size_t | fixedDataLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (feedback mode with HMAC)
- Parameters
-
[in] hashAlgo Underlying hash function [in] r Length of the binary encoding of the counter, in bits [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] iv Initialization vector [in] ivLen Length of the initialization vector, in bytes [in] fixedData Fixed input data [in] fixedDataLen Length of the fixed input data, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
◆ kbkdfKmac()
| error_t kbkdfKmac | ( | uint_t | strength, |
| const uint8_t * | ki, | ||
| size_t | kiLen, | ||
| const uint8_t * | context, | ||
| size_t | contextLen, | ||
| const char_t * | label, | ||
| size_t | labelLen, | ||
| uint8_t * | ko, | ||
| size_t | koLen | ||
| ) |
KBKDF key derivation function (using KMAC)
- Parameters
-
[in] strength Number of bits of security (128 for KMAC128 and 256 for KMAC256) [in] ki Key-derivation key KI [in] kiLen Length of the key-derivation key, in bytes [in] context Context-specific information [in] contextLen Length of the context, in bytes [in] label Customization string (optional parameter) [in] labelLen Length of the customization string, in bytes [out] ko Derived keying material [in] koLen Length of the keying material to be generated, in bytes
- Returns
- Error code
