![](/media/cache/group/Mbed-100-mk2.png.50x50_q85.png)
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
mbedtls_entropy_config.h@48:6b6340f5cdc3, 2017-11-09 (annotated)
- Committer:
- mbed_official
- Date:
- Thu Nov 09 09:15:07 2017 +0000
- Revision:
- 48:6b6340f5cdc3
- Parent:
- 12:469204756969
Change Arm trademarks in the examples' source files
.
Commit copied from https://github.com/ARMmbed/mbed-os-example-tls
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 12:469204756969 | 1 | /* |
mbed_official | 48:6b6340f5cdc3 | 2 | * Copyright (C) 2006-2016, Arm Limited, All Rights Reserved |
mbed_official | 12:469204756969 | 3 | * SPDX-License-Identifier: Apache-2.0 |
mbed_official | 12:469204756969 | 4 | * |
mbed_official | 12:469204756969 | 5 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
mbed_official | 12:469204756969 | 6 | * not use this file except in compliance with the License. |
mbed_official | 12:469204756969 | 7 | * You may obtain a copy of the License at |
mbed_official | 12:469204756969 | 8 | * |
mbed_official | 12:469204756969 | 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
mbed_official | 12:469204756969 | 10 | * |
mbed_official | 12:469204756969 | 11 | * Unless required by applicable law or agreed to in writing, software |
mbed_official | 12:469204756969 | 12 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
mbed_official | 12:469204756969 | 13 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
mbed_official | 12:469204756969 | 14 | * See the License for the specific language governing permissions and |
mbed_official | 12:469204756969 | 15 | * limitations under the License. |
mbed_official | 12:469204756969 | 16 | * |
mbed_official | 48:6b6340f5cdc3 | 17 | * This file is part of Mbed TLS (https://tls.mbed.org) |
mbed_official | 12:469204756969 | 18 | */ |
mbed_official | 5:97e046e0e2b1 | 19 | |
mbed_official | 12:469204756969 | 20 | #if !defined(MBEDTLS_ENTROPY_HARDWARE_ALT) && \ |
mbed_official | 12:469204756969 | 21 | !defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_TEST_NULL_ENTROPY) |
mbed_official | 12:469204756969 | 22 | #error "This hardware does not have an entropy source." |
mbed_official | 12:469204756969 | 23 | #endif /* !MBEDTLS_ENTROPY_HARDWARE_ALT && !MBEDTLS_ENTROPY_NV_SEED && |
mbed_official | 12:469204756969 | 24 | * !MBEDTLS_TEST_NULL_ENTROPY */ |