Skip to content

Commit 1c42ef3

Browse files
author
itayzafrir
committed
Update README.md
First draft of README.md
1 parent c099695 commit 1c42ef3

File tree

1 file changed

+39
-1
lines changed

1 file changed

+39
-1
lines changed

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,40 @@
1-
# mbed-os-example-mbed-crypto
1+
# Running Mbed-Crypto examples on Mbed-OS
2+
This repository contains a set of examples demonstrating the compilation and use
3+
of Mbed-Crypto on Mbed-OS.
24

5+
List of examples contained within this repository:
6+
* Cipher encrypt/decrypt using an AES key in cipher block chain (CBC) mode with no padding using a single block.
7+
* Cipher encrypt/decrypt using an AES key in cipher block chain (CBC) mode with PKCS7 padding using multiple blocks.
8+
* Cipher encrypt/decrypt using an AES key in counter (CTR) mode using multiple blocks.
9+
10+
## Prerequisites
11+
* Install <a href='https://github.com/ARMmbed/mbed-cli#installing-mbed-cli'>Mbed-CLI</a>
12+
13+
## Deploy
14+
The following are the steps required for deployment:
15+
* Clone this repository: `git clone [email protected]:ARMmbed/mbed-os-example-mbed-crypto.git`
16+
* CD to `mbed-os-example-mbed-crypto`
17+
* Fetch Mbed-OS: `mbed deploy`
18+
19+
## Compile
20+
To compile the example program use `mbed compile` while specifying the target platform and the compiler.
21+
For example, in order to compile using the ARM GCC compiler and a K64F target platform use: `mbed compile -m K64F -t ARM`.
22+
23+
Once the compilation is completed successfully a binary file will be created: `./BUILD/K64F/GCC_ARM/mbed-os-example-mbed-crypto.bin`
24+
25+
## Run
26+
The following are the steps required to run the example program:
27+
* Connect the Mbed device to your computer over USB.
28+
* Copy the binary file (`mbed-os-example-mbed-crypto.bin`) to the Mbed device.
29+
* Connect to the Mbed Device using an ssh client application of your choice.
30+
* Press the reset button on the Mbed device to run the program.
31+
32+
The expected output from a successful execution of the example program should be as follows:
33+
```
34+
cipher encrypt/decrypt AES CBC no padding:
35+
success!
36+
cipher encrypt/decrypt AES CBC PKCS7 multipart:
37+
success!
38+
cipher encrypt/decrypt AES CTR multipart:
39+
success!
40+
```

0 commit comments

Comments
 (0)