Secure Memory For Swift Objects

后端 未结 2 857
广开言路
广开言路 2020-12-12 21:18

I am writing a swift application that requires handling private keys in memory. Because of the sensitivity of such objects, the keys need to be cleared (a.k.a. written to al

2条回答
  •  攒了一身酷
    2020-12-12 21:52

    I know this question is old but something for those who land here: since iOS 10 you can use Secure Enclave to store private keys securely. The way it works is that all the operations that require decryption is performed inside the Secure Enclave so you do not have to worry about runtime hooking of your classes or memory leaks.

    Take a look here: https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/storing_keys_in_the_secure_enclave

提交回复
热议问题