Securely store:
Each element stored is associated with an ID that we plan to store in clear in a database (e.g.: Hive). It will be used to list all the seed phrases and private keys we have for example.
For a given private key ID or seed phrase ID, we can then retrieve the key stored securely using our secure storage.
Use the secure enclave when available, fallback to password protected storage.
See below for more example for the Secure Storage implementation.
Use biometric_storage if biometric authentication is available.
It stores data in an encrypted file using AES 256 GCM
If biometry is not available, fallback to password protected storage implementation.
Password protected storage.
Encrypt the private key using AES 256 with a password from the user.