Hello world example of using the authenticated encryption with 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 performs authenticated encryption and authenticated decryption of a buffer. It serves as a tutorial for the basic authenticated encryption functions of 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

plaintext message: 536f6d65207468696e67732061726520626574746572206c65667420756e7265616400
ciphertext: c57f7afb94f14c7977d785d08682a2596bd62ee9dcf216b8cccd997afee9b402f5de1739e8e6467aa363749ef39392e5c66622b01c7203ec0a3d14
decrypted: 536f6d65207468696e67732061726520626574746572206c65667420756e7265616400

DONE
Committer:
mbed_official
Date:
Mon Feb 25 16:41:53 2019 +0000
Revision:
86:b2856f26f5c4
Parent:
47:18a73cfdea57
Merge pull request #235 from adbridge/master

All the CI tests have passed.
Updating mbed-os to mbed-os-5.11.5
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-tls

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 47:18a73cfdea57 1 # Mbed TLS Authenticated Encryption example on Mbed OS
mbed_official 2:459c0eb21304 2
mbed_official 47:18a73cfdea57 3 This application performs authenticated encryption and authenticated decryption of a buffer. It serves as a tutorial for the basic authenticated encryption functions of Mbed TLS.
mbed_official 2:459c0eb21304 4
mbed_official 5:97e046e0e2b1 5 ## Getting started
mbed_official 2:459c0eb21304 6
mbed_official 2:459c0eb21304 7 Set up your environment if you have not done so already. For instructions, refer to the [main readme](../README.md).
mbed_official 2:459c0eb21304 8
mbed_official 47:18a73cfdea57 9 You can also compile this example with the [Mbed Online Compiler](https://os.mbed.com/compiler/) by using [this project](https://os.mbed.com/teams/mbed-os-examples/code/mbed-os-example-tls-authcrypt).
mbed_official 21:80c2b314b24b 10
mbed_official 2:459c0eb21304 11 ## Monitoring the application
mbed_official 2:459c0eb21304 12
mbed_official 2:459c0eb21304 13 The output in the terminal window should be similar to this:
mbed_official 2:459c0eb21304 14
mbed_official 2:459c0eb21304 15 ```
mbed_official 2:459c0eb21304 16 plaintext message: 536f6d65207468696e67732061726520626574746572206c65667420756e7265616400
mbed_official 2:459c0eb21304 17 ciphertext: c57f7afb94f14c7977d785d08682a2596bd62ee9dcf216b8cccd997afee9b402f5de1739e8e6467aa363749ef39392e5c66622b01c7203ec0a3d14
mbed_official 2:459c0eb21304 18 decrypted: 536f6d65207468696e67732061726520626574746572206c65667420756e7265616400
mbed_official 2:459c0eb21304 19
mbed_official 2:459c0eb21304 20 DONE
mbed_official 2:459c0eb21304 21 ```