简体   繁体   English

如何以非交互方式使用NIST软件?

[英]How can I use NIST software in non-interactive way?

I am using NIST software. 我正在使用NIST软件。 This tool (written in C) has interactive mode. 此工具(用C编写)具有交互模式。 It gets an input file, asks user some questions about test type and parameters, and then runs the test. 它获取一个输入文件,询问用户有关测试类型和参数的一些问题,然后运行测试。 I want to run it on several files, so I want to automate the whole process in Python. 我想在几个文件上运行它,所以我想在Python中自动化整个过程。 Is there anyway to use this software in non-interactive mode? 无论如何在非交互模式下使用此软件?

For documentation and code: http://csrc.nist.gov/groups/ST/toolkit/rng/documentation_software.html 有关文档和代码: http//csrc.nist.gov/groups/ST/toolkit/rng/documentation_software.html

You can automate interactive interfaces with pexpect , which is a python library for expect. 您可以使用pexpect自动化交互式界面,这是一个期望的python库。 expect is also an NIST product. expect也是NIST的产品。

NIST STS is open source, so you can download and modify it; NIST STS是开源的,所以你可以下载和修改它;

the main in asses.c 主要在asses.c

tp.n = atoi(argv[1]); // gets the size from command line.

generatorOptions() in the utilities.c , case option tell you how to enter your file.

So, one you can fix your parameters, desing and compile. 所以,你可以修复你的参数,设计和编译。

In the documentation NIST also says that; 在文档中,NIST也说过;

In the event that storage space is a problem, the user may want to modify the reference implementation and plug-in their implementation of the PRNG under evaluation. 如果存储空间有问题,用户可能希望修改参考实现并插入其评估中的PRNG的实现。 The bit streams will be stored directly in the epsilon data structure, which contains binary sequences. 比特流将直接存储在包含二进制序列的epsilon数据结构中。

Note: Depending on your need, The Red Cricket's answer may be better to suits you. 注意:根据您的需要,The Red Cricket的答案可能更适合您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在非交互式 SSH 模式下运行命令时,如何使用相对路径 Python? - How can I use a relative Python path when running a command in non-interactive SSH mode? 如何在我的python应用程序中添加简单的非交互式GUI? - How can I add a simple non-interactive gui to my python application? 有没有办法使 Dash 中的 DashTable 非交互式? - Is there a way to make a DashTable in Dash non-interactive? 在**非交互环境**中编写代码时,如何在python中使用“用户输入列表”? - How to use 'User entering list" in python while writing a code in a **non-interactive environment**? 如何在docker容器中为非交互式shell设置环境变量? - How to set environment variable for non-interactive shell in docker container? Python - 如何使用子进程启动非交互式登录 shell? - Python - How to start a non-interactive login shell with subprocess? 如何将Python 3.4 matplotlib置于非交互模式? - How to put Python 3.4 matplotlib in non-interactive mode? 当stdin是非交互式时,如何在python中清除stdin缓冲区 - How to clear the stdin buffer in python when stdin is non-interactive Python PAM非交互式身份验证 - Python PAM non-interactive authentication 非交互过程的密码管理 - Password Management for non-interactive process
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM