最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

uefi - True random number in EDK2 - Stack Overflow

programmeradmin1浏览0评论

I am studying the UEFI firmware code and noticed a random number generation that looks like this:

Status = Tpm2NvRead (TPM_RH_P, Index, Auth, KEY_SIZE, 0, Data);

[...]

for (I = 32; I < KEY_SIZE; I++) {
   RandomN[I - 32] = Data->buffer[I];
}

Here, reading from the TPM occurs at a fixed index, and the obtained value is considered the random number. I assume this is not secure code, as an attacker could control the randomness if they have the ability to write arbitrary values to the TPM at the specified index. What mechanisms does EDK2 provide for generating true random numbers?

发布评论

评论列表(0)

  1. 暂无评论