मुझे साइफ़रटेक्स्ट को उसके संदर्भ से बाइंड करना है
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
एन्क्रिप्शन के आधुनिक मोड, जुड़े हुए डेटा के साथ काम करते हैं. इस डेटा की पुष्टि की जाती है, लेकिन उसे एन्क्रिप्ट नहीं किया जाता. इसका इस्तेमाल, किसी खास संदर्भ में सिफरटेक्स्ट को बांधने के लिए किया जा सकता है.
संबंधित डेटा से सिफरटेक्स्ट को बांधने के उदाहरणों में ये शामिल हैं:
डेटाबेस की सेल-दर-सेल (या कॉलम-दर-कॉलम) एन्क्रिप्ट करना. इससे यह पक्का होता है कि सेल का सिफरटेक्स्ट सिर्फ़ उस सेल में मान्य है. इससे, हमलावर को कोड में बदले गए टेक्स्ट को एक सेल से दूसरी सेल में ले जाने से रोका जा सकता है. इस उदाहरण में, दिए गए डेटाबेस सेल के लिए, सिफरटेक्स्ट को column_id
और row_id
से बंधा होना चाहिए.
अलग-अलग क्लाइंट में सिफरटेक्स्ट सेव करने से, आपको गलत व्यवहार का पता चलता है. ऐसा तब होता है, जब क्लाइंट A, क्लाइंट B के सिफरटेक्स्ट को डिक्रिप्ट करने के लिए उपलब्ध कराता है. यहां, सिफरटेक्स्ट को क्लाइंट के नाम से जोड़ा जाना चाहिए.
Tink में, सिफरटेक्स्ट को उसके कॉन्टेक्स्ट से जोड़ने के कई विकल्प हैं:
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 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,["# I want to bind ciphertext to its context\n\nModern 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)."]]