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 RUNTIME_CONTEXT_H
12 #define RUNTIME_CONTEXT_H
13 
14 #include <stdint.h>
15 
16 #include "edhoc.h"
17 
18 struct runtime_context {
19 	uint8_t msg1_hash[HASH_DEFAULT_SIZE];
20 	uint8_t msg[MSG_MAX_SIZE];
21 	uint32_t msg_len;
22 	struct suite suite;
23 	/*initiator specific*/
24 	uint8_t th4[HASH_DEFAULT_SIZE];
25 	uint32_t th4_len;
26 	uint8_t prk_4e3m[PRK_DEFAULT_SIZE];
27 	uint32_t prk_4e3m_len;
28 	/*responder specific*/
29 	uint8_t th3[HASH_DEFAULT_SIZE];
30 	uint32_t th3_len;
31 	uint8_t prk_3e2m[PRK_DEFAULT_SIZE];
32 	uint32_t prk_3e2m_len;
33 	bool static_dh_i;
34 };
35 
36 #endif
37