टिंक के खास कॉन्सेप्ट को समझें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Tink के साथ पहली बार काम शुरू करने से पहले, आपको कुछ ज़रूरी सिद्धांतों को समझ लेना चाहिए. इन सिद्धांतों के बारे में नीचे दिए गए सेक्शन में बताया गया है.
प्रिमिटिव
Tink प्रिमिटिव को क्रिप्टोग्राफ़िक बिल्डिंग ब्लॉक के तौर पर इस्तेमाल करता है. यह एल्गोरिदम, बुनियादी एल्गोरिदम को मैनेज करता है, ताकि उपयोगकर्ता सुरक्षित तरीके से क्रिप्टोग्राफ़िक टास्क कर सकें. प्रिमिटिव, क्रिप्टोग्राफ़िक एल्गोरिदम और कुंजी के टाइप की जानकारी देता है.
Tink के साथ काम करने वाले प्रिमिटिव:
- असोसिएट किए गए डेटा के साथ पुष्टि किया हुआ एन्क्रिप्शन (AEAD): डेटा एन्क्रिप्ट (सुरक्षित) करने के लिए सबसे सामान्य प्रिमिटिव; ज़्यादातर एन्क्रिप्शन ज़रूरतों के लिए सही. AEAD, सादे टेक्स्ट की गोपनीयता बनाए देता है. साथ ही, इसकी प्रामाणिकता और प्रामाणिकता की पुष्टि करता है. असोसिएट किए गए डेटा के साथ पुष्टि किया गया एन्क्रिप्ट (सुरक्षित) करने का तरीका
(AEAD) देखें.
- तय करने वाला एन्क्रिप्शन: एक ऐसा प्रिमिटिव जो किसी दिए गए सादे टेक्स्ट और कुंजी के लिए, हमेशा एक ही सादे टेक्स्ट को बनाता है. यह जोखिम भरा हो सकता है, क्योंकि हमला करने वाले को इसकी पहचान करने के लिए सिर्फ़ यह पता लगाना होता है कि कौनसा सादे टेक्स्ट इनपुट, कौनसा सादे टेक्स्ट वाला है. तय करने वाला
AEAD देखें.
- डिजिटल सिग्नेचर: साइन किए गए डेटा की प्रामाणिकता और उसके रखरखाव की पुष्टि करने के लिए, एक ऐसिमेट्रिक (एसिमेट्रिक की एन्क्रिप्शन देखें)
. डिजिटल हस्ताक्षर देखें.
- हाइब्रिड एन्क्रिप्शन: एक ऐसा प्रिमिटिव जो एसिमेट्रिक की एन्क्रिप्शन
और सिमेट्रिक की एन्क्रिप्शन
को जोड़ता है. एसिमेट्रिक कुंजी एन्क्रिप्शन और सिमेट्रिक कुंजी एन्क्रिप्शन देखें. हाइब्रिड एन्क्रिप्शन, सार्वजनिक-कुंजी एन्क्रिप्शन की सुविधा के साथ सिमेट्रिक एन्क्रिप्शन
की क्षमता को जोड़ता है. किसी मैसेज को एन्क्रिप्ट (सुरक्षित) करने के लिए, एक नई सिमेट्रिक कुंजी जनरेट की जाती है और उसका इस्तेमाल सादे टेक्स्ट वाले डेटा को एन्क्रिप्ट करने के लिए किया जाता है. वहीं, मैसेज पाने वाले की सार्वजनिक कुंजी का इस्तेमाल सिर्फ़
सिमेट्रिक कुंजी को एन्क्रिप्ट (सुरक्षित) करने के लिए किया जाता है. अंतिम साइफ़रटेक्स्ट में सिमेट्रिक साइफ़रटेक्स्ट और एन्क्रिप्ट की गई सिमेट्रिक कुंजी
शामिल होती है. हाइब्रिड
एन्क्रिप्शन देखें.
- मैसेज की पुष्टि करने वाला कोड (MAC): डेटा की प्रामाणिकता और उसकी प्रामाणिकता की पुष्टि करने के लिए एक सिमेट्रिक (सिमेट्रिक कुंजी एन्क्रिप्ट करने का तरीका देखें) है. मैसेज की पुष्टि करने वाला कोड (MAC) देखें.
- स्ट्रीमिंग AEAD: स्ट्रीमिंग डेटा के लिए पुष्टि किया गया एन्क्रिप्शन देने वाला शुरुआती
डेटा; यह तब काम आता है, जब एन्क्रिप्ट (सुरक्षित) किया जाने वाला डेटा इतना बड़ा हो कि एक चरण में प्रोसेस नहीं किया जा सकता. स्ट्रीमिंग AEAD देखें.
काम करने की जानकारी के लिए, भाषा के हिसाब से इस्तेमाल किए जा सकने वाले प्रिमिटिव देखें.
ज़्यादा जानकारी के लिए, प्रिमिटिव डिज़ाइन देखें.
कुंजी के टाइप
मुख्य टाइप, खास प्रिमिटिव को लागू करता है. ज़्यादातर प्रिमिटिव में कई तरह की कुंजी होती हैं. आप इनमें से किसी को भी चुन सकते हैं. यह सुरक्षा, रनटाइम, और स्पेस की आपकी ज़रूरतों पर निर्भर करता है. उदाहरण के लिए, AES128_GCM एक AEAD है, जो तेज़ और ज़्यादातर ज़रूरतों के लिए असरदार है. भाषा के हिसाब से, इस्तेमाल की जा सकने वाली कुंजी के टाइप पर ज़्यादा जानकारी देखें.
कीसेट और कीसेट हैंडल
Tink, कुंजियों को मैनेज करने के लिए keyset का इस्तेमाल करता है. कीसेट, कुंजियों का एक ऐसा सेट है
जो बटन को घुमाने की सुविधा देता है. कीसेट की अहम प्रॉपर्टी ये हैं:
- कीसेट में मौजूद हर कुंजी का एक यूनीक आईडी होता है, जो कीसेट में यूनीक होता है. आम तौर पर, इस आईडी को बनाए गए हर सादे टेक्स्ट, हस्ताक्षर या टैग में प्रीफ़िक्स के तौर पर जोड़ा जाता है. इससे पता चलता है कि किस कुंजी का इस्तेमाल किया गया है (ज़्यादा जानकारी के लिए, देखें कि कैसे टैग साइफ़रटेक्स्ट का इस्तेमाल किया जाता है).
- कीसेट में एक बार में सिर्फ़ एक कुंजी प्राइमरी होती है. कीसेट में एक प्राथमिक कुंजी
मौजूदा समय में "इस्तेमाल में है" कुंजी होती है.
- किसी भी कुंजी के सेट में मौजूद सभी कुंजियों का इस्तेमाल, एक ही प्रिमिटिव (जैसे कि AEAD) पर किया जाना चाहिए. हालांकि, उनकी कुंजी के टाइप अलग-अलग हो सकते हैं, जैसे कि AES-GCM और XCHACHA20-POLY1305 कुंजी.
लागू की गई हर Tink की सुविधा, कीसेट बनाने या उनमें बदलाव करने के लिए एपीआई उपलब्ध कराती है. हालांकि, हमारा सुझाव है कि आप अपने सीएलआई टूल के लिए, Tinkey का इस्तेमाल करें.
उपयोगकर्ता कीसेट हैंडल का इस्तेमाल करके, कीसेट पर ऑपरेट करते हैं. कीसेट हैंडल, संवेदनशील कुंजी के असल कॉन्टेंट को
एक्सपोज़र को सीमित करता है. यह एक कीसेट को भी ऐब्स्ट्रैक्ट करता है, जिससे उपयोगकर्ता एक प्रिमिटिव हासिल कर सकते हैं, जो पूरे कीसेट को "रैप" करता है. उदाहरण
के लिए, आप N
कुंजियों वाले किसी कीसेट का AEAD प्रिमिटिव पा सकते हैं. इसके बाद,
आपको मिले प्रिमिटिव के साथ एन्क्रिप्शन और डिक्रिप्शन, फिर कीसेट में प्राथमिक कुंजी का इस्तेमाल करता है.
ज़्यादा जानकारी के लिए, कीसेट डिज़ाइन देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","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-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)."]]