Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)35k · #8038

implementing-envelope-encryption-with-aws-kms

Fungsinya

Alat ini membantu Anda melindungi data penting. Alat ini menggunakan kunci rahasia untuk mengenkripsi data Anda dan kunci utama (master key) untuk melindungi kunci rahasia tersebut, sehingga lebih aman untuk menyimpan banyak file atau file berukuran besar di cloud.

Kapan dipakai

  • ✓Saat merencanakan cara melindungi banyak file di cloud.
  • ✓Saat perlu mengikuti aturan keamanan tertentu.
  • ✓Saat membangun atau meningkatkan keamanan sistem.

Link skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-envelope-encryption-with-aws-kms/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-envelope-encryption-with-aws-kms/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit →

Contoh permintaan ke AI

“Bagaimana cara menggunakan teknik ini untuk melindungi dokumen penting saya di cloud?”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Pertama, kunci sementara dibuat untuk mengenkripsi data Anda secara lokal. Kemudian, kunci sementara ini dilindungi oleh kunci utama yang disimpan oleh AWS. Untuk membaca data, prosesnya dibalik.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Implementing Envelope Encryption with AWS KMS

Overview

Envelope encryption is a strategy where data is encrypted with a data encryption key (DEK), and the DEK itself is encrypted with a master key (KEK) managed by AWS KMS. This approach allows encrypting large volumes of data locally while keeping the master key secure in a hardware security module (HSM) managed by AWS. This skill covers implementing envelope encryption using AWS KMS GenerateDataKey API.

When to Use

  • When deploying or configuring implementing envelope encryption with aws kms 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

  • Understand the envelope encryption pattern and its advantages
  • Generate data encryption keys using AWS KMS GenerateDataKey
  • Encrypt/decrypt data locally using DEKs
  • Store encrypted DEK alongside ciphertext
  • Implement key caching to reduce KMS API calls
  • Handle key rotation with automatic re-encryption
  • Implement multi-region encryption for disaster recovery

Key Concepts

Envelope Encryption Flow

  1. Call kms:GenerateDataKey to get plaintext DEK + encrypted DEK
  2. Use plaintext DEK to encrypt data locally (AES-256-GCM)
  3. Store encrypted DEK alongside ciphertext
  4. Discard plaintext DEK from memory
  5. For decryption: call kms:Decrypt on encrypted DEK, then decrypt data

Advantages Over Direct KMS Encryption

Aspect Direct KMS Envelope Encryption
Max data size 4 KB Unlimited
Latency Network round-trip per operation Local encryption
Cost $0.03/10,000 requests Fewer KMS requests
Offline Not possible Yes (with cached DEKs)

KMS Key Types

  • AWS Managed: AWS creates and manages (aws/s3, aws/ebs)
  • Customer Managed: You create and manage policies
  • Custom Key Store: Backed by CloudHSM cluster

Security Considerations

  • Never store plaintext DEK; only keep encrypted DEK
  • Use key policies to restrict who can call GenerateDataKey and Decrypt
  • Enable AWS CloudTrail logging for all KMS API calls
  • Implement key rotation (automatic annual rotation for CMKs)
  • Use encryption context for authenticated encryption metadata
  • Handle KMS throttling with exponential backoff

Validation Criteria

  • GenerateDataKey returns plaintext and encrypted DEK
  • Data encrypts correctly with plaintext DEK using AES-256-GCM
  • Encrypted DEK can be decrypted via KMS Decrypt API
  • Decrypted DEK recovers the original data
  • Plaintext DEK is wiped from memory after use
  • Encryption context is validated during decryption
  • Key rotation re-encrypts DEKs with new master key
Pertanyaan umum

Apa perbedaan antara mengenkripsi langsung dengan AWS dan menggunakan teknik ini?

Enkripsi langsung terbatas untuk file kecil dan lebih lambat. Teknik ini memungkinkan enkripsi file besar lebih cepat dan murah karena membutuhkan lebih sedikit panggilan ke AWS.

Apakah teknik ini bisa digunakan untuk file yang sangat besar?

Ya, teknik ini ideal untuk mengenkripsi data dalam jumlah besar, karena enkripsi utama dilakukan secara lokal, tanpa batasan ukuran seperti panggilan langsung ke AWS.

Apakah aman menyimpan kunci utama?

Ya, kunci utama dikelola oleh AWS di lingkungan yang aman (HSM), dan Anda mengontrol siapa yang boleh menggunakannya melalui kebijakan akses.

Detail

Deskripsi asli dari pembuat

Implements envelope encryption with AWS KMS, encrypting data locally with a data encryption key (DEK) and protecting that DEK with a KMS-managed key (KEK), covering the encrypt/decrypt flow, KMS key types, and security validation criteria. Use when designing key management for encrypting large or numerous data objects on AWS, or when reducing direct KMS API call volume.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularitas

Bintang GitHub
35k
Peringkat
#8038
Lisensi
Apache-2.0
Diperbarui
31/8/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa