Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Le chiavi Tink sono composte sia dal materiale della chiave sia dai metadati. La sezione sul tagging dei testi criptati spiega come Tink consente anche di anteporre ai testi criptati una stringa di 5 byte derivata dall'ID, il che significa che la chiave dipende anche dall'ID che ha nel set di chiavi.
Pertanto, per creare una nuova chiave, Tink utilizza in generale i seguenti ingredienti:
Un oggetto che descrive tutti i parametri.
L'ID della nuova chiave
Casualità uniforme e crittograficamente sicura
Esempio
Prendi in considerazione, ad esempio, HMAC (RFC 2014).
Per specificare un calcolo HMAC in Tink, è necessario fornire le seguenti informazioni, che formano la chiave:
Il materiale chiave di HMAC.
La funzione hash da utilizzare.
Lunghezza dell'output dell'HMAC (consulta RFC 2014, sezione
5), se troncata.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 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,[]]