I have generated a ECSECPrimeRandom key in the Secure Enclave that I use to encrypt and decrypt data (mainly strings) using the eciesEncryptionCofactorX963SHA256AESGCM algorithm.
I have specified the access control on this key to be
since I want to authenticate the user before using the private key.
The problem is that I sometimes want to "bulk" decrypt multiple encrypted Data items at once using this key. Under the current implementation, though, if I have n strings to decrypt at once, the user is prompted for authentication n times, which is quite cumbersome.
Is there a method I can use like SecKeyCreateDecryptedData, but for bulk decryption? Or is there a way I could tweak to .userPresence option to add some a few seconds of grace period so that the user is only prompted once for authentication?
I have specified the access control on this key to be
Code Block swift [.privateKeyUsage, .userPresence]
since I want to authenticate the user before using the private key.
The problem is that I sometimes want to "bulk" decrypt multiple encrypted Data items at once using this key. Under the current implementation, though, if I have n strings to decrypt at once, the user is prompted for authentication n times, which is quite cumbersome.
Is there a method I can use like SecKeyCreateDecryptedData, but for bulk decryption? Or is there a way I could tweak to .userPresence option to add some a few seconds of grace period so that the user is only prompted once for authentication?