Hash chiave risorsa
L'hash della chiave della risorsa è un meccanismo che consente a Google di verificare l'integrità
le chiavi di crittografia con wrapping senza avere accesso alle chiavi.
La generazione dell'hash della chiave della risorsa richiede l'accesso alla chiave senza wrapping, tra cui
la chiave DEK, resource_name
e perimeter_id
specificati durante la chiave
di wrapping.
Utilizziamo la funzione crittografica HMAC-SHA256 con unwrapped_dek
come chiave e
la concatenazione dei metadati come dati
("ResourceKeyDigest:", resource_name, ":", perimeter_id)
.
I valori resource_name
e perimeter_id
devono essere stringhe con codifica UTF-8.
Ad esempio, quando resource_name = "my_resource"
,
perimeter_id = "my_perimeter"
e unwrapped_dek = 0xf00d
, la chiave della risorsa
è:
echo -n "ResourceKeyDigest:my_resource:my_perimeter" | openssl sha256 -mac HMAC -macopt hexkey:f00d -binary
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-08-22 UTC.
[null,null,["Ultimo aggiornamento 2024-08-22 UTC."],[[["The resource key hash ensures Google can verify the integrity of wrapped encryption keys without needing access to the actual keys."],["Generating the hash requires the unwrapped key, resource name, and perimeter ID used during key wrapping."],["It utilizes HMAC-SHA256, using the unwrapped key as the key and a concatenation of resource details as data for the hash calculation."],["The resource name and perimeter ID need to be UTF-8 encoded strings for the hash generation."]]],["The core mechanism is generating a resource key hash to verify wrapped encryption key integrity. This involves using HMAC-SHA256 with the unwrapped DEK as the key and a specific concatenation of metadata as data. The metadata consists of \"ResourceKeyDigest:\", the UTF-8 encoded `resource_name`, \":\", and the UTF-8 encoded `perimeter_id`. An example shows generating the hash using `openssl` with a sample `resource_name`, `perimeter_id`, and `unwrapped_dek`.\n"]]