1

I created a assymetric EC key pair in secure enclave (). The public key of the key pair will be sent to my backend service which then uses it to encrypt the data (kSecKeyAlgorithmECIESEncryptionCofactorX963SHA512AESGCM). The encrypted data will be sent to the iOS device inorder to decrypt using the private key in the secure enclave.

I need to know the exact options for my ECIES algorthm which I should use it in my backend service.

  1. What is the Curve name ?
  2. Cofactor to be used?
  3. What is AES-GCM key size and block size?
  4. What should be the format of the encrypted data ?
  5. What is the tag 16 bytes supposed to be?
李哲源
  • 59,090
  • 15
  • 146
  • 206

1 Answers1

2
  1. Curve used is kSecp256r1
  2. Cofactor - 1
  3. AES-GCM key Size 128 bits
  4. Encrypted Data format [Uncompressed Ephemeral Public Key (65 bytes)][Encrypted Data (length of raw data)][Tag (16 bytes)]
  5. AES GCM enryption's Tag