Home
last modified time | relevance | path

Searched refs:NVS_KEY_SIZE (Results 1 – 6 of 6) sorted by relevance

/hal_espressif-3.6.0/components/nvs_flash/src/
Dnvs_api.cpp589 for(uint8_t cnt = 0; cnt < NVS_KEY_SIZE; cnt++) { in nvs_flash_generate_keys()
605 err = esp_partition_write_raw(partition, 0, cfg->eky, NVS_KEY_SIZE); in nvs_flash_generate_keys()
611 err = esp_partition_write_raw(partition, NVS_KEY_SIZE, cfg->tky, NVS_KEY_SIZE); in nvs_flash_generate_keys()
616 err = esp_partition_read(partition, 0, cfg->eky, NVS_KEY_SIZE); in nvs_flash_generate_keys()
621 err = esp_partition_read(partition, NVS_KEY_SIZE, cfg->tky, NVS_KEY_SIZE); in nvs_flash_generate_keys()
626 uint32_t crc_calc = esp_rom_crc32_le(0xffffffff, cfg->eky, NVS_KEY_SIZE); in nvs_flash_generate_keys()
627 crc_calc = esp_rom_crc32_le(crc_calc, cfg->tky, NVS_KEY_SIZE); in nvs_flash_generate_keys()
633 err = esp_partition_write(partition, 2 * NVS_KEY_SIZE, crc_wr, sizeof(crc_wr)); in nvs_flash_generate_keys()
648 uint8_t eky_raw[NVS_KEY_SIZE], tky_raw[NVS_KEY_SIZE]; in nvs_flash_read_security_cfg()
653 while(cnt < NVS_KEY_SIZE && eky[cnt] == 0xff && tky[cnt] == 0xff) cnt++; in nvs_flash_read_security_cfg()
[all …]
Dnvs_encrypted_partition.cpp31 if (mbedtls_aes_xts_setkey_enc(&mEctxt, eky, 2 * NVS_KEY_SIZE * 8) != 0) { in init()
35 if (mbedtls_aes_xts_setkey_dec(&mDctxt, eky, 2 * NVS_KEY_SIZE * 8) != 0) { in init()
/hal_espressif-3.6.0/components/nvs_flash/include/
Dnvs_flash.h25 #define NVS_KEY_SIZE 32 // AES-256 macro
31 uint8_t eky[NVS_KEY_SIZE]; /*!< XTS encryption and decryption key*/
32 uint8_t tky[NVS_KEY_SIZE]; /*!< XTS tweak key */
/hal_espressif-3.6.0/components/nvs_flash/test_nvs_host/
Dtest_nvs_partition.cpp33 for(int count = 0; count < NVS_KEY_SIZE; count++) {
46 for(int count = 0; count < NVS_KEY_SIZE; count++) {
Dtest_nvs.cpp2932 uint8_t eky_hex[2 * NVS_KEY_SIZE];
2937 char eky[][2 * NVS_KEY_SIZE + 1] = {
2941 char tky[][2 * NVS_KEY_SIZE + 1] = {
2964 toHexStream(tky[cnt], &eky_hex[NVS_KEY_SIZE]);
2969 CHECK(!mbedtls_aes_xts_setkey_enc(ectx, eky_hex, 2 * NVS_KEY_SIZE * 8));
2970 CHECK(!mbedtls_aes_xts_setkey_enc(dctx, eky_hex, 2 * NVS_KEY_SIZE * 8));
2985 for(int count = 0; count < NVS_KEY_SIZE; count++) {
3080 for(int count = 0; count < NVS_KEY_SIZE; count++) {
3213 for(int count = 0; count < NVS_KEY_SIZE; count++) {
3280 for(int count = 0; count < NVS_KEY_SIZE; count++) {
[all …]
/hal_espressif-3.6.0/components/nvs_flash/test/
Dtest_nvs.c295 uint8_t eky_hex[2 * NVS_KEY_SIZE] = { 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,
325 TEST_ASSERT_TRUE(!mbedtls_aes_xts_setkey_enc(ectx, eky_hex, 2 * NVS_KEY_SIZE * 8));
326 TEST_ASSERT_TRUE(!mbedtls_aes_xts_setkey_enc(dctx, eky_hex, 2 * NVS_KEY_SIZE * 8));