title: ECC Curve25519 KeyChain
body: <p>I'm trying to create Curve25519 keys using the KeyChain on iOS. I am aware of the existence of CryptoKit, unfortunately, that is not available for iOS 12. Is there a way to create a Curve25519 key pre CryptoKit, maybe a parameter I'm missing when generating it in the KeyChain? The code below will only generate the P-256 keys.</p>
  <pre class="lang-swift prettyprint-override"><code>let attributes: [String: Any] = [
      String(kSecClass): kSecClassKey,
      String(kSecAttrKeyType): kSecAttrKeyTypeECSECPrimeRandom,
      String(kSecAttrKeySizeInBits): 256
  ]
  
  var error: Unmanaged&lt;CFError&gt;?
  let privateKey = SecKeyCreateRandomKey(attributes as CFDictionary, &amp;error)
  print(privateKey ?? error!.takeUnretainedValue())
  </code></pre>