1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-07 14:00:57 +00:00

fixup! feat(core): introduce storage insecure mode

This commit is contained in:
matejcik 2024-11-28 11:30:17 +01:00
parent eca810e159
commit 745893f9e0
2 changed files with 12 additions and 1 deletions

View File

@ -87,7 +87,6 @@ const uint32_t V0_PIN_EMPTY = 1;
#define MAX_WIPE_CODE_LEN 50
#if STORAGE_INSECURE_TESTING_MODE && !PRODUCTION
#pragma message("STORAGE IS INSECURE DO NOT USE THIS IN PRODUCTION")
#define PIN_ITER_COUNT 1
#else
// The total number of iterations to use in PBKDF2.

View File

@ -2,3 +2,15 @@
#include <stdint.h>
uint32_t hamming_weight(uint32_t value);
#ifndef STORAGE_INSECURE_TESTING_MODE
#define STORAGE_INSECURE_TESTING_MODE 0
#endif
#if STORAGE_INSECURE_TESTING_MODE
#if PRODUCTION
#error "STORAGE_INSECURE_TESTING_MODE can't be used in production"
#else
#pragma message("STORAGE IS INSECURE DO NOT USE THIS IN PRODUCTION")
#endif
#endif