Skip to content

Commit

Permalink
Add IV salts
Browse files Browse the repository at this point in the history
  • Loading branch information
will-v-pi committed Feb 26, 2025
1 parent f813af6 commit da97d36
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bootloaders/encrypted/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ add_linker_script(hello_serial_enc "0x20000000" "448k")
# sign, hash, and encrypt
pico_sign_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/private.pem)
pico_hash_binary(hello_serial_enc)
pico_encrypt_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin)
pico_encrypt_binary(hello_serial_enc ${CMAKE_CURRENT_LIST_DIR}/privateaes.bin ${CMAKE_CURRENT_LIST_DIR}/ivsalt.bin)

# package uf2 in flash
pico_package_uf2_output(hello_serial_enc 0x10000000)
Expand Down
1 change: 1 addition & 0 deletions bootloaders/encrypted/ivsalt.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
���x��%�^��=T�Č
3 changes: 2 additions & 1 deletion bootloaders/encrypted/otp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"OTP_DATA_KEY1" : [ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 ],
"OTP_DATA_KEY1_VALID" : "0x010101",
"PAGE30_LOCK0" : "0x494949"
"PAGE30_LOCK0" : "0x494949",
"PAGE31_LOCK0" : "0x494949"
}
1 change: 1 addition & 0 deletions encrypted/hello_encrypted/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pico_sign_binary(hello_encrypted ${CMAKE_CURRENT_LIST_DIR}/private.pem)
pico_hash_binary(hello_encrypted)
pico_encrypt_binary(hello_encrypted
${CMAKE_CURRENT_LIST_DIR}/privateaes.bin
${CMAKE_CURRENT_LIST_DIR}/ivsalt.bin
EMBED
OTP_KEY_PAGE 29)

Expand Down
1 change: 1 addition & 0 deletions encrypted/hello_encrypted/ivsalt.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
���x��%�^��=T�Č
3 changes: 2 additions & 1 deletion encrypted/hello_encrypted/otp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"OTP_DATA_KEY1" : [ 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7 ],
"OTP_DATA_KEY1_VALID" : "0x010101",
"PAGE29_LOCK0" : "0x494949"
"PAGE29_LOCK0" : "0x494949",
"PAGE30_LOCK0" : "0x494949"
}

0 comments on commit da97d36

Please sign in to comment.