concat_kdf.c File Reference

Concat KDF (Concatenation Key Derivation Function) More...

#include "core/crypto.h"
#include "kdf/pbkdf.h"
#include "mac/hmac.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL
 

Functions

error_t concatKdf (const HashAlgo *hash, const uint8_t *z, size_t zLen, const uint8_t *otherInfo, size_t otherInfoLen, uint8_t *dk, size_t dkLen)
 Concat KDF key derivation function. More...
 

Detailed Description

Concat KDF (Concatenation Key Derivation Function)

License

SPDX-License-Identifier: GPL-2.0-or-later

Copyright (C) 2010-2024 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

Concat KDF is a key derivation function defined by NIST SP 800-56A revision 1, section 5.8.1

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file concat_kdf.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   CRYPTO_TRACE_LEVEL

Definition at line 37 of file concat_kdf.c.

Function Documentation

◆ concatKdf()

error_t concatKdf ( const HashAlgo hash,
const uint8_t *  z,
size_t  zLen,
const uint8_t *  otherInfo,
size_t  otherInfoLen,
uint8_t *  dk,
size_t  dkLen 
)

Concat KDF key derivation function.

Parameters
[in]hashUnderlying hash function
[in]zShared secret Z
[in]zLenLength in octets of the shared secret Z
[in]otherInfoContext-specific information (optional parameter)
[in]otherInfoLenLength in octets of the context-specific information
[out]dkDerived keying material
[in]dkLenLength in octets of the keying material to be generated
Returns
Error code

Definition at line 60 of file concat_kdf.c.