Select your use case to identify the correct primitive, then follow the link for
guidance on using the primitive.

## Encrypt data...

|   | Primitive | Details |
|---|---|---|
| [...in standard sizes](https://developers.google.com/tink/encrypt-data) | **Authenticated Encryption with Associated Data (AEAD)** | - Suitable for most needs - Accepts plaintexts up to 2^32^ bytes - Provides plaintext confidentiality and verifies integrity and authenticity |
| [...in large files or data streams](https://developers.google.com/tink/encrypt-large-files-or-data-streams) | **Streaming AEAD** | - For data that is too large to be processed in a single step |
| [...deterministically](https://developers.google.com/tink/deterministic-encryption) | **Deterministic AEAD** | - Produces same ciphertext for a given plaintext and key |
| [...with keys protected by a KMS](https://developers.google.com/tink/client-side-encryption) | **Key Management System (KMS) Envelope AEAD** | - Encrypts every plaintext with new AEAD key - Encrypts every AEAD key with KMS |
| [...with public key, decrypt data with private key](https://developers.google.com/tink/exchange-data) | **Hybrid Encryption** | - Not authenticated - Useful when senders cannot store secrets (private key) |

These primitives are all able to [bind ciphertext to its
context](https://developers.google.com/tink/bind-ciphertext).

## Ensure authenticity and integrity of data by...

|   | Primitive | Details |
|---|---|---|
| [...creating and verifying MAC with one key](https://developers.google.com/tink/protect-data-from-tampering) | **Message Authentication Code (MAC)** | - Very fast - Only verifiable by parties who can also create MACs |
| [...creating signature with private key, verifying with public key](https://developers.google.com/tink/digitally-sign-data) | **Digital Signature** | - Verifiable by parties who cannot create signatures |
| [...creating signature without sending the message to the signer](https://developers.google.com/tink/sign-data-remotely) | **Prehash / SignPrehash** | - For signing keys held in an HSM or KMS, or messages too large to send - Verifiable similar to **Digital Signature** |
| [...creating and verifying signatures on JWTs](https://developers.google.com/tink/create-jwts-signature) | **JSON Web Tokens (JWTs) with Signatures** | - Can additionally convert to / from JSON Web Key (JWK) format |

## Miscellany

|   | Primitive | Details |
|---|---|---|
| [Encrypt any primitive's keyset with a KMS](https://developers.google.com/tink/key-management-overview#encrypt_keyset) | **KMS-Encrypted Primitive** | - Doesn't require interacting with the KMS every time the primitive is used (e.g. to encrypt a plaintext), unlike [KMS Envelope AEAD](https://developers.google.com/tink/choose-primitive#encrypt_data) |

## Have a question?

Create an issue in the language-specific GitHub repository linked on the [Tink
organization page](https://github.com/tink-crypto).