-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmakefile_config.mk
162 lines (128 loc) · 5.94 KB
/
makefile_config.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
################################################################################
# Toolchain
################################################################################
#CC = gcc
#AR = ar
#CC = /opt/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-gcc
#AR = /opt/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-ar
#CC = clang-13
################################################################################
# Architecture
################################################################################
# see for arm flags: https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html
#ARCH = -m32
#ARCH = -mtune=cortex-m3
################################################################################
# Compiler optimization
################################################################################
OPT = -O0
################################################################################
# Print helpful debug messages
################################################################################
DEBUG_PRINT += -DDEBUG_PRINT
################################################################################
# Use Address Sanitizer, e.g. with native_posix
################################################################################
#ASAN += -DASAN
################################################################################
# Unit testing
################################################################################
# Uncomment this to enable building the unit tests
UNIT_TEST += -DUNIT_TEST
################################################################################
# CBOR engine
################################################################################
# currently only ZCBOR is supported
CBOR_ENGINE += -DZCBOR
# Uncomment to enable Non-volatile memory (NVM) support for storing security context between device reboots
OSCORE_NVM_SUPPORT += -DOSCORE_NVM_SUPPORT
################################################################################
# RAM optimization
################################################################################
# Compute the length of buffers at runtime (variable length array VLA)
# Please note that: we do not support this feature under Windows with MSVC (lack of support for VLA).
#FEATURES += -DVLA
################################################################################
# RAM optimization EDHOC
################################################################################
# In deployments where no protected application message is sent from the
# Responder to the Initiator, message_4 MUST be used.
# FEATURES += -DMESSAGE_4
# If EAD is not used set its buffer size to 0
FEATURES += -DEAD_SIZE=0
# Size of the connection identifier of the initiator C_I
FEATURES += -DC_I_SIZE=1
# Size of the connection identifier of the initiator C_R
FEATURES += -DC_R_SIZE=1
# Size of ID_CRED_R
FEATURES += -DID_CRED_R_SIZE=296
# Size of ID_CRED_I
FEATURES += -DID_CRED_I_SIZE=296
# Size of CRED_R
FEATURES += -DCRED_R_SIZE=293
# Size of CRED_I
FEATURES += -DCRED_I_SIZE=293
# Number of supported suites by the initiator
FEATURES += -DSUITES_I_SIZE=1
################################################################################
# RAM optimization OSCORE
################################################################################
# Max size of an OSCORE plaintext
FEATURES += -DOSCORE_MAX_PLAINTEXT_LEN=1024
# Max size of the E options buffer
FEATURES += -DE_OPTIONS_BUFF_MAX_LEN=100
# Max size of the I options buffer
FEATURES += -DI_OPTIONS_BUFF_MAX_LEN=100
################################################################################
# Crypto engine
################################################################################
# The uoscore-uedhoc can be used with different crypto engines.
# The user can provide as well additional crypto engines by providing
# implementations of the function defined (as week) in the crypto_wrapper file.
# Currently we have build in support for the following engines which
# allow fowling modes of operation and suites:
#
# EDHOC suites:
# Value: 0
# Array: 10, -16, 8, 4, -8, 10, -16
# Desc: AES-CCM-16-64-128, SHA-256, 8, X25519, EdDSA,
# AES-CCM-16-64-128, SHA-256
# Value: 1
# Array: 30, -16, 16, 4, -8, 10, -16
# Desc: AES-CCM-16-128-128, SHA-256, 16, X25519, EdDSA,
# AES-CCM-16-64-128, SHA-256
# Value: 2
# Array: 10, -16, 8, 1, -7, 10, -16
# Desc: AES-CCM-16-64-128, SHA-256, 8, P-256, ES256,
# AES-CCM-16-64-128, SHA-256
# Value: 3
# Array: 30, -16, 16, 1, -7, 10, -16
# Desc: AES-CCM-16-128-128, SHA-256, 16, P-256, ES256,
# AES-CCM-16-64-128, SHA-256
# Value: 4
# Array: 24, -16, 16, 4, -8, 24, -16
# Desc: ChaCha20/Poly1305, SHA-256, 16, X25519, EdDSA,
# ChaCha20/Poly1305, SHA-256
# EDHOC methods:
# +-------+-------------------+-------------------+-------------------+
# | Value | Initiator | Responder | Reference |
# +-------+-------------------+-------------------+-------------------+
# | 0 | Signature Key | Signature Key | [[this document]] |
# | 1 | Signature Key | Static DH Key | [[this document]] |
# | 2 | Static DH Key | Signature Key | [[this document]] |
# | 3 | Static DH Key | Static DH Key | [[this document]] |
# +-------+-------------------+-------------------+-------------------+
#
#
#
# +--------+---------+---------+-------------------------------------------
# protocol | suite | method | ENGINE
# +--------+---------+---------+-------------------------------------------
# | OSCORE | | | TINYCRYPT or MBEDTLS
# | EDHOC | 0/1 | 0/1/2 | COMPACT25519 with (TINYCRYPT or MBEDTLS)
# | EDHOC | 0/1 | 3 | MBEDTLS or (COMPACT25519 with TINYCRYPT)
# | EDHOC | 2/3 | 0/1/2/3 | MBEDTLS
# | EDHOC | 0/1/2/3 | 0/1/2/3 | MBEDTLS and COMPACT25519
#CRYPTO_ENGINE += -DTINYCRYPT
CRYPTO_ENGINE += -DCOMPACT25519
CRYPTO_ENGINE += -DMBEDTLS