{
  "skill_name": "cryptokit",
  "evals": [
    {
      "id": 1,
      "name": "hpke-recipient-encryption",
      "prompt": "Our iOS 17+ app needs to encrypt a series of diagnostic bundles to our server's Curve25519 public key. A teammate wrote their own ECDH plus HKDF plus AES-GCM scheme and declares the sender with let. The bundle ID should be tamper-proof but readable. What should we do instead?",
      "expected_output": "Recommends HPKE over the hand-rolled scheme on iOS 17+, declares HPKE.Sender and HPKE.Recipient as var because they are stateful, sends encapsulatedKey with the ciphertext, protects the bundle ID as authenticated data, and opens messages in the order they were sealed.",
      "files": [],
      "assertions": [
        "Prefers HPKE to a custom ECDH + HKDF + AEAD construction on iOS 17+",
        "Declares HPKE.Sender and HPKE.Recipient with var",
        "Transmits encapsulatedKey together with the ciphertext",
        "Uses authenticated data for the readable bundle ID",
        "Opens messages in the same order they were sealed"
      ]
    },
    {
      "id": 2,
      "name": "post-quantum-workflow",
      "prompt": "Security wants us to be quantum-ready. We support iOS 18 and later. Which CryptoKit APIs apply for key exchange, encryption to a recipient and signing, and can we keep all of it in the Secure Enclave?",
      "expected_output": "Uses the X-Wing HPKE ciphersuite XWingMLKEM768X25519_SHA256_AES_GCM_256, MLKEM768 or MLKEM1024 for key encapsulation, MLDSA65 or MLDSA87 for signatures, guards all of it with iOS 26 availability checks, and explains that classical Secure Enclave support is P256 only while iOS 26 adds Secure Enclave ML-KEM and ML-DSA on supported hardware.",
      "files": [],
      "assertions": [
        "Names the X-Wing HPKE ciphersuite for hybrid recipient encryption",
        "Names MLKEM768 and MLKEM1024 for key encapsulation",
        "Names MLDSA65 and MLDSA87 for signatures",
        "Guards the post-quantum APIs with iOS 26 availability checks for an iOS 18 target",
        "Separates classical Secure Enclave P256 support from iOS 26 Secure Enclave ML-KEM and ML-DSA"
      ]
    },
    {
      "id": 3,
      "name": "storage-boundary",
      "prompt": "We encrypt journal entries with AES-GCM and keep the SymmetricKey bytes in UserDefaults so the app can reload them. We also want Face ID to guard the key and a policy for rotating it when the user signs out. Review this and tell us what belongs in CryptoKit.",
      "expected_output": "Rejects storing key bytes in UserDefaults or files, keeps CryptoKit focused on AES-GCM, nonces, AAD and key material handling, routes Keychain queries, biometric access control and credential lifecycle to Keychain and swift-security guidance, and mentions export compliance.",
      "files": [],
      "assertions": [
        "Rejects UserDefaults and plain files for key storage",
        "Keeps the CryptoKit answer to AES-GCM, random nonces, AAD and key material",
        "Routes Keychain queries, access control and credential lifecycle to the Keychain or swift-security guidance",
        "Mentions export compliance (ITSAppUsesNonExemptEncryption)"
      ]
    }
  ]
}
