Je veux lier le texte chiffré à son contexte
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Les modes de chiffrement modernes sont compatibles avec les données associées, qui sont authentifiées, mais pas chiffrées. Cela peut être utilisé pour lier un texte chiffré à un contexte spécifique.
Voici quelques exemples de liaison du texte chiffré aux données associées:
Chiffrer une base de données cellule par cellule (ou colonne par colonne) Cela garantit que le texte chiffré de la cellule n'est valide que dans cette cellule spécifique. Cela empêche le pirate informatique de déplacer le texte chiffré d'une cellule à une autre. Dans cet exemple, le texte chiffré doit être lié à column_id
et row_id
pour la cellule de base de données donnée.
Stocker des textes chiffrés dans différents clients vous permet de détecter un comportement incorrect si le client A fournit le texte chiffré du client B pour le déchiffrement. Ici, le texte chiffré doit être lié au nom du client.
Tink propose plusieurs options pour associer le texte chiffré à son contexte:
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/07/25 (UTC)."],[[["\u003cp\u003eModern encryption techniques can authenticate additional data without encrypting it, ensuring data integrity and context.\u003c/p\u003e\n"],["\u003cp\u003eThis "associated data" links ciphertext to its specific location or user, preventing unauthorized use or manipulation.\u003c/p\u003e\n"],["\u003cp\u003eTink offers multiple encryption options, including AEAD, Streaming AEAD, Deterministic AEAD, and Hybrid Encryption, that support binding ciphertext to its context for enhanced security.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can utilize associated data to prevent attacks like ciphertext movement or unauthorized decryption by ensuring the ciphertext remains tied to its intended context.\u003c/p\u003e\n"]]],["Encryption modes utilize associated data to authenticate but not encrypt, binding ciphertexts to specific contexts. This prevents ciphertext misuse. Examples include binding database cell data to `column_id` and `row_id` or binding data to a client's name. Tink offers this functionality through AEAD, Streaming AEAD, Deterministic AEAD with an associated data input and Hybrid encryption with a context info parameter. Decryption fails if the correct associated data is not provided.\n"],null,["Modern encryption modes support *associated data*, which is authenticated but\nnot encrypted. This can be used to bind a ciphertext to a specific context.\n\nExamples of binding ciphertext to associated data include:\n\n- Encrypting a database cell-by-cell (or column-by-column). This ensures the\n cell's ciphertext is only valid in that specific cell. This prevents the\n attacker from moving the ciphertext from one cell to another. In this\n example, the ciphertext should be bound to the `column_id` and `row_id` for\n the given database cell.\n\n- Storing ciphertexts in different clients lets you detect misbehavior if\n Client A provides Client B's ciphertext for decryption. Here, the ciphertext\n should be bound to the client's name.\n\nTink has several options for binding ciphertext to its context:\n\n- [AEAD](/tink/aead), [Streaming AEAD](/tink/streaming-aead), and [Deterministic\n AEAD](/tink/deterministic-aead) all accept an associated data input along with\n the plaintext. The decryption fails if the associated data is not provided\n with the ciphertext.\n\n- [Hybrid encryption](/tink/hybrid) provides the same feature using the [context\n info parameter](/tink/hybrid#context_info_parameter)."]]