> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/man/man4/rndtest.4.md).

# rndtest.4

`rndtest` — FIPS 140-2 随机数生成器测试监视器

## 名称

`rndtest`

## 概要

`device rndtest`

## 描述

`rndtest` 驱动"挂接"到硬件加密设备上，监视传递给 [random(4)](/man/man4/random.4.md) 子系统的熵数据。此数据会定期接受 FIPS 140-2 合规性测试并收集统计信息。如果采集到的熵未通过任何 FIPS 测试套件，则该数据将被丢弃，并持续进行测试直至从设备收到"良好数据"。失败情况可选择性地在控制台上报告。

## 参见

[crypto(4)](/man/man4/crypto.4.md), [random(4)](/man/man4/random.4.md), [safe(4)](/man/man4/safe.4.md), [crypto(9)](https://github.com/FreeBSD-Ask/freebsd-man-sc/blob/main/man9/crypto.9.md)

## 历史

此想法及原始代码来自 Jason L. Wright。`rndtest` 设备驱动最早出现在 FreeBSD 5.0 中。

## 缺陷

加密设备驱动必须经过特殊编译才能使用此驱动；这本不应必要。此特性最好集成到 [random(4)](/man/man4/random.4.md) 子系统中，以便可应用于声称提供"纯熵"的设备。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://book.bsdcn.org/man/man4/rndtest.4.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
