密码学中的PRNG(pseudorandom number generator)及PRF(Pseudo-Random Functions)

1. PRNG

PRNG(pseudorandom number generator)伪随机数生成器是指通过特定算法生成一系列的数字,使得这一系列的数字看起来是随机的,但是实际是确定的,所以叫伪随机数。

伪随机数的生成算法如下:
G : { 0 , 1 } t ↦ { 0 , 1 } T , T > > t G:\{0,1\}^t\mapsto\{0,1\}^T, T>>t G:{ 0,1}t{ 0,1}T,T>>t
其中 { 0 , 1 } t \{0,1\}^t { 0,1}t为“true random bits”,即随机数种子seed。

与伪随机数对应的是真随机数。真随机数可来源于热噪声。

并不是所有的PRNG都是密码学安全的。在密码学中PRNG常用于构建session keys和stream ciphers。

伪随机数生成器应可抵抗统计测试statistical test以及The Next-Bit Test(即已知前i个数字,无法推论第i+1个数字。)。

2. PRF

在这里插入图片描述
已知 x 1 , . . . , x m , F K ( x 1 ) , . . . , F K ( x m ) x_1,...,x_m,F_K(x_1),...,F_K(x_m) x1,...,xm,FK(x1),...,FK(xm),对任何 x m + 1 x_{m+1} xm+1均无法预测相应的 F K ( x m + 1 ) F_K(x_{m+1}) FK(xm+1)

参考资料:
[1] https://crypto.stanford.edu/pbc/notes/crypto/prng.html
[2] https://en.wikipedia.org/wiki/Cryptographically_secure_pseudorandom_number_generator
[3] https://crypto.stackexchange.com/questions/12436/what-is-the-difference-between-csprng-and-prng
[4] https://crypto.stanford.edu/pbc/notes/crypto/prf.html

猜你喜欢

转载自blog.csdn.net/mutourend/article/details/100579228