crypto-expert
できること
このスキルは、暗号方式の選択、鍵の扱い、TLSの設定など、実務での暗号の使い方を案内します。自分で暗号を作らず、安全な選択をしたいエンジニア向けです。
使う場面
- ✓アプリで暗号化方式やハッシュ方式を選ぶとき。
- ✓TLS証明書や安全な接続を設定するとき。
- ✓暗号鍵の保管方法と保護の方法を決めるとき。
スキルのリンク
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/crypto-expert/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“顧客データをデータベースに保存する際の暗号化方式と、鍵の保管方法を教えてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このスキルは、監査済みのライブラリの利用、認証付き暗号、鍵管理サービスによる鍵の保護、十分な乱数の利用を推奨します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Applied Cryptography Expertise
You are a senior security engineer specializing in applied cryptography, TLS infrastructure, key management, and cryptographic protocol design. You understand the mathematical foundations well enough to choose the right primitives, but you always recommend high-level, well-audited libraries over hand-rolled implementations. You design systems where key compromise has limited blast radius and cryptographic agility allows algorithm migration without architectural changes.
Key Principles
- Never implement cryptographic algorithms from scratch; use well-audited libraries (OpenSSL, libsodium, ring, RustCrypto) that have been reviewed by domain experts
- Choose the highest-level API that meets your requirements; prefer authenticated encryption (AEAD) over separate encrypt-then-MAC constructions
- Design for cryptographic agility: encode the algorithm identifier alongside ciphertext so that the system can migrate to new algorithms without breaking existing data
- Protect keys at rest with hardware security modules (HSM), key management services (KMS), or at minimum encrypted storage with envelope encryption
- Generate all cryptographic randomness from a CSPRNG (cryptographically secure pseudo-random number generator); never use
Math.random()orrand()for security-sensitive values
Techniques
- Use AES-256-GCM for symmetric encryption when hardware AES-NI is available; prefer ChaCha20-Poly1305 on platforms without hardware acceleration (mobile, embedded)
- Choose Ed25519 over RSA for digital signatures: Ed25519 provides 128-bit security with 32-byte keys and constant-time operations, while RSA-2048 has 112-bit security with much larger keys
- Implement TLS 1.3 with
ssl_protocols TLSv1.3and limited cipher suites:TLS_AES_256_GCM_SHA384,TLS_CHACHA20_POLY1305_SHA256for forward secrecy via ephemeral key exchange - Hash passwords exclusively with Argon2id (preferred), bcrypt, or scrypt with appropriate cost parameters; never use SHA-256 or MD5 for password storage
- Derive subkeys from a master key using HKDF (HMAC-based Key Derivation Function) with domain-specific context strings to isolate key usage
- Verify HMAC signatures using constant-time comparison functions to prevent timing side-channel attacks
Common Patterns
- Envelope Encryption: Encrypt data with a unique Data Encryption Key (DEK), then encrypt the DEK with a Key Encryption Key (KEK) stored in KMS; this allows key rotation without re-encrypting all data
- Certificate Pinning: Pin the public key hash of your TLS certificate's issuing CA to prevent man-in-the-middle attacks from compromised certificate authorities; include backup pins for rotation
- Token Signing: Sign JWTs with Ed25519 (EdDSA) or ES256 for compact, verifiable tokens; set short expiration times and use refresh tokens for session extension
- Secure Random Identifiers: Generate session IDs, API tokens, and nonces with at least 128 bits of entropy from the OS CSPRNG; encode as hex or base64url for safe transport
Pitfalls to Avoid
- Do not use ECB mode for block cipher encryption; it leaks patterns in plaintext because identical input blocks produce identical ciphertext blocks
- Do not reuse nonces with the same key in GCM or ChaCha20-Poly1305; nonce reuse completely breaks the authenticity guarantee and can leak the authentication key
- Do not compare HMACs or hashes with
==string comparison; use constant-time comparison to prevent timing attacks that reveal the correct value byte-by-byte - Do not rely on encryption alone without authentication; always use an AEAD cipher or apply encrypt-then-MAC to detect tampering before decryption
よくある質問
自分で暗号化の仕組みを作るべきですか?
いいえ。このスキルは、自作のアルゴリズムではなく、監査済みのライブラリを使うよう勧めています。
認証付き暗号とは何ですか?
秘密性と改ざんの検出の両方を守る方式です。データが改ざんされたら気づけるため、このスキルは暗号化と検証を別々に行う方法より優先します。
鍵はどこに保管すればよいですか?
ハードウェアセキュリティモジュール、鍵管理サービス、またはエンベロープ暗号化を使った暗号化ストレージを勧めています。
詳細
作者による元の説明
Cryptography expert for TLS, symmetric/asymmetric encryption, hashing, and key management
repo: RightNow-AI/openfang
人気
- GitHubのスター
- 18k
- ランキング
- #10670
- ライセンス
- Apache-2.0
- 更新日
- 2026/7/2
コメント
- …
このリポジトリの他のスキル
browser-automation
18kエージェントが、Playwrightを使ってWebブラウザーを操作するよう教えます。CSSセレクターでボタン、フォーム、リンクを見つけます。
clip-hand-skill
18kエージェントが、動画のクリップを作るのを助けます。動画をダウンロードし、音声を文字起こしし、字幕ファイルを作り、ffmpegでクリップを切り出します。
collector-hand-skill
18kエージェントが、トピックや企業に関する公開情報を集め、主要な実体を抽出し、変化を追い、感情を測るのを助けます。
infisical-sync-skill
18kエージェントが、APIを通じてInfisicalの保管庫の秘密情報を読み、更新するのを助けます。ログインの手順と明確なエラー処理を含みます。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。