Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trong nhiều thư viện mật mã, khoá thường chỉ được xác định bằng một số trình tự byte. Ví dụ: hãy xem xét các hàm OpenSSL như EVP_EncryptInit_ex, ngoài các byte khoá, cũng cần IV để tính toán; hoặc phương thức javax.crypto Cipher.init, phương thức này lấy cả trình tự khoá và AlgorithmParameterSpec. Những hàm như vậy thường khó sử dụng chính xác và việc truyền sai tham số có thể gây ra hậu quả nghiêm trọng.
Tink hướng đến sự khác biệt và dự kiến một khoá sẽ luôn bao gồm cả tài liệu khoá và siêu dữ liệu (các tham số).
Ví dụ: khoá AEAD đầy đủ chỉ định chi tiết chính xác cách hoạt động của quá trình mã hoá và giải mã – khoá này chỉ định hai hàm \(\mathrm{Enc}\) và\(\mathrm{Dec}\), cũng như cách mã hoá văn bản đã mã hoá (ví dụ: vectơ khởi chạy, theo sau là quá trình mã hoá, theo sau là thẻ).
Khoá AES trong Tink không chỉ là một chuỗi byte có độ dài 128, 192 hoặc 256 bit, mà còn lưu trữ các thông số kỹ thuật thuật toán tương ứng cần thiết để tính toán khoá, ở dạng đối tượng tham số. Do đó, khoá AES-EAX đầy đủ và khoá AES-GCM đầy đủ là các đối tượng khác nhau trong Tink.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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,[]]