security – What is eciesEncryptionCofactorVariableIVX963SHA512AESGCM in iOS SecKeyCreateEncryptedData?


I am looking at this answer:

https://stackoverflow.com/a/53807793/1634905

When using Elliptic Curve key pair, it has the following:

private let keyType = kSecAttrKeyTypeECSECPrimeRandom // kSecAttrKeyTypeECSECPrimeRandom
private let algorithm = SecKeyAlgorithm.eciesEncryptionCofactorVariableIVX963SHA512AESGCM
private let keySize = 384

The algorithm is used in the SecKeyCreateEncryptedData function.

What is eciesEncryptionCofactorVariableIVX963SHA512AESGCM here?

Apple’s doc doesn’t explain it much:

https://developer.apple.com/documentation/security/seckeyalgorithm/2874226-eciesencryptioncofactorvariablei

I see there are other possible options such as eciesEncryptionCofactorVariableIVX963SHA384AESGCM. Why did that SO answer pick the one with SHA512 when it picked 384 as the keySize?

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img