gpt4 book ai didi

ssl - TLS 1.0 - 计算主 key

转载 作者:太空宇宙 更新时间:2023-11-03 13:40:54 24 4
gpt4 key购买 nike

RFC给出了公式

PRF(secret, label, seed) = P_MD5(S1, label + seed) XOR
P_SHA-1(S2, label + seed);

为了做到这一点,P_hash 又具有以下公式:

P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed) +
HMAC_hash(secret, A(2) + seed) +
HMAC_hash(secret, A(3) + seed) + ...

RFC 还说

P_hash can be iterated as many times as is necessary to produce the required quantity of data. For example, if P_SHA-1 was being used to create 64 bytes of data, it would have to be iterated 4 times (through A(4)), creating 80 bytes of output data; the last 16 bytes of the final iteration would then be discarded, leaving 64 bytes of output data.

我发现“P_hash 可以迭代多次以产生所需数量的数据”令人困惑。到底需要多少次?是否有一个阈值,超过多少次都无关紧要?如果是这样,这个阈值是多少?

最佳答案

我很确定在 TLS 1.0 中,预主 key 和主 key 的长度始终为 48 字节,但是当您进一步创建 key block 时,它可能会超过 48 字节。即,如果您的密码使用 sha1 和 aes256,您将需要 136 个字节。

关于ssl - TLS 1.0 - 计算主 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23428375/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com