Skip to content

Commit

Permalink
Make tinycrypt the default crypto engine. Provide documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanHri committed Dec 28, 2023
1 parent 3b74d30 commit 7bf06fa
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ endif
################################################################################
# C includes
################################################################################
# Set a default crypto engine if non is provided in CRYPTO_ENGINE or CC
ifneq ($(findstring TINYCRYPT,$(EXTENDED_CFLAGS)),TINYCRYPT)
ifneq ($(findstring MBEDTLS,$(EXTENDED_CFLAGS)),MBEDTLS)
EXTENDED_CFLAGS += -DTINYCRYPT
endif
endif

C_INCLUDES += -Iinc

# Crypto engine
Expand Down Expand Up @@ -153,7 +160,6 @@ endif
#add include paths
EXTENDED_CFLAGS += $(C_INCLUDES)


$(info EXTENDED_CFLAGS are $(EXTENDED_CFLAGS))
################################################################################
# build the library
Expand Down
1 change: 1 addition & 0 deletions makefile_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ FEATURES += -DE_OPTIONS_BUFF_MAX_LEN=100
# Max size of the I options buffer
FEATURES += -DI_OPTIONS_BUFF_MAX_LEN=100


################################################################################
# Crypto engine
################################################################################
Expand Down
2 changes: 1 addition & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ add_definitions(
-DUNIT_TEST
#-DDEBUG_PRINT
-DZCBOR_CANONICAL
-DMEASURE_LATENCY_ON
#-DMEASURE_LATENCY_ON
#-DREPORT_STACK_USAGE
)

Expand Down
11 changes: 11 additions & 0 deletions test/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,17 @@ ZTEST(uoscore_uedhoc, t606_oscore)
t606_server_replay_standard_scenario_test);
}



/*
* In order to measure the latency of coap2oscore, oscore2coap,
* edhoc_responder_run, edhoc_initiator_run you need one of the supported boards
* by Zephyr OS, see https://docs.zephyrproject.org/latest/boards/index.html
* Make sure that MEASURE_LATENCY_ON is enabled in CMakeLists.txt
* Build flash the test project for your board e.g.,
* west build -b=nrf9160dk_nrf9160; west flash.
* make also sure that DEBUG_PRINT is disabled
*/
#ifdef MEASURE_LATENCY_ON
ZTEST(uoscore_uedhoc, t800_oscore)
{
Expand Down

0 comments on commit 7bf06fa

Please sign in to comment.