هش کلید منبع
هش کلید منبع مکانیزمی است که به 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
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2024-11-11 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2024-11-11 بهوقت ساعت هماهنگ جهانی."],[[["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"]]