1 /***************************************************************************//**
2 * \file cy_crypto_core_hkdf_v2.h
3 * \version 2.120
4 *
5 * \brief
6 *  This file provides constants and function prototypes
7 *  for the API for the HKDF method in the Crypto block driver.
8 *
9 ********************************************************************************
10 * \copyright
11 * Copyright (c) (2020-2023), Cypress Semiconductor Corporation (an Infineon company) or
12 * an affiliate of Cypress Semiconductor Corporation.
13 * SPDX-License-Identifier: Apache-2.0
14 *
15 * Licensed under the Apache License, Version 2.0 (the "License");
16 * you may not use this file except in compliance with the License.
17 * You may obtain a copy of the License at
18 *
19 *    http://www.apache.org/licenses/LICENSE-2.0
20 *
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 * See the License for the specific language governing permissions and
25 * limitations under the License.
26 *******************************************************************************/
27 
28 
29 #if !defined (CY_CRYPTO_CORE_HKDF_V2_H)
30 #define CY_CRYPTO_CORE_HKDF_V2_H
31 
32 #include "cy_crypto_common.h"
33 
34 #if defined(CY_IP_MXCRYPTO) && defined(CY_CRYPTO_CFG_HW_V2_ENABLE)
35 
36 #if defined(__cplusplus)
37 extern "C" {
38 #endif
39 
40 #if (CPUSS_CRYPTO_SHA == 1) && defined(CY_CRYPTO_CFG_HKDF_C)
41 
42 #include "cy_crypto_core_hmac_v2.h"
43 
44 
45 cy_en_crypto_status_t Cy_Crypto_Core_V2_Hkdf_Extract(CRYPTO_Type *base, cy_en_crypto_sha_mode_t mode,
46                                           uint8_t  const *salt,
47                                           uint32_t saltLength,
48                                           uint8_t  const *ikm,
49                                           uint32_t ikmLength,
50                                           uint8_t *prk);
51 
52 cy_en_crypto_status_t Cy_Crypto_Core_V2_Hkdf_Expand(CRYPTO_Type *base, cy_en_crypto_sha_mode_t mode,
53                                           uint8_t  const *prk,
54                                           uint32_t prkLength,
55                                           uint8_t  const *info,
56                                           uint32_t infoLength,
57                                           uint8_t *okm,
58                                           uint32_t okmLength);
59 
60 cy_en_crypto_status_t Cy_Crypto_Core_V2_Hkdf(CRYPTO_Type *base, cy_en_crypto_sha_mode_t mode,
61                                           uint8_t  const *salt,
62                                           uint32_t saltLength,
63                                           uint8_t  const *ikm,
64                                           uint32_t ikmLength,
65                                           uint8_t  const *info,
66                                           uint32_t infoLength,
67                                           uint8_t *okm,
68                                           uint32_t okmLength);
69 
70 #endif /* (CPUSS_CRYPTO_SHA == 1) && defined(CY_CRYPTO_CFG_HKDF_C) */
71 
72 #if defined(__cplusplus)
73 }
74 #endif
75 
76 #endif /* defined(CY_IP_MXCRYPTO) && defined(CY_CRYPTO_CFG_HW_V2_ENABLE) */
77 
78 #endif /* #if !defined (CY_CRYPTO_CORE_HKDF_V2_H) */
79 
80 
81 /* [] END OF FILE */
82