Skip to Content
LINUX系統程式設計 第二版
book

LINUX系統程式設計 第二版

by Robert Love
December 2013
Intermediate to advanced
496 pages
8h 57m
Chinese
GoTop Information, Inc.
Content preview from LINUX系統程式設計 第二版
檔案與目錄的管理
|
299
這些裝置的用途各有不同。它們可用於測試一個應用程式如何處理一些極限的問題—例
如,一個被填滿的檔案系統。因為 null zero 裝置會忽略寫入操作,所以它們也是一種
不具任何開銷之丟棄多餘 I/O 的方法。
亂數產生器
核心的亂數產生器裝置位於
/dev/random
以及
/dev/urandom
。它們的主要編號為 1,次要
編號分別為 8 9
核心的亂數產生器會從裝置驅動程式以及其他源頭收集 noise(雜亂的資料),而且核心
會把收集到的 noise 連結在一起,並且對它進行單向雜湊運算。所得到的結果然後會被
存入一個
熵集區
entropy pool
)。核心會不斷估算集區中熵的位元數目。
讀取
/dev/random
會從此集區傳回熵。這些結果可做為亂數產生器的種子,可用於產生
金鑰以及高加密強度熵(cryptographically strong entropy)的其他工作上。
理論上,敵人可以從熵集區獲得足夠的資料,而且只要成功破解單向雜湊就可以知道熵集
區其餘的狀態。然而此類攻擊目前只是理論上可能—並未聽說有發生過此類攻擊—核心要
降低這個可能性,可以對每個讀取要求遞減集區中熵的估算數量。當估算數量為 0 時,讀
取要求將受到阻擋,除非系統產生更多的熵,而且熵的估算數量足以完成讀取要求。
/dev/urandom
不具此特性;即使核心的熵估算不足以完成讀取要求,讀取此裝置仍會成
功。因為只有最講究安全的應用程式—例如在 GNU Privacy Guard 中為了資料交換的安全 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

深入理解運算原理|從簡單的機器到無所不能的程式

深入理解運算原理|從簡單的機器到無所不能的程式

Tom Stuart
管理Kubernetes

管理Kubernetes

Brendan Burns, Craig Tracey
算法技术手册(原书第2 版)

算法技术手册(原书第2 版)

George T.Heineman, Gary Pollice, Stanley Selkow

Publisher Resources

ISBN: 9789862769812