This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2745R10-Q1:密钥库 — 在运行时擦除 PSA 密钥库区域或使其无效。

Guru**** 2979400 points

Other Parts Discussed in Thread: UNIFLASH

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1661830/cc2745r10-q1-keystore---erase-or-invalidate-the-psa-keystore-area-at-runtime

器件型号: CC2745R10-Q1
Thread 中讨论的其他器件: UNIFLASH

您好、

客户希望在运行时擦除 PSA 密钥库区域或使其无效。

请您提供帮助吗?

 

环境:  

我还想在运行时擦除 PSA 密钥库区域或使其无效。

密钥库位于地址 0xE6000 处。 为了进行测试、我创建了一个特殊的十六进制文件、其中仅包含从 0xE6000 到 0xE7FFF 的 0xFF 数据、目的是仅清除密钥库区域。

我首先尝试通过以下方式使用 CCS 对该十六进制文件进行编程:

调试接口-> View “Memory“->从文件导入数据

但是、导入文件后、CCS 无法再附加到器件。 看起来 CCS 擦除的闪存区域比预期更大、可能包括与 HSM 相关的闪存区域。

我也尝试使用 UniFlash 使用相同的方法、但发现了类似的问题。

您能否建议在运行时或调试期间仅擦除 PSA 密钥库闪存区域的正确且安全的方法?

 

多谢致以诚挚的问候

Marcus

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Marcus:

    这有一些选项可供选择。

    选项 1—删除特定密钥(生产时首选): 调用 psa_destroy_key(key_id) 每个持久密钥 ID。 需要知道应用程序使用的密钥 ID。

    选项 2 — 在运行时擦除整个 Keystore 区域(用于测试/恢复出厂设置): FlashEraseSector() 从 DriverLib 中使用。  在 psa_crypto_init() 调用之前调用它。 初始化后的擦除会使密钥库区域处于不一致的状态。 示例:

    /* Call before psa_crypto_init() */
    uint32_t addr = 0xE6000;
    while (addr < 0xE8000)
    {
        FlashEraseSector(addr);
        addr += FlashGetSectorSize();
    }

    Option 1 would be best if possible because it is safer due to it only affecting the keys they wish to destroy.

    The CCS/UniFlash issue is most likely due to the HSM region getting corrupted due to sectors overlapping. I would suggest using the flash erase sector approach instead.

    Give this a try and please let me know if there are any issues.

    此致、
    Josh Alderson