연관 데이터로 암호화 인증 (AEAD) 기본은 데이터 암호화에 가장 일반적인 기본이며 대부분의 요구사항에 적합합니다.
AEAD에는 다음과 같은 속성이 있습니다.
Secrecy: 길이를 제외하고는 일반 텍스트에 관한 정보는 아무것도 알려지지 않습니다.
신뢰성: 감지되지 않고는 암호문의 기본이 되는 암호화된 일반 텍스트를 변경할 수 없습니다.
대칭: 일반 텍스트를 암호화하고 암호문을 복호화하는 데 동일한 키가 사용됩니다.
무작위 순서 지정: 암호화가 무작위로 지정됩니다. 평문이 동일한 두 메시지는 서로 다른 암호문을 생성합니다. 공격자는 어떤 암호문이 특정 일반 텍스트에 해당하는지 알 수 없습니다. 이를 방지하려면 대신 결정론적 AEAD를 사용하세요.
관련 데이터
AEAD는 암호문을 특정 연결된 데이터에 연결하는 데 사용할 수 있습니다. user-id 및 encrypted-medical-history 필드가 있는 데이터베이스가 있다고 가정해 보겠습니다. 이 시나리오에서는 encrypted-medical-history를 암호화할 때 user-id를 연결된 데이터로 사용할 수 있습니다. 이렇게 하면 공격자가 한 사용자의 의료 기록을 다른 사용자로 이동할 수 없습니다.
키 유형 선택
대부분의 용도에는 AES128_GCM을 사용하는 것이 좋지만, 다양한 요구사항에 맞는 다양한 키 유형이 있습니다 (256비트 보안의 경우 아래에서 AES128을 AES256으로 대체하세요).
일반적으로 다음과 같습니다.
16바이트 초기화 벡터 (IV)가 있는 AES128_CTR_HMAC_SHA256은 경계가 확실한 가장 보수적인 모드입니다.
AES128_EAX는 AES128_CTR_HMAC_SHA256보다 약간 덜 보수적이며 약간 더 빠릅니다.
AES128_GCM은 일반적으로 가장 빠른 모드이며 메시지 수와 메시지 크기에 가장 엄격한 제한이 적용됩니다. 아래의 일반 텍스트 및 관련 데이터 길이에 대한 이러한 한도가 초과되면 AES128_GCM이 실패하고 키 재료가 유출됩니다.
AES128_GCM_SIV는 AES128_GCM과 거의 동일한 속도를 보입니다. 메시지 수 및 메시지 크기에 관한 AES128_GCM과 동일한 제한이 적용되지만 이러한 제한이 초과되면 덜 심각한 방식으로 실패합니다. 두 메시지가 동일하다는 사실만 유출될 수 있습니다. 따라서 AES128_GCM보다 안전하게 사용할 수 있지만 실제로는 널리 사용되지 않습니다.
Java에서 이를 사용하려면 Conscrypt를 설치해야 합니다.
XChaCha20Poly1305는 AES128_GCM보다 메시지 수 및 메시지 크기에 대한 제한이 훨씬 더 엄격하지만 실패할 경우 (매우 낮은 가능성) 키 재료도 유출됩니다. 하드웨어 가속이 제공되는 환경에서는 하드웨어 가속이 제공되지 않는 환경보다 AES 모드보다 느릴 수 있습니다.
보안 보장
AEAD 구현은 다음을 제공합니다.
CCA2 보안
인증 강도가 80비트 이상이어야 합니다.
총 250바이트의 메시지 232개 이상을 암호화하는 기능 선택된 평문 또는 선택된 암호문이 최대 232개인 공격의 성공 확률은 2-32보다 큽니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-04(UTC)"],[[["Authenticated Encryption with Associated Data (AEAD) is the recommended primitive for most data encryption needs, providing secrecy, authenticity, and randomization."],["AEAD utilizes the same key for encryption and decryption, and randomizes the encryption process for enhanced security, although deterministic options are available."],["While AES128_GCM is generally the fastest and recommended key type, other options like AES128_CTR_HMAC_SHA256, AES128_EAX, AES128_GCM_SIV, and XChaCha20Poly1305 cater to specific security and performance requirements."],["Associated data used in AEAD is authenticated but not encrypted, meaning it can be verified but is still visible."],["AEAD implementations provide strong security guarantees, including CCA2 security and at least 80-bit authentication strength, but do not guarantee the secrecy of associated data."]]],["AEAD, a common data encryption primitive, ensures secrecy, authenticity, and uses symmetric keys with randomized encryption. Associated data is authenticated but not encrypted and can link ciphertext to specific contexts, like user IDs. Various key types are available, with AES128_GCM recommended for most cases, offering speed but with strict limits. AES128_GCM_SIV is a safer, albeit less common, alternative. AEAD guarantees CCA2 security and 80-bit authentication strength, encrypting up to 2^32 messages with 2^50 total bytes.\n"]]