修改SHA256用于PRNG播种

时间:2015-05-30 16:36:46

标签: sha seed prng

我可以这样做吗

1. Copy SHA hash constants to eight 32bit work variables.
2. Expand message.
3. Mix work variables (SHA inner loop).
4. Output work variables to PRNG state. 

而不是正常程序(单个消息块)

1. Pad message block.
2. Copy SHA hash constants to hash.
3. Read hash into eight 32bit work variables.
4. Expand message.
5. Mix work variables (SHA inner loop).
6. Add work variables to hash. 
7. Output hash to PRNG state. 

如果我只想要一些输入熵的良好比特混合来播种非加密PRNG?安全完全无关紧要。我只需要从时间戳和一些硬件位(8字节时间戳,硬件56字节)中生成良好的PRNG状态。

0 个答案:

没有答案