1 /* 2 Copyright (c) 2021 Fraunhofer AISEC. See the COPYRIGHT 3 file at the top-level directory of this distribution. 4 5 Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or 6 http://www.apache.org/licenses/LICENSE-2.0> or the MIT license 7 <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your 8 option. This file may not be copied, modified, or distributed 9 except according to those terms. 10 */ 11 #ifndef OKM_H 12 #define OKM_H 13 14 #include <stdint.h> 15 16 #include "hkdf_info.h" 17 #include "suites.h" 18 19 #include "common/oscore_edhoc_error.h" 20 21 /** 22 * @brief Derives output keying material. 23 * 24 * @param hash_alg HASH algorithm. 25 * @param[in] prk Pseudorandom key. 26 * @param[in] label Predefined integer value. 27 * @param[in] context Relevant only for MAC_2 and MAC_3. 28 * @param[out] okm The result. 29 * @retval Ok or error code. 30 */ 31 enum err edhoc_kdf(enum hash_alg hash_alg, const struct byte_array *prk, 32 uint8_t label, struct byte_array *context, 33 struct byte_array *okm); 34 35 #endif 36