본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)35k · #8038

implementing-envelope-encryption-with-aws-kms

하는 일

이 도구는 중요한 데이터를 보호하도록 돕습니다. 비밀 키로 데이터를 암호화하고, 마스터 키로 그 비밀 키를 보호합니다. 많은 파일이나 큰 파일을 클라우드에 저장할 때 더 안전합니다.

사용하는 경우

  • ✓클라우드에 있는 많은 파일을 보호하는 방법을 계획할 때.
  • ✓특정 보안 규칙을 준수해야 할 때.
  • ✓시스템 보안을 구축하거나 개선할 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-envelope-encryption-with-aws-kms/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 기술을 사용해 클라우드에 있는 제 중요한 문서를 보호하려면 어떻게 해야 하나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

먼저 데이터를 로컬에서 암호화할 임시 키를 만듭니다. 그다음 이 임시 키를 AWS가 보관하는 마스터 키로 보호합니다. 데이터를 읽을 때는 이 과정을 거꾸로 진행합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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
자주 묻는 질문

AWS로 직접 암호화하는 것과 이 기술의 차이는 무엇인가요?

직접 암호화는 작은 파일에 제한되고 느립니다. 이 기술은 AWS를 호출하는 횟수를 줄여 큰 파일을 더 빠르고 저렴하게 암호화할 수 있습니다.

아주 큰 파일에도 이 기술을 사용할 수 있나요?

네, 주된 암호화가 AWS 직접 호출의 크기 제한 없이 로컬에서 이루어지므로 대량의 데이터를 암호화하는 데 이상적입니다.

마스터 키를 보관해도 안전한가요?

네, 마스터 키는 안전한 환경(HSM)에서 AWS가 관리하며, 접근 정책으로 누가 사용할 수 있는지 통제할 수 있습니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
35k
순위
#8038
라이선스
Apache-2.0
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬