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 
12 #ifndef NONCE_H
13 #define NONCE_H
14 
15 #include "common/byte_array.h"
16 #include "common/oscore_edhoc_error.h"
17 
18 /**
19  * @brief   Create the OSCORE nonce.
20  * @param   id_piv "Sender ID of the endpoint that generated the Partial IV"
21  * @param   partial_iv MUST be max 5 bytes long
22  * @param   common_iv MUST be 13 bytes long
23  * @param   out MUST be 13 bytes long
24  */
25 enum err create_nonce(struct byte_array *id_piv, struct byte_array *piv,
26 		      struct byte_array *common_iv, struct byte_array *nonce);
27 
28 #endif
29