implementing-rsa-key-pair-management
Skill này làm gì
Công cụ này tạo và quản lý các cặp khóa mật mã RSA an toàn. Nó bảo đảm khóa của bạn đủ mạnh, được bảo vệ bằng mật khẩu và được lưu trữ đúng cách theo các thực hành bảo mật tốt nhất.
Khi nào nên dùng
- ✓Khi tạo khóa mới để bảo vệ thông tin.
- ✓Khi thay thế khóa cũ bằng khóa mới, an toàn hơn.
- ✓Khi kiểm tra xem khóa hiện tại có đáp ứng tiêu chuẩn bảo mật hay không.
Liên kết skill
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-rsa-key-pair-management/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy tạo một cặp khóa RSA 3072-bit, bảo vệ khóa riêng bằng mật khẩu mạnh và lưu theo định dạng PEM.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Công cụ dùng phương pháp RSA để tạo một cặp khóa (một công khai, một riêng tư). Nó bảo đảm khóa riêng được bảo vệ bằng mật khẩu và kích thước khóa đủ phù hợp để bảo mật.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Khóa RSA là gì?
Chúng giống như ổ khóa và chìa khóa số. Một khóa (công khai) có thể chia sẻ để mã hóa thông điệp mà chỉ khóa kia (riêng tư) mới giải mã được, hoặc để ký số lên tài liệu.
Vì sao kích thước khóa quan trọng?
Khóa lớn hơn khó bị phá hơn. Nên dùng khóa ít nhất 3072 bit để đảm bảo an toàn trước các cuộc tấn công.
“Lưu trữ bằng mật khẩu” nghĩa là gì?
Nghĩa là khóa riêng tư (quan trọng nhất) được bảo vệ bằng mật khẩu. Không có mật khẩu, không ai dùng được khóa riêng tư, ngay cả khi họ tìm thấy nó.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 35k
- Vị trí xếp hạng
- #8108
- Giấy phép
- Apache-2.0
- Cập nhật
- 31/8/2026
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
writing-skills
311kDạy agent của bạn viết skill mới và kiểm thử từng skill trước, kiểm tra xem skill có thực sự thay đổi cách agent hành xử hay không.
writing-for-agents
310kGiải thích cách viết hướng dẫn rõ ràng cho agent AI, gồm skill, tệp AGENTS.md và CLAUDE.md, để agent cư xử nhất quán.
bengali-nlp
280kGiúp agent của bạn xử lý văn bản tiếng Bengali, hỗ trợ hiểu ngôn ngữ này, chuẩn hóa văn bản và xử lý các đặc điểm riêng của nó.