Posts

Post not yet marked as solved
3 Replies
588 Views
I'm not a cryptographer so please be patient with me :) I'm trying to figure out how the encryption/decryption happens in some of algorithms in SecKeyAlgorithm (for example kSecKeyAlgorithmECIESEncryptionCofactorVariableIVX963SHA256AESGCM). I'm trying to find the answers for these questions: Is the output of the encryption is publickey + ciphertext + tag? (in that respected order) Is the tag in 1) == authentication tag (someone said that is GCM tag instead and I don't know what is the different). What is the expected error throws from Apple API if the tag validation failed in the decryption process? As the input of AES-GCM is 4 params: the secret key, IV (nonce), plain message, additional authentication data (AAD), how can developer supply all the params in the API SecKeyCreateEncryptedData as it's signature is: CFDataRef _Nullable SecKeyCreateEncryptedData(SecKeyRef key, SecKeyAlgorithm algorithm, CFDataRef plaintext,                         CFErrorRef *error) Thank you very much for the help! Hieu.
Posted
by hieund910.
Last updated
.
Post marked as solved
2 Replies
482 Views
Hi, I can't find any document about the access sharing model of keychain items created by the Secure Enclave (follow this article: Storing Keys in the Secure Enclave - https://developer.apple.com/documentation/security/certificate_key_and_trust_services/keys/storing_keys_in_the_secure_enclave?language=objc ) My testing shows that it follows the iOS keychain sharing model (Sharing model on iOS) - https://developer.apple.com/documentation/security/keychain_services/keychain_items/sharing_access_to_keychain_items_among_a_collection_of_apps?language=objc for both iOS and MacOS. Can anyone confirm that theory is correct? Thank you.
Posted
by hieund910.
Last updated
.