You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#include"presidio_security.h"voidapp_main(void)
{
// One call enables all Presidio hardeningESP_ERROR_CHECK(presidio_security_init());
ESP_LOGI("app", "Status: %s", presidio_security_status());
// ... your application code ...
}
3. Configure via menuconfig
idf.py menuconfig
# → Presidio Hardened ESP32
All features are enabled by default and can be individually toggled.
Side-by-Side: Plain ESP-IDF vs Presidio-Hardened
TLS Connection
Plain ESP-IDF
With Presidio
// No cipher restrictions — any suite accepted// No minimum TLS version enforced// Certificate verification optionalmbedtls_ssl_configconf;
mbedtls_ssl_config_init(&conf);
mbedtls_ssl_config_defaults(&conf, ...);
// Developer must manually configure// every security parameter
#include"presidio_tls.h"mbedtls_ssl_configconf;
mbedtls_ssl_config_init(&conf);
mbedtls_ssl_config_defaults(&conf, ...);
// One call: TLS 1.2+, AEAD only,// certs required, no renegotiationpresidio_tls_apply_hardening(&conf);
Storing Secrets in NVS
Plain ESP-IDF
With Presidio
// Passwords appear in plaintext in logs:// I (1234) app: Setting wifi_password = hunter2nvs_handle_th;
nvs_open("wifi", NVS_READWRITE, &h);
nvs_set_str(h, "wifi_password", "hunter2");
nvs_commit(h);
nvs_close(h);
#include"presidio_nvs.h"// Automatic redaction in logs:// I (1234) presidio_nvs: SET_STR [wifi]// wifi_password = ***REDACTED***presidio_nvs_handle_th;
presidio_nvs_open("wifi", &h);
presidio_nvs_set_str(h, "wifi_password",
"hunter2");
presidio_nvs_close(h);
// Developer never checks if secure boot// is actually enabled. Firmware ships// with unburned fuses — anyone can flash// a modified image.voidapp_main(void) {
start_application();
}
#include"presidio_boot.h"voidapp_main(void) {
presidio_boot_verify();
// Logs:// W (100) presidio_boot: Secure boot// is NOT enabled// W (100) presidio_boot: Flash// encryption is NOT enabledESP_LOGI(TAG, "%s",
presidio_boot_status_str());
// "secure_boot=OFF flash_enc=OFF ..."
}
Anomaly Detection
Plain ESP-IDF
With Presidio
// Auth failures silently ignored.// No rate limiting, no alerting.voidwifi_event_handler(...) {
if (event==WIFI_EVENT_STA_DISCONNECTED)
esp_wifi_connect(); // retry forever
}