Zum Inhalt springen
Skillpedia
APIs & Server (Backend)35k · #7981

implementing-aes-encryption-for-data-at-rest

Was er macht

Dieses Tool hilft dir, deine Dateien und Daten mit der Verschlüsselungsmethode AES-256 im GCM-Modus zu schützen. So bleiben deine Daten sicher, und unautorisierte Änderungen werden erkannt.

Wann du ihn nutzt

  • ✓Wenn du Sicherheitsmaßnahmen einrichtest, um gespeicherte Daten zu schützen.
  • ✓Um sicherzustellen, dass deine Sicherheitspraktiken die Compliance-Anforderungen erfüllen.
  • ✓Wenn du die Sicherheit eines bestehenden Systems überprüfst.

Link zum Skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aes-encryption-for-data-at-rest/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-aes-encryption-for-data-at-rest/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Wie kann ich AES-256-GCM nutzen, um eine Datei namens 'secret_document.txt' mit dem Passwort 'mypassword123' zu verschlüsseln?”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Das Tool nutzt einen starken Verschlüsselungsstandard (AES-256-GCM), um deine Daten zu verschlüsseln. Es erzeugt aus einem Passwort einen geheimen Schlüssel, verwendet für jede Verschlüsselung eine einmalig genutzte Zahl (Nonce) und fügt einen Authentifizierungstag hinzu, der sicherstellt, dass die Daten nicht manipuliert wurden.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von 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

  1. Install the cryptography library: pip install cryptography
  2. Generate or derive an encryption key
  3. Create a random nonce for each encryption operation
  4. Encrypt data using AES-256-GCM with the key and nonce
  5. Store nonce + ciphertext + authentication tag together
  6. 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
Häufige Fragen

Was ist AES-256-GCM?

Das ist eine robuste und moderne Verschlüsselungsmethode, die deine Daten schützt und zugleich prüft, ob sie verändert wurden.

Kann ich mein Passwort direkt als Schlüssel verwenden?

Nein, auf keinen Fall! Das Tool wandelt dein Passwort mit sicheren Verfahren wie PBKDF2 oder Argon2id in einen starken Verschlüsselungsschlüssel um, für besseren Schutz.

Was ist eine Nonce und warum ist sie wichtig?

Eine Nonce ist eine Zahl, die nur einmal verwendet wird. Sie ist für die Sicherheit des GCM-Modus entscheidend, denn wenn du sie mit demselben Schlüssel wiederverwendest, kann die gesamte Verschlüsselung gefährdet sein.

Details

Originalbeschreibung des Autors

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.

repo: mukul975/Anthropic-Cybersecurity-Skills

Beliebtheit

GitHub-Sterne
35k
Platz im Ranking
#7981
Lizenz
Apache-2.0
Aktualisiert
31.8.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills