samples: net: Port mbedtls benchmark sample to zephyr
This application benchmarks the various cryptographic primitives offered by mbed TLS. Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
parent
bfe0c2e748
commit
95c7079433
4 changed files with 1109 additions and 0 deletions
6
samples/crypto/mbedtls_benchmark/CMakeLists.txt
Normal file
6
samples/crypto/mbedtls_benchmark/CMakeLists.txt
Normal file
|
@ -0,0 +1,6 @@
|
|||
cmake_minimum_required(VERSION 3.8.2)
|
||||
include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
|
||||
project(mbedtls_benchmark)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
24
samples/crypto/mbedtls_benchmark/prj.conf
Normal file
24
samples/crypto/mbedtls_benchmark/prj.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Kernel options
|
||||
CONFIG_MAIN_STACK_SIZE=10000
|
||||
CONFIG_ENTROPY_GENERATOR=y
|
||||
CONFIG_INIT_STACKS=y
|
||||
|
||||
# Logging
|
||||
CONFIG_PRINTK=y
|
||||
CONFIG_MBEDTLS_DEBUG=y
|
||||
CONFIG_MBEDTLS_DEBUG_LEVEL=4
|
||||
|
||||
# TLS configuration
|
||||
CONFIG_MBEDTLS=y
|
||||
CONFIG_MBEDTLS_BUILTIN=y
|
||||
CONFIG_MBEDTLS_ENABLE_HEAP=y
|
||||
CONFIG_MBEDTLS_HEAP_SIZE=64000
|
||||
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=2048
|
||||
|
||||
CONFIG_MBEDTLS_TLS_VERSION_1_2=y
|
||||
CONFIG_MBEDTLS_KEY_EXCHANGE_ALL_ENABLED=y
|
||||
CONFIG_MBEDTLS_CIPHER_ALL_ENABLED=y
|
||||
CONFIG_MBEDTLS_ECP_ALL_ENABLED=y
|
||||
CONFIG_MBEDTLS_MAC_ALL_ENABLED=y
|
||||
CONFIG_MBEDTLS_GENPRIME_ENABLED=y
|
||||
CONFIG_MBEDTLS_HMAC_DRBG_ENABLED=y
|
9
samples/crypto/mbedtls_benchmark/sample.yaml
Normal file
9
samples/crypto/mbedtls_benchmark/sample.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
common:
|
||||
harness: crypto
|
||||
tags: crypto
|
||||
sample:
|
||||
description: mbed TLS benchmark application
|
||||
name: mbedTLS Benchmark
|
||||
tests:
|
||||
test:
|
||||
platform_whitelist: qemu_x86 frdm_k64f sam_e70_xplained
|
1070
samples/crypto/mbedtls_benchmark/src/benchmark.c
Normal file
1070
samples/crypto/mbedtls_benchmark/src/benchmark.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue