Pirmin Vogel | a5c55c2 | 2019-09-17 18:56:47 +0100 | [diff] [blame] | 1 | AES Model |
| 2 | ========= |
| 3 | |
| 4 | This directory contains a basic C model of the AES unit targeting functional |
| 5 | verfication of the AES unit during the design phase as well as later design |
| 6 | verification. |
| 7 | |
| 8 | Besides the actual model, this directory also contains an example application |
| 9 | that: |
| 10 | - Shows how to interface the C model. |
| 11 | - Allows printing of intermediate results for debugging. |
| 12 | - Checks the output of the model versus the exptected results. |
| 13 | - Checks the output of the model versus the output of the BoringSSL/OpenSSL |
| 14 | library. |
| 15 | |
| 16 | How to build and run the example |
| 17 | -------------------------------- |
| 18 | |
| 19 | Open the makefile and update the variable BORING_SSL_PATH pointing to the |
| 20 | BoringSSL directory on your machine. If make cannot find the crypto library |
| 21 | in that directory, the example is automatically linked to OpenSSL instead |
| 22 | of BoringSSL. |
| 23 | |
| 24 | Simply execute |
| 25 | |
| 26 | ```make``` |
| 27 | |
| 28 | to build the example and |
| 29 | |
| 30 | ```./aes_example KEY_LEN_BYTES``` |
| 31 | |
| 32 | to run the example. The optional argument KEY_LEN_BYTES determines the key |
| 33 | length in bytes and is either 16, 24, or 32 for AES-128, 192 or 256, |
| 34 | respectively. By default, a key length of 16 Bytes is used (AES-128). |
| 35 | |
| 36 | Details of the model |
| 37 | -------------------- |
| 38 | |
| 39 | - aes.c/h: contains the C model of the AES unit |
| 40 | - crypto.c/h: contains BoringSSL/OpenSSL library interface functions |
| 41 | - aes_example.c/h: contains the example application including test |
| 42 | input and expected output |