Skip to content

Commit bcce195

Browse files
committed
Add IV salts
1 parent bba9a5e commit bcce195

File tree

6 files changed

+8
-3
lines changed

6 files changed

+8
-3
lines changed

bootloaders/encrypted/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ add_linker_script(hello_serial_enc "0x20000000" "448k")
8585
# sign, hash, and encrypt
8686
pico_sign_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/private.pem)
8787
pico_hash_binary(hello_serial_enc)
88-
pico_encrypt_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin)
88+
pico_encrypt_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin ${CMAKE_CURRENT_LIST_DIR}/ivsalt.bin)
8989

9090
# package uf2 in flash
9191
pico_package_uf2_output(hello_serial_enc 0x10000000)

bootloaders/encrypted/ivsalt.bin

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
���x��%�^��=T�Č

bootloaders/encrypted/otp.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"OTP_DATA_KEY1" : [ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 ],
33
"OTP_DATA_KEY1_VALID" : "0x010101",
4-
"PAGE30_LOCK0" : "0x494949"
4+
"PAGE30_LOCK0" : "0x494949",
5+
"PAGE31_LOCK0" : "0x494949"
56
}

encrypted/hello_encrypted/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ pico_sign_binary(hello_encrypted ${CMAKE_CURRENT_LIST_DIR}/private.pem)
3434
pico_hash_binary(hello_encrypted)
3535
pico_encrypt_binary(hello_encrypted
3636
${CMAKE_CURRENT_LIST_DIR}/privateaes.bin
37+
${CMAKE_CURRENT_LIST_DIR}/ivsalt.bin
3738
EMBED
3839
OTP_KEY_PAGE 29)
3940

encrypted/hello_encrypted/ivsalt.bin

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
���x��%�^��=T�Č

encrypted/hello_encrypted/otp.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"OTP_DATA_KEY1" : [ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 ],
33
"OTP_DATA_KEY1_VALID" : "0x010101",
4-
"PAGE29_LOCK0" : "0x494949"
4+
"PAGE29_LOCK0" : "0x494949",
5+
"PAGE30_LOCK0" : "0x494949"
56
}

0 commit comments

Comments
 (0)