blob: 4968b6c25f4d760cd878b1875a03b1d59866c064 [file] [log] [blame] [view]
Pirmin Vogela5c55c22019-09-17 18:56:47 +01001AES Model
2=========
3
4This directory contains a basic C model of the AES unit targeting functional
5verfication of the AES unit during the design phase as well as later design
6verification.
7
8Besides the actual model, this directory also contains an example application
9that:
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
16How to build and run the example
17--------------------------------
18
19Open the makefile and update the variable BORING_SSL_PATH pointing to the
20BoringSSL directory on your machine. If make cannot find the crypto library
21in that directory, the example is automatically linked to OpenSSL instead
22of BoringSSL.
23
24Simply execute
25
26 ```make```
27
28to build the example and
29
30 ```./aes_example KEY_LEN_BYTES```
31
32to run the example. The optional argument KEY_LEN_BYTES determines the key
33length in bytes and is either 16, 24, or 32 for AES-128, 192 or 256,
34respectively. By default, a key length of 16 Bytes is used (AES-128).
35
36Details 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