تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
في العديد من مكتبات التشفير، غالبًا ما يتم تحديد المفاتيح من خلال بعض تسلسلات الكلمات الثنائيه
فقط. راجِع على سبيل المثال دوالّ OpenSSL، مثل EVP_EncryptInit_ex،
التي تحتاج إلى مفتاح البدء أيضًا للحساب، بالإضافة إلى وحدات البايت للمفتاح، أو Cipher.init في أسلوب
javax.crypto، الذي يأخذ تسلسل المفتاح وAlgorithmParameterSpec. غالبًا ما يكون من الصعب استخدام هذه الدوال بشكل صحيح،
وقد تؤدي إضافة مَعلمات خاطئة إلى عواقب خطيرة.
يهدف Tink إلى أن يكون مختلفًا، ويتوقع أن يتألّف المفتاح دائمًا من المفتاح
المادة والبيانات الوصفية (المَعلمات).
على سبيل المثال، يحدِّد مفتاح AEAD الكامل بدقة طريقة عمل التشفير
والفك، ويحدِّد الدالتَين \(\mathrm{Enc}\) و
\(\mathrm{Dec}\)، وطريقة ترميز النص المشفَّر (مثل ناقل الإعداد، يليه التشفير، ثم العلامة).
مفتاح AES في Tink ليس تسلسلًا من البايتات بطول 128 أو 192 أو 256 بت فقط،
بل يخزِّن أيضًا مواصفات الخوارزمية المقابلة اللازمة لاحتساب
المفتاح، في شكل عنصر parameters. وبالتالي، فإنّ
مفتاح AES-EAX الكامل ومفتاح AES-GCM الكامل هما كائنان مختلفان في Tink.
تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-07-25 (حسب التوقيت العالمي المتفَّق عليه)"],[[["\u003cp\u003eIn Tink, a Key is a cryptographic object encompassing both key material and metadata, ensuring clear and complete functionality specification.\u003c/p\u003e\n"],["\u003cp\u003eUnlike traditional libraries, Tink Keys include necessary parameters like IV and algorithm specifications, simplifying usage and mitigating potential errors.\u003c/p\u003e\n"],["\u003cp\u003eTink Keys fully define cryptographic operations, including encryption, decryption, and ciphertext encoding, as exemplified by AEAD keys.\u003c/p\u003e\n"],["\u003cp\u003eDifferent key types with distinct algorithm specifications, like AES-EAX and AES-GCM, are treated as separate objects within Tink.\u003c/p\u003e\n"],["\u003cp\u003eTink incorporates Keys into Keysets, enabling key rotation and enhanced security practices.\u003c/p\u003e\n"]]],["Tink's **Key** includes both key material and metadata, defining its functionality. Unlike other libraries that only use byte sequences, Tink requires complete parameter specifications. A full AEAD key defines encryption and decryption processes, along with ciphertext encoding. AES keys in Tink include algorithm specifications, making different AES types distinct objects. Keys in Tink exist as parts of a set of keys called a Keyset, allowing key rotation.\n"],null,["# Keys\n\n| In Tink, a **Key** describes a complete cryptographic object, and consists of the key material plus all necessary metadata which describes its functionality.\n\nIn many cryptographic libraries, keys are often identified by only some byte\nsequences. Consider for example OpenSSL functions such as `EVP_EncryptInit_ex`,\nwhich apart from the key bytes, also needs the IV for computation; or the\njavax.crypto method `Cipher.init`, which takes both a key sequence and an\n`AlgorithmParameterSpec`. Such functions are often difficult to use correctly\nand passing the wrong parameters can have serious consequences.\n\nTink aims to be different, and expects a key to always consist of both the key\nmaterial and the metadata (the parameters).\n\nA full AEAD key for example specifies in exact detail how encryption and\ndecryption works - it specifies the two functions \\\\(\\\\mathrm{Enc}\\\\) and\n\\\\(\\\\mathrm{Dec}\\\\), and how the ciphertext is encoded (e.g. initialization vector,\nfollowed by the encryption, followed by the tag).\n\nAn AES key in Tink is not only a byte sequence of length 128, 192 or 256 bits,\nbut it also stores the corresponding algorithm specifications needed to compute\nthe key, in the form of a [parameters](/tink/design/parameters) object. Hence, a\nfull AES-EAX key and a full AES-GCM key are different objects in Tink.\n| **Note:** In Tink, keys are part of a [keyset](/tink/design/keysets) - a set of keys which implement the same primitive, which facilitates key rotation."]]