リソースキーのハッシュ
リソースキーのハッシュは、Google がリソースの完全性を検証できるようにするメカニズムです。
ラップされた暗号鍵にアクセスできます。
リソースキーのハッシュを生成するには、以下を含むラップ解除された鍵にアクセスする必要があります。
DEK、resource_name
、鍵で指定された perimeter_id
ラップします。
暗号関数 HMAC-SHA256 を使用し、unwrapped_dek
を鍵として使用し、
データとしてのメタデータの連結
("ResourceKeyDigest:", resource_name, ":", perimeter_id)
。
resource_name
と perimeter_id
は UTF-8 でエンコードされた文字列である必要があります。
たとえば、resource_name = "my_resource"
の場合、
perimeter_id = "my_perimeter"
と unwrapped_dek = 0xf00d
: リソースキー
ハッシュは
echo -n "ResourceKeyDigest:my_resource:my_perimeter" | openssl sha256 -mac HMAC -macopt hexkey:f00d -binary
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-08-22 UTC。
[null,null,["最終更新日 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"]]