Commit f7b6312
authored
Encrypted improvements (#619)
* Use key share for AES file
Update CMake tooling to use 128 byte key files (a 4-way share of the 32 byte key).
Also temporarily update the enc_bootloader to deshare this key - the actual fix will need to be in aes.S.
* Improve checking for malicious flash data
Add data_max_size to prevent overwriting the bootloader with data from flash
* Incorporate latest changes to aes.S
Also shrink the space allocated for the bootloader to 32K (plus 8K scratch)
* Encorporated latest encryption code with 4-way shares
Also switch to random default key
* Apply encrypted-example 6de8084b6eda
* Add hello_encrypted example
* Use new `enable_interrupts` function
* Remove update-key.cmake
This is not necessary anymore, now picotool writes the AES key to otp json files
Fixes #613
* Add hello_encrypted to readme
* Update enc_bootloader with latest aes.S (picotool 333d571c)
CK_JITTER is removed as the enc_bootloader runs from XOSC not ROSC
* Add IV salts
* Update with latest aes.S
* Update readmes
This includes the changes from #553
* Add secret file to print out
This is useful for testing decryption with large files
* Add notes about unique AES keys, and not losing keys/salts
* Update readmes
* Fix enc_bootloader example OTP output
* Remove OTP key locking functionality from encrypted examples
* Improve TBYB sequence
Add self check (1 == 1), which is only performed on first boot
* Review fixups
Comments and readme
* Add MbedTLS self-decrypting example1 parent 58327e2 commit f7b6312
File tree
21 files changed
+1911
-1586
lines changed- bootloaders/encrypted
- encrypted
- hello_encrypted
21 files changed
+1911
-1586
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
74 | 75 | | |
75 | 76 | | |
76 | 77 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | 7 | | |
19 | 8 | | |
20 | 9 | | |
| |||
46 | 35 | | |
47 | 36 | | |
48 | 37 | | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 38 | + | |
| 39 | + | |
54 | 40 | | |
55 | 41 | | |
56 | 42 | | |
| |||
86 | 72 | | |
87 | 73 | | |
88 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
89 | 78 | | |
90 | 79 | | |
91 | 80 | | |
92 | | - | |
| 81 | + | |
93 | 82 | | |
94 | 83 | | |
95 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
8 | 21 | | |
| 22 | + | |
| 23 | + | |
9 | 24 | | |
10 | | - | |
| 25 | + | |
11 | 26 | | |
12 | 27 | | |
| 28 | + | |
| 29 | + | |
13 | 30 | | |
14 | 31 | | |
15 | 32 | | |
| |||
0 commit comments