implementing-aes-encryption-for-data-at-rest
यह क्या करती है
यह टूल AES-256 GCM mode नाम के encryption तरीके से आपकी फ़ाइलों और डेटा को सुरक्षित रखने में मदद करता है। यह सुनिश्चित करता है कि आपका डेटा सुरक्षित रहे और उसमें किसी बिना इजाज़त बदलाव का पता चल सके।
कब इस्तेमाल करें
- ✓स्टोर किए गए डेटा की सुरक्षा के लिए setup करते समय।
- ✓यह सुनिश्चित करने के लिए कि आपके security तरीके compliance की ज़रूरतें पूरी करते हैं।
- ✓किसी मौजूदा सिस्टम की सुरक्षा की समीक्षा करते समय।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aes-encryption-for-data-at-rest/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं AES-256-GCM से 'secret_document.txt' नाम की फ़ाइल को पासवर्ड 'mypassword123' के साथ कैसे encrypt कर सकता हूं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
यह टूल मज़बूत encryption standard (AES-256-GCM) का इस्तेमाल करके आपके डेटा को scramble करता है। यह आपके पासवर्ड से एक secret key बनाता है, हर encryption के लिए एक अलग नंबर (nonce) इस्तेमाल करता है, और एक tag जोड़ता है ताकि पता चले कि डेटा से छेड़छाड़ तो नहीं हुई।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Implementing AES Encryption for Data at Rest
Overview
AES (Advanced Encryption Standard) is a symmetric block cipher standardized by NIST (FIPS 197) used to protect classified and sensitive data. This skill covers implementing AES-256 encryption in GCM mode for encrypting files and data stores at rest, including proper key derivation, IV/nonce management, and authenticated encryption.
When to Use
- When deploying or configuring implementing aes encryption for data at rest 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
- Implement AES-256-GCM encryption and decryption for files
- Derive encryption keys from passwords using PBKDF2 and Argon2
- Manage initialization vectors (IVs) and nonces securely
- Encrypt and decrypt entire directory trees
- Implement authenticated encryption to detect tampering
- Handle large files with streaming encryption
Key Concepts
AES Modes of Operation
| Mode | Authentication | Parallelizable | Use Case |
|---|---|---|---|
| GCM | Yes (AEAD) | Yes | Network data, file encryption |
| CBC | No | Decrypt only | Legacy systems, disk encryption |
| CTR | No | Yes | Streaming encryption |
| CCM | Yes (AEAD) | No | IoT, constrained environments |
Key Derivation
Never use raw passwords as encryption keys. Always derive keys using:
- PBKDF2: NIST-approved, widely supported (minimum 600,000 iterations as of 2024)
- Argon2id: Winner of Password Hashing Competition, memory-hard
- scrypt: Memory-hard, good alternative to Argon2
Nonce/IV Management
- GCM requires a 96-bit (12-byte) nonce that must NEVER be reused with the same key
- Generate nonces using
os.urandom()(CSPRNG) - Store nonce alongside ciphertext (it is not secret)
Workflow
- Install the
cryptographylibrary:pip install cryptography - Generate or derive an encryption key
- Create a random nonce for each encryption operation
- Encrypt data using AES-256-GCM with the key and nonce
- Store nonce + ciphertext + authentication tag together
- For decryption, extract nonce, verify tag, and decrypt
Encrypted File Format
[salt: 16 bytes][nonce: 12 bytes][ciphertext: variable][tag: 16 bytes]
Security Considerations
- Always use authenticated encryption (GCM, CCM) to prevent tampering
- Never reuse a nonce with the same key (catastrophic in GCM)
- Use at least 256-bit keys for long-term data protection
- Securely wipe keys from memory after use when possible
- Rotate encryption keys periodically per organizational policy
- For disk-level encryption, consider XTS mode (AES-XTS)
Validation Criteria
- AES-256-GCM encryption produces valid ciphertext
- Decryption recovers original plaintext exactly
- Authentication tag detects any ciphertext modification
- Key derivation uses sufficient iterations/parameters
- Nonces are never reused for the same key
- Large files (>1GB) can be processed via streaming
- Encrypted file format includes all necessary metadata
अक्सर पूछे जाने वाले सवाल
AES-256-GCM क्या है?
यह एक मज़बूत और आधुनिक encryption तरीका है, जो आपके डेटा की रक्षा करता है और यह भी जांचता है कि उसमें कोई बदलाव हुआ है या नहीं।
क्या मैं अपने पासवर्ड को सीधे key की तरह इस्तेमाल कर सकता हूं?
नहीं, कभी नहीं! यह टूल आपके पासवर्ड को PBKDF2 या Argon2id जैसे सुरक्षित तरीकों से एक मज़बूत encryption key में बदल देता है, ताकि सुरक्षा और बढ़े।
Nonce क्या है और यह क्यों ज़रूरी है?
Nonce एक ऐसा नंबर है जो सिर्फ़ एक बार इस्तेमाल होता है। GCM mode की सुरक्षा के लिए यह बहुत ज़रूरी है, क्योंकि उसी key के साथ इसे दोबारा इस्तेमाल करने से पूरी encryption कमज़ोर हो सकती है।
जानकारी
लेखक का मूल विवरण
Guides implementing AES-256 encryption in GCM mode (FIPS 197) for files and data stores at rest, covering key derivation, IV/nonce management, and authenticated encryption. Use when deploying or configuring encryption for data at rest, establishing controls to meet compliance requirements, or reviewing an implementation during a security assessment.
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #7981
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।