2010-07-27 48 views
1

Hallo,Solaris dev/random

哪個算法實現了Solaris的dev/random?是Yarrow-160還是Yarrow-256?還是算法與Linux相同?是否有文檔/鏈接?我已經看了很多,但我找不到它。提前致謝。

+0

什麼版本的Solaris? – 2010-07-27 18:27:49

回答

1

也許OpenSolaris源代碼,特別是/src/uts/common/crypto/io/swrand.c,有一些線索:

/* 
* Software based random number provider for the Kernel Cryptographic 
* Framework (KCF). This provider periodically collects unpredictable input 
* from external sources and processes it into a pool of entropy (randomness) 
* in order to satisfy requests for random bits from kCF. It implements 
* software-based mixing, extraction, and generation algorithms. 
* 
* A history note: The software-based algorithms in this file used to be 
* part of the /dev/random driver. 
*/ 

略讀該文件:該PRNG與從啓動高分辨率時間初始化,當前的TOD和物理內存狀態和值由重複的SHA1哈希與附加的熵池混合(在yarrow規範中的「攪動」)產生。 SHA1是160位。

也是從那個文件的相關性:

#define MINEXTRACTBITS  160 /* Min entropy level for extraction */ 

從這個簡析Solaris的/dev/random看起來像一個亞羅-160執行。