cryptokitlisted
Install: claude install-skill thienqo/ios-skills
# CryptoKit
Apple CryptoKit provides a Swift-native API for cryptographic operations:
hashing, message authentication, symmetric encryption, public-key signing,
key agreement, HPKE, quantum-secure key encapsulation/signing, and Secure
Enclave-backed keys. Most core primitives are available on iOS 13+; check
availability for HPKE (iOS 17+) and SHA-3 / post-quantum APIs (iOS 26+).
Prefer CryptoKit over CommonCrypto or raw Security framework APIs for new
cryptographic primitive code targeting Swift 6.3+.
## Contents
- [Workflow](#workflow)
- [Route by Task](#route-by-task)
- [Core Decisions](#core-decisions)
- [Common Mistakes](#common-mistakes)
- [Review Checklist](#review-checklist)
- [References](#references)
## Workflow
1. Define the security property: hashing, authentication, authenticated encryption, signing, key agreement, or envelope encryption.
2. Choose a current CryptoKit primitive and verify platform/peer interoperability before designing storage formats.
3. Define key generation, persistence, rotation, access control, serialization, and deletion as one lifecycle.
4. Bind context with authenticated data or a KDF and make nonce/sequence ownership impossible to reuse accidentally.
5. Verify round trips, tampering, wrong keys, malformed inputs, rotation, Secure Enclave availability, and cross-platform vectors.
## Route by Task
- Read [core implementation details](references/core-implementation.md) for hashes, HMAC, AEAD, signatures, key agreement, HPKE, post-quan