Tink의 주요 개념 이해
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Tink를 처음 사용하는 경우, 여정을 시작하기 전에 알아야 할 몇 가지 주요 개념이 몇 가지 있습니다. 이러한 개념은 다음 섹션에 설명되어 있습니다.
프리미티브
Tink는 프리미티브를 기본 알고리즘을 관리하는 암호화 빌딩 블록으로 사용하여 사용자가 암호화 작업을 안전하게 수행할 수 있도록 합니다. 프리미티브는 암호화 알고리즘의 세부정보와 키 유형을 정의합니다.
Tink에서 지원하는 프리미티브:
- 관련 데이터를 사용한 인증 암호화 (AEAD): 데이터 암호화에 가장 일반적인 기본 요소로, 대부분의 암호화 요구사항에 적합합니다. AEAD는 일반 텍스트 기밀성을 제공하며 무결성과 진위성을 확인할 수 있게 해줍니다. 관련 데이터를 사용한 인증 암호화(AEAD)를 참조하세요.
- 확정적 암호화:지정된 일반 텍스트와 키에 대해 항상 동일한 암호문을 생성하는 프리미티브입니다. 공격자가 특정 일반 텍스트 입력에 해당하는 암호문만 식별하면 되기 때문에 이러한 공격은 위험할 수 있습니다. 확정적 AEAD를 참고하세요.
- 디지털 서명: 서명된 데이터의 신뢰성과 무결성을 확인하기 위한 비대칭 (비대칭 키 암호화 참고) 기본 요소입니다. 디지털 서명을 참고하세요.
- 하이브리드 암호화: 비대칭 키 암호화와 대칭 키 암호화를 결합하는 기본 요소입니다 (비대칭 키 암호화 및 대칭 키 암호화 참고). 하이브리드 암호화는 대칭 암호화의 효율성과 공개 키 암호화의 편의성을 결합합니다. 메시지를 암호화하기 위해 새로운 대칭 키가 생성되어 일반 텍스트 데이터를 암호화하는 데 사용되며, 수신자의 공개 키는 대칭 키 암호화에만 사용됩니다. 최종 암호문은 대칭 암호문과 암호화된 대칭 키로 구성됩니다. 하이브리드 암호화를 참조하세요.
- 메시지 인증 코드 (MAC): 데이터의 신뢰성과 무결성을 확인하기 위한 대칭 (대칭 키 암호화 참고) 프리미티브입니다. 메시지 인증 코드 (MAC)를 참조하세요.
- 스트리밍 AEAD: 스트리밍 데이터에 인증된 암호화를 제공하는 프리미티브로, 암호화할 데이터가 너무 커서 단일 단계로 처리할 수 없는 경우에 유용합니다. AEAD 스트리밍을 참고하세요.
호환성 정보는 언어별 지원되는 프리미티브를 참고하세요.
자세한 내용은 기본 설계를 참고하세요.
키 유형
키 유형은 특정 프리미티브를 구현합니다. 대부분의 프리미티브에는 보안, 런타임, 공간 요구사항에 따라 선택할 수 있는 여러 키 유형이 있습니다. 예를 들어 AES128_GCM은 대부분의 요구사항에 빠르고 효과적인 AEAD입니다. 자세한 내용은 언어별 지원되는 키 유형을 참고하세요.
키 세트 및 키 세트 핸들
Tink는 키 세트를 사용하여 키를 관리합니다. 키 세트는 기본적으로 키 순환을 용이하게 하는 키 집합입니다. 키 세트의 주목할 만한 속성은 다음과 같습니다.
- 키 세트의 각 키에는 키 세트 내에서 고유한 고유 ID가 있습니다. 이 ID는 일반적으로 생성된 각 암호문, 서명 또는 태그에 프리픽스로 추가되어 사용된 키를 나타냅니다 (자세한 내용은 Tink에서 암호문에 태그를 지정하는 방법 참고).
- 키 세트에서 한 번에 하나의 키만 기본 키입니다. 키 세트의 기본 키는 현재 '사용 중인' 키입니다.
- 키 세트의 모든 키는 반드시 동일한 프리미티브(예: AEAD)의 구현이어야 하지만 다른 키 유형 (예: AES-GCM 및 XCHACHA20-POLY1305 키)을 가질 수 있습니다.
각 Tink 구현은 키 세트를 만들거나 수정하는 API를 제공합니다. 하지만 CLI 도구인 Tinkey를 사용하는 것이 좋습니다.
사용자는 키 세트 핸들을 사용하여 키 세트에 대해 작동합니다. 키 세트 핸들은 실제 민감한 키 자료의 노출을 제한합니다. 또한 키 세트를 추상화하여 사용자가 전체 키 세트를 '래핑'하는 프리미티브를 얻을 수 있도록 합니다. 예를 들어 N
키를 사용하여 키 세트의 AEAD 프리미티브를 가져올 수 있습니다. 획득한 프리미티브를 사용한 암호화 및 복호화는 키 세트에 기본 키를 사용합니다.
자세한 내용은 키 세트 디자인을 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eTink utilizes primitives as fundamental cryptographic building blocks for secure data operations, covering encryption, signatures, and message authentication.\u003c/p\u003e\n"],["\u003cp\u003eKeysets in Tink efficiently manage multiple keys for a single purpose, enabling features like key rotation and supporting various key types within a set.\u003c/p\u003e\n"],["\u003cp\u003eKeyset handles provide a secure abstraction layer, allowing users to interact with keys and perform cryptographic operations without directly exposing sensitive key material.\u003c/p\u003e\n"],["\u003cp\u003eTink offers a diverse selection of primitives and key types, accommodating varying security, performance, and storage requirements, with options like AEAD, digital signatures, and hybrid encryption.\u003c/p\u003e\n"]]],["Tink employs cryptographic building blocks called *primitives*, which define algorithms and key types. These include AEAD, Deterministic encryption, Digital signature, Hybrid encryption, MAC, and Streaming AEAD. *Key types* implement primitives, offering choices based on security and performance. *Keysets*, a set of keys with unique IDs, manage key rotation. *Keyset handles* abstract keysets, providing access to a primitive that operates over the entire keyset, including encryption/decryption with the primary key.\n"],null,["# Understand Key Concepts in Tink\n\nWhen you start working with Tink for the first time, there are some key concepts\nyou should understand before you begin your journey; these are described in the\nfollowing sections.\n\nPrimitives\n----------\n\nTink uses *primitives* as cryptographic building blocks that manage an\nunderlying algorithm so users can perform cryptographic tasks safely. A\nprimitive defines the details of a cryptographic algorithm and the key type.\n\nPrimitives supported by Tink:\n\n- **Authenticated Encryption with Associated Data (AEAD)** : The most common primitive for data encryption; suitable for most encryption needs. AEAD provides plaintext confidentiality, and allows verification of its integrity and authenticity. See [Authenticated Encryption with Associated Data\n (AEAD)](/tink/aead).\n- **Deterministic encryption:** A primitive that always produces the same ciphertext for a given plaintext and key. This can be risky, because an attacker only needs to find out which ciphertext corresponds to a given plaintext input to identify it. See [Deterministic\n AEAD](/tink/deterministic-aead).\n- **Digital signature** : An asymmetric (see *Asymmetric key encryption* ) primitive for confirming the authenticity and integrity of signed data. See [Digital signature](/tink/digital-signature).\n- **Hybrid encryption** : A primitive that combines asymmetric key encryption and symmetric key encryption (see *Asymmetric key encryption* and *Symmetric\n key encryption* ). Hybrid encryption combines the efficiency of symmetric encryption with the convenience of public-key encryption. To encrypt a message, a fresh symmetric key is generated and used to encrypt the plaintext data, while the recipient's public key is used to encrypt the symmetric key only. The final ciphertext consists of the symmetric ciphertext and the encrypted symmetric key. See [Hybrid\n encryption](/tink/hybrid).\n- **Message Authentication Code (MAC)** : A symmetric (see *Symmetric key\n encryption* ) primitive for confirming the authenticity and integrity of data. See [Message Authentication Code (MAC)](/tink/mac).\n- **Streaming AEAD** : A primitive providing authenticated encryption for streaming data; useful when the data to be encrypted is too large to be processed in a single step. See [Streaming AEAD](/tink/streaming-aead).\n\nSee [Supported primitives by language](/tink/primitives-by-language) for\ncompatibility information.\n\nFor more info, see [primitive design](/tink/design/primitives_and_interfaces).\n\nKey types\n---------\n\nA *key type* implements a specific primitive. Most primitives have several key\ntypes to choose from depending on your requirements for security, runtime, and\nspace. For example, AES128_GCM is an [AEAD](/tink/aead) that is fast and\neffective for most needs. See more at [Supported key types by\nlanguage](/tink/supported-key-types).\n\nKeysets \\& keyset handles\n-------------------------\n\nTink uses *keysets* for managing keys. A keyset is essentially a set of keys\nthat facilitate key rotation. Noteworthy properties of a keyset are:\n\n- Each key in a keyset has a unique ID, which is unique within a keyset. This ID is usually added as a prefix to each produced ciphertext, signature or tag to indicate which key was used (see how Tink [tags\n ciphertexts](/tink/design/keysets#tagging_ciphertexts) for more info).\n- Only one key at a time in a keyset is *primary*. A primary key in a keyset is the key \"in use\" at the moment.\n- All the keys in a keyset *must* be implementations of the same primitive (such as AEAD), but can have different key types (for example, an AES-GCM and XCHACHA20-POLY1305 key).\n\nEach Tink implementation provides APIs to create or edit keysets. However, we\nrecommend using [Tinkey](/tink/tinkey-overview) our CLI tool.\n\nUsers operate over a keyset using *keyset handles* . A keyset handle limits the\nexposure of the actual sensitive key material. It also abstracts a keyset\nallowing users to obtain a primitive that \"wraps\" the entire keyset. For\nexample, you can get an AEAD primitive of a keyset with `N` keys; encryption and\ndecryption with the obtained primitive then uses the primary key in the keyset.\n\nFor more info, see [keyset design](/tink/design/keysets)."]]