# cryptokit

Guides Swift cryptography work with Apple CryptoKit for hashes, encryption, signatures, and key exchange.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3200 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/cryptokit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/cryptokit

## What it does

This skill steers an agent toward Apple CryptoKit when editing Swift cryptography code. It covers SHA-2 and SHA-3 hashing, HMAC, AES-GCM, ChaChaPoly, P256, P384, P521 and Curve25519 signatures, plus ECDH, HPKE, ML-KEM, X-Wing, Secure Enclave keys, and CommonCrypto migration.

Its guidance includes one-shot and incremental hashes, HMAC verification, authenticated encryption with additional data, signing, and HKDF-based symmetric key derivation. For new Swift 6.3+ primitive code, it recommends CryptoKit over CommonCrypto and lower-level Security APIs.

Core primitives start at iOS 13+, while HPKE needs iOS 17+ and SHA-3 or post-quantum APIs need iOS 26+. That makes the deployment target a release blocker for those features.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill cryptokit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/cryptokit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/cryptokit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill cryptokit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/cryptokit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill cryptokit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/cryptokit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills cryptokit
```

2. **Manually: put the files in place**
- File: `.github/skills/cryptokit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill cryptokit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/cryptokit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/cryptokit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill cryptokit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/cryptokit/SKILL.md

## When to use it
- hash Swift data with SHA-256
- verify an HMAC without manual comparisons
- encrypt a message with AES-GCM
- sign data with a P256 key
- migrate CommonCrypto primitive code

## Example prompts
- "Write Swift code that hashes a file incrementally with CryptoKit."
- "Add AES-GCM encryption with authenticated data to this Swift code."
- "Show P256 ECDH key agreement and derive a key with HKDF."

## Similar
- [swiftdata-pro](https://affpapa.org/en/nevibecode/skills/swiftdata-pro.md) — skill · 9300 installs
- [cmux-architecture](https://affpapa.org/en/nevibecode/skills/cmux-architecture.md) — skill · 4900 installs
- [swiftui-patterns](https://affpapa.org/en/nevibecode/skills/affaan-m-swiftui-patterns.md) — skill · 4600 installs
- [swift-expert](https://affpapa.org/en/nevibecode/skills/swift-expert.md) — skill · 4100 installs
- [spm-build-analysis](https://affpapa.org/en/nevibecode/skills/spm-build-analysis.md) — skill · 3400 installs
- [xcode-compilation-analyzer](https://affpapa.org/en/nevibecode/skills/xcode-compilation-analyzer.md) — skill · 3400 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
