Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Klucze Tink składają się z materiału klucza i metadanych. W sekcji dotyczącej tagowania szyfrów wyjaśniono, jak w Tink również można umieszczać prefiksy szyfrowanych tekstów 5-bajtowym ciągiem pochodzącym z identyfikatora. Oznacza to, że klucz zależy też od identyfikatora, który znajduje się w zestawie kluczy.
Dlatego do utworzenia nowego klucza Tink używa ogólnie następujących składników:
Obiekt opisujący wszystkie parametry.
Identyfikator nowego klucza
Jednolita, kryptograficznie bezpieczna losowość
Przykład
Przeanalizuj na przykład HMAC (RFC 2014).
Aby określić obliczenia HMAC w Tink, należy podać następujące informacje, które tworzą klucz:
Materiał kluczowy HMAC.
Funkcja skrótu, która ma zostać użyta.
Długość wyjściowej HMAC (patrz RFC 2014, sekcja 5) – jeśli zostanie obcięta.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-07-25 UTC."],[[["\u003cp\u003eTink keys comprise key material and metadata, including parameters like hash function and output length, but exclude key material randomness and key ID.\u003c/p\u003e\n"],["\u003cp\u003eCreating a new key in Tink involves using parameters, a unique key ID, and cryptographically secure random data.\u003c/p\u003e\n"],["\u003cp\u003eKey parameters in Tink encompass information used for key creation, such as hash function, output length, and key material length, but exclude the actual key material.\u003c/p\u003e\n"],["\u003cp\u003eA complete Tink key combines its parameters, key material, and a unique ID, enabling secure cryptographic operations.\u003c/p\u003e\n"]]],["Tink keys comprise key material and metadata, including a prefix derived from the key ID. To create a key, Tink uses parameters, the key's ID, and randomness. Key parameters consist of information used to create the key, excluding the key material and ID. For HMAC, parameters include key material length, hash function, output length (if truncated), and how to derive the prefix from the ID. These parameters, with the key material and ID, define the full key.\n"],null,[]]