首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用带有/dev/ NeuG的TRNG?

使用带有/dev/ NeuG的TRNG?
EN

Unix & Linux用户
提问于 2017-03-27 18:44:26
回答 2查看 1K关注 0票数 2

我有一个NeuG硬件真正的随机数生成器(http://www.gniibe.org/memo/development/gnuk/rng/neug.html),它的页面显示它以/dev/ttyACM0的形式在GNU系统上运行

我可以配置/dev/random来使用NeuG,因为它的随机性吗?如果是这样的话,是怎么做的?如何检查/dev/random是否确实在使用NeuG?

EN

回答 2

Unix & Linux用户

回答已采纳

发布于 2017-03-27 19:01:14

改编自SuperUser:https://superuser.com/questions/309840/how-can-i-point-dev-random-to-dev-urandom的答案

您所需要做的就是创建类似于/etc/udev/rules.d/70-harware-randomizer-enable.rules的内容如下:

代码语言:javascript
复制
# /etc/udev/rules.d/70-disable-random-entropy-estimation.rules
# Disables /dev/random entropy estimation (it's mostly snake oil anyway).
#
# udevd will warn that the kernel-provided name 'random' and NAME= 'ttyACM0'
# disagree.  You can ignore this warning.

# Use /dev/ttyACM0 instead of /dev/random for the entropy-estimating RNG.
KERNEL=="random", NAME="ttyACM0"

# Remove any existing /dev/random, then create symlink /dev/random pointing to
# /dev/urandom
KERNEL=="urandom", PROGRAM+="/bin/rm -f /dev/random", SYMLINK+="random"
票数 1
EN

Unix & Linux用户

发布于 2018-03-25 11:13:31

我不记得我还做过什么,但是我似乎用以下方法创建了/etc/systemd/system/rngd@.service

代码语言:javascript
复制
[Unit]
Description=rngd service on %I

[Service]
Type=simple
ExecStartPre=/bin/stty -F /dev/%I raw -echo -parenb
ExecStart=/usr/sbin/rngd -f --fill-watermark=4000 --rng-device=/dev/%I

然后,sudo systemctl enable rngd@ttyACM0.servicesudo systemctl start rngd@ttyACM0.service

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/354188

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档