Benchmark demonstration program for mbed TLS. The canonical source for this example lives at https://github.com/ARMmbed/mbed-os-example-tls

Mbed TLS Benchmark example on Mbed OS

This application benchmarks the various cryptographic primitives offered by Mbed TLS.

Getting started

Building with Mbed CLI

If you'd like to use Mbed CLI to build this, then you should set up your environment if you have not done so already. For instructions, refer to the main readme. The instructions on this page relate to using the developer.mbed.org Online Compiler

Import the program in to the Online Compiler, select your board from the drop down in the top right hand corner and then compile the application. Once it has built, you can drag and drop the binary onto your device.

Monitoring the application

The output in the terminal window should be similar to this:

terminal output

  SHA-256                  :       1673 Kb/s,         70 cycles/byte
  SHA-512                  :        546 Kb/s,        215 cycles/byte
  AES-CBC-128              :       1428 Kb/s,         82 cycles/byte
  AES-CBC-192              :       1260 Kb/s,         93 cycles/byte
  AES-CBC-256              :       1127 Kb/s,        104 cycles/byte
  AES-GCM-128              :        486 Kb/s,        242 cycles/byte
  AES-GCM-192              :        464 Kb/s,        253 cycles/byte
  AES-GCM-256              :        445 Kb/s,        264 cycles/byte
  AES-CCM-128              :        610 Kb/s,        192 cycles/byte
  AES-CCM-192              :        547 Kb/s,        214 cycles/byte
  AES-CCM-256              :        496 Kb/s,        237 cycles/byte
  CTR_DRBG (NOPR)          :       1139 Kb/s,        102 cycles/byte
  CTR_DRBG (PR)            :        826 Kb/s,        142 cycles/byte
  HMAC_DRBG SHA-256 (NOPR) :        193 Kb/s,        611 cycles/byte
  HMAC_DRBG SHA-256 (PR)   :        170 Kb/s,        695 cycles/byte
  RSA-2048                 :      28 ms/ public
  RSA-2048                 :     953 ms/private
  RSA-4096                 :      93 ms/ public
  RSA-4096                 :    5327 ms/private
  ECDSA-secp384r1          :     451 ms/sign
  ECDSA-secp256r1          :     304 ms/sign
  ECDSA-secp384r1          :     863 ms/verify
  ECDSA-secp256r1          :     594 ms/verify
  ECDHE-secp384r1          :     829 ms/handshake
  ECDHE-secp256r1          :     566 ms/handshake
  ECDHE-Curve25519         :     533 ms/handshake
  ECDH-secp384r1           :     407 ms/handshake
  ECDH-secp256r1           :     281 ms/handshake
  ECDH-Curve25519          :     268 ms/handshake

DONE

Revisions of main.cpp

Revision Date Message Actions
90:8aec6c3f0695 2019-10-30 Merge pull request #262 from ARMmbed/dev/gilles-peskine-arm/benchmark-ctr_drbg-reset File  Diff  Annotate
89:2d5255b9d6c5 2019-07-23 Merge pull request #211 from RonEld/unsupported_feature_error_support File  Diff  Annotate
83:c40c51a46813 2018-12-13 Merge pull request #213 from k-stachowiak/iotssl-2427-remove-memory-heavy-tests File  Diff  Annotate
80:0f7a38bbcebe 2018-10-31 Merge pull request #199 from RonEld/set_NULL_as_platform_context File  Diff  Annotate
78:5f419e0f96dd 2018-10-18 Merge pull request #194 from andresag01/iotssl-2430-benchmark-refactor File  Diff  Annotate
76:68ac2a548d58 2018-10-08 Merge pull request #126 from andresag01/line-endings File  Diff  Annotate
70:72c865037f5d 2018-07-19 Merge pull request #116 from RonEld/benchmark_refactor File  Diff  Annotate
63:9f7e5224fc60 2018-05-10 Merge pull request #165 from ARMmbed/feature-platform-init File  Diff  Annotate
48:4e6f86cca9fa 2017-11-09 Change Arm trademarks in the examples' source files File  Diff  Annotate
33:0af60cd5226d 2017-06-07 Merge pull request #88 from andresag01/no-cycle-counter File  Diff  Annotate
31:fc594198ff6e 2017-06-07 Merge pull request #86 from ARMmbed/development File  Diff  Annotate
30:e0ea8c1ef9f5 2017-06-07 Merge pull request #70 from RonEld/aes_ctr_benchmark File  Diff  Annotate
11:6ccae3ebafd5 2016-10-21 Updating mbed-os to mbed-os-5.2.0-rc4 File  Diff  Annotate
0:1f7c5025e59d 2016-07-27 Update example home repo at https://github.com/ARMmbed/mbed-os-example-tls File  Diff  Annotate