mirror of
https://github.com/stakwork/sphinx-key.git
synced 2025-12-18 15:54:31 +01:00
adds two layers of signature checks one done by sphinx-key in ota.rs via secp256k1 another done by esp-idf via espsecure.py see docs below: https://docs.espressif.com/projects/esptool/en/latest/esp32c3/espsecure/index.html#remote-signing-using-an-external-hsm https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/secure-boot-v2.html#signed-app-verification-without-hardware-secure-boot https://docs.rs/secp256k1/latest/secp256k1/
test control messages
cargo run --bin sphinx-key-tester -- --test --log
cd broker cargo run -- --test
cargo run --bin ctrl
sample cmd.json file
{
"Ota": {
"url": "http://192.168.86.21:12346/sphinx-update-",
"version": 0
}
}
sample .env file
SSID="foo"
PASS="bar"
BROKER="44.198.193.18:1883"
BROKER_URL="http://44.198.193.18:30000/api"
SEED=c7629e0f2edf1be66f01c0824022c5d30756ffa0f17213d2be463a458d200803
NONCE="0"
sample update server
cd into the directory where you placed the .bin file you want to send to the signers mini_httpd -p 12346 then use something like the cmd.json example above to tell signer about the update