implementing-rsa-key-pair-management
できること
このツールは、安全な暗号鍵のペア(RSA)を作成し、管理します。鍵が十分に強固で、パスワードで保護され、正しく保管されるように、セキュリティのベストプラクティスに従います。
使う場面
- ✓情報を守るために新しい鍵を作成するとき。
- ✓古い鍵を、より安全な新しい鍵に置き換えるとき。
- ✓現在使っている鍵がセキュリティ基準を満たしているかを確認するとき。
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-rsa-key-pair-management/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“3072ビットのRSA鍵ペアを生成し、秘密鍵を強力なパスワードで保護して、PEM形式で保存してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、RSAという方式を使って鍵ペア(公開鍵と秘密鍵の2つ)を作成します。秘密鍵がパスワードで保護されていることを確認し、セキュリティに適したサイズの鍵であるかをチェックします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Implementing RSA Key Pair Management
Overview
RSA (Rivest-Shamir-Adleman) is the most widely deployed asymmetric cryptographic algorithm, used for digital signatures, key exchange, and encryption. This skill covers generating, storing, rotating, and managing RSA key pairs following NIST SP 800-57 key management guidelines, including key serialization formats (PEM, DER, PKCS#8), passphrase protection, and key strength validation.
When to Use
- When deploying or configuring implementing rsa key pair management capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Familiarity with cryptography concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Objectives
- Generate RSA key pairs with appropriate key sizes (2048, 3072, 4096 bits)
- Serialize keys in PEM and DER formats with PKCS#8
- Protect private keys with strong passphrase encryption
- Implement key rotation with versioning
- Extract public key components and fingerprints
- Validate key strength and detect weak keys
- Sign and verify data using RSA-PSS
Key Concepts
RSA Key Sizes and Security Strength
| Key Size (bits) | Security Strength (bits) | Recommended Until |
|---|---|---|
| 2048 | 112 | 2030 |
| 3072 | 128 | Beyond 2030 |
| 4096 | ~140 | Beyond 2030 |
RSA Padding Schemes
| Scheme | Use Case | Standard |
|---|---|---|
| OAEP | Encryption | PKCS#1 v2.2 (RFC 8017) |
| PSS | Signatures | PKCS#1 v2.2 (RFC 8017) |
| PKCS#1 v1.5 | Legacy only | Deprecated for new systems |
Key Storage Formats
- PEM: Base64-encoded with headers, human-readable
- DER: Binary ASN.1 encoding, compact
- PKCS#8: Standard for private key encapsulation
- PKCS#12/PFX: Bundled key + certificate, password-protected
Security Considerations
- Minimum 3072-bit keys for new deployments (NIST recommendation)
- Always protect private keys with AES-256-CBC passphrase encryption
- Use RSA-PSS for signatures (not PKCS#1 v1.5)
- Use RSA-OAEP for encryption (not PKCS#1 v1.5)
- Store private keys with restrictive file permissions (0600)
- Implement key rotation at least annually
Validation Criteria
- Key generation produces valid RSA key pair
- Public key can be extracted from private key
- Private key is protected with passphrase
- RSA-PSS signature verification succeeds
- Tampered signature verification fails
- Key fingerprint is computed correctly
- Key rotation maintains old key access for verification
よくある質問
RSA鍵とは何ですか?
デジタルの錠と鍵のようなものです。一方の鍵(公開鍵)は、もう一方の鍵(秘密鍵)でしか復号できないメッセージを暗号化するために共有できます。また、文書にデジタル署名するためにも使われます。
鍵のサイズはなぜ重要ですか?
鍵が大きいほど解読が難しくなります。良好なセキュリティを確保するために、少なくとも3072ビットの鍵を使うことが推奨されています。
「パスワードで保存する」とはどういう意味ですか?
最も重要な秘密鍵がパスワードで保護されることを意味します。パスワードがなければ、秘密鍵を見つけられたとしても、誰も使うことができません。
詳細
作者による元の説明
Generates, stores, rotates, and manages RSA key pairs following NIST SP 800-57 guidelines, covering serialization formats (PEM, DER, PKCS#8), passphrase protection, and key strength validation. Use when creating or rotating RSA keys for signatures, key exchange, or encryption, or when auditing existing keys for proper storage and NIST-compliant strength.
人気
- GitHubのスター
- 35k
- ランキング
- #8108
- ライセンス
- Apache-2.0
- 更新日
- 2026/8/31
コメント
- …
このリポジトリの他のスキル
abusing-dpapi-for-credential-access
35k特定のタスク向けに用意された指示をAIエージェントに与え、より良く、より速く作業できるようにします。
abusing-shadow-credentials-for-privesc
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
writing-skills
311k新しいスキルを書き、それぞれをまず試すようエージェントに教えます。そのスキルが実際にエージェントの動作を変えることを確認します。
writing-for-agents
310kスキル、AGENTS.md、CLAUDE.mdを含め、AIエージェントのための明確な指示の書き方を説明し、エージェントが予測可能に動くようにします。
bengali-nlp
280kエージェントがベンガル語のテキストを処理できるようにします。テキストの正規化など、ベンガル語特有の性質に対応しながら、言語を理解して扱えるようにします。