What problem does it solve?
This Skill helps you implement modern, secure cryptographic operations in Swift without error-prone low-level APIs, so you can hash, authenticate, encrypt, and sign data reliably.
Core Features & Use Cases
- Hashing & Digest Handling: Compute SHA256/SHA384/SHA512 digests (one-shot or incremental) for integrity checks and deterministic fingerprints.
- Authentication with HMAC: Generate and verify HMAC authentication codes using constant-time validation.
- Authenticated Encryption: Encrypt and decrypt with integrity using AES-GCM or ChaChaPoly, including support for additional authenticated data (AAD).
- Signing & Key Agreement: Sign with P256/P384/P521 or Curve25519/Ed25519 and perform ECDH key agreement with HKDF-derived symmetric keys.
- Secure Enclave Key Storage: Back keys by the Secure Enclave for stronger protection and controlled access using biometric/passcode policies.
Quick Start
Use the cryptokit skill to create a SHA256 digest and verify it against an expected value for integrity checking of incoming data.