mirror of
https://github.com/mukul975/Anthropic-Cybersecurity-Skills.git
synced 2026-07-25 05:50:57 +03:00
Initial commit - 611 cybersecurity skills across all subdomains
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Standards and References - RSA Key Pair Management
|
||||
|
||||
## Primary Standards
|
||||
|
||||
### NIST FIPS 186-5 - Digital Signature Standard (DSS)
|
||||
- **URL**: https://csrc.nist.gov/publications/detail/fips/186/5/final
|
||||
- **Description**: Specifies RSA digital signature generation and verification
|
||||
- **RSA minimum**: 2048-bit keys
|
||||
|
||||
### RFC 8017 - PKCS #1: RSA Cryptography Specifications Version 2.2
|
||||
- **URL**: https://www.rfc-editor.org/rfc/rfc8017
|
||||
- **Description**: Defines RSA key formats, OAEP encryption, and PSS signatures
|
||||
- **Key operations**: RSAEP, RSADP, RSASP1, RSAVP1
|
||||
|
||||
### RFC 5958 - Asymmetric Key Packages (PKCS#8 v2)
|
||||
- **URL**: https://www.rfc-editor.org/rfc/rfc5958
|
||||
- **Description**: Private key information syntax for storage
|
||||
|
||||
### RFC 7468 - Textual Encodings of PKIX, PKCS, and CMS Structures
|
||||
- **URL**: https://www.rfc-editor.org/rfc/rfc7468
|
||||
- **Description**: PEM encoding format specification
|
||||
|
||||
### NIST SP 800-57 Part 1 Rev. 5 - Key Management
|
||||
- **URL**: https://csrc.nist.gov/publications/detail/sp/800-57-part-1/rev-5/final
|
||||
- **Description**: Key length recommendations and lifecycle management
|
||||
- **RSA 2048**: Acceptable through 2030
|
||||
- **RSA 3072+**: Recommended for beyond 2030
|
||||
|
||||
### NIST SP 800-131A Rev. 2 - Transitioning Cryptographic Algorithms
|
||||
- **URL**: https://csrc.nist.gov/publications/detail/sp/800-131a/rev-2/final
|
||||
- **Description**: Transition guidance for algorithm selection
|
||||
- **PKCS#1 v1.5 signatures**: Legacy use only
|
||||
- **RSA-PSS**: Recommended for all new applications
|
||||
|
||||
## Python Library References
|
||||
|
||||
### cryptography (pyca/cryptography)
|
||||
- **RSA Key Generation**: `cryptography.hazmat.primitives.asymmetric.rsa`
|
||||
- **Serialization**: `cryptography.hazmat.primitives.serialization`
|
||||
- **Signatures**: `cryptography.hazmat.primitives.asymmetric.padding`
|
||||
- **Documentation**: https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/
|
||||
@@ -0,0 +1,81 @@
|
||||
# Workflows - RSA Key Pair Management
|
||||
|
||||
## Workflow 1: Key Pair Generation
|
||||
|
||||
```
|
||||
[Select Key Size] (3072 or 4096 bits)
|
||||
|
|
||||
[Generate RSA Key Pair]
|
||||
(public_exponent=65537)
|
||||
|
|
||||
[Serialize Private Key]
|
||||
(PEM/PKCS#8 with AES-256-CBC passphrase)
|
||||
|
|
||||
[Extract and Serialize Public Key]
|
||||
(PEM/SubjectPublicKeyInfo)
|
||||
|
|
||||
[Compute Key Fingerprint]
|
||||
(SHA-256 of DER-encoded public key)
|
||||
|
|
||||
[Store Keys with Metadata]
|
||||
(key_id, creation_date, algorithm, size)
|
||||
```
|
||||
|
||||
## Workflow 2: Digital Signature (RSA-PSS)
|
||||
|
||||
```
|
||||
[Document/Data to Sign]
|
||||
|
|
||||
[Hash Data] (SHA-256)
|
||||
|
|
||||
[Load Private Key] (decrypt with passphrase)
|
||||
|
|
||||
[RSA-PSS Sign]
|
||||
(padding=PSS, mgf=MGF1(SHA256), salt_length=PSS.MAX_LENGTH)
|
||||
|
|
||||
[Output Signature] (DER or Base64)
|
||||
```
|
||||
|
||||
## Workflow 3: Signature Verification
|
||||
|
||||
```
|
||||
[Document + Signature + Public Key]
|
||||
|
|
||||
[Load Public Key]
|
||||
|
|
||||
[RSA-PSS Verify]
|
||||
(same padding parameters as signing)
|
||||
|
|
||||
[Valid?]
|
||||
YES --> Accept
|
||||
NO --> Reject (data or signature tampered)
|
||||
```
|
||||
|
||||
## Workflow 4: Key Rotation
|
||||
|
||||
```
|
||||
[Current Key Pair (version N)]
|
||||
|
|
||||
[Generate New Key Pair (version N+1)]
|
||||
|
|
||||
[Update Active Key Reference]
|
||||
|
|
||||
[Archive Old Key Pair]
|
||||
(mark as "decrypt/verify only")
|
||||
|
|
||||
[After Grace Period: Destroy Old Private Key]
|
||||
(keep public key for verification)
|
||||
```
|
||||
|
||||
## Workflow 5: RSA Encryption (OAEP)
|
||||
|
||||
```
|
||||
[Plaintext] (max size depends on key and padding)
|
||||
|
|
||||
[Load Recipient's Public Key]
|
||||
|
|
||||
[RSA-OAEP Encrypt]
|
||||
(padding=OAEP, mgf=MGF1(SHA256), algorithm=SHA256)
|
||||
|
|
||||
[Ciphertext]
|
||||
```
|
||||
Reference in New Issue
Block a user