博客
关于我
Pinoccho——nizk-test
阅读量:275 次
发布时间:2019-03-01

本文共 1152 字,大约阅读时间需要 3 分钟。

生成nizk-test.c对应的circuit

运行以下命令生成相应的circuit:

python ../src/vercomp.py nizk-test.c --arith nizk-test.arith --ignore-overflow False --progress True

生成的nizk-test.arith内容如下:

total 13input 0                                  # inputinput 1                                  # one-inputnizkinput 2                              # inputnizkinput 3                              # input (unused)nizkinput 4                              # inputnizkinput 5                              # input (unused)

配置相应的input文件nizk-test.in

文件内容如下:

0 51 12 13 24 35 4

生成相应的公私钥

运行以下命令生成公私钥文件:

pinocchio-v0.5.3.exe --qap --pv --nizk --file circuit/nizk-test.arith --mem 4 --input circuit/nizk-test.in --output circuit/nizk-test.out --keys test-nizk-key --genkeys

输出包括了生成的公私钥文件:

生成proof文件

运行以下命令生成proof文件:

pinocchio-v0.5.3.exe --qap --pv --nizk --file circuit/nizk-test.arith --mem 4 --input circuit/nizk-test.in --output circuit/nizk-test.out --keys test-nizk-key --dowork

验证

最后,运行验证命令:

pinocchio-v0.5.3.exe --qap --pv --nizk --file circuit/nizk-test.arith --mem 4 --input circuit/nizk-test.in --output circuit/nizk-test.out --keys test-nizk-key --verify

验证通过,输出Verification passed。

转载地址:http://suqx.baihongyu.com/

你可能感兴趣的文章
Python+Selenium之数据驱动测试的实现
查看>>
python函数定义与使用+返回值简解
查看>>
Python+Selenium登录
查看>>
Python日期时间模块
查看>>
Python函数合集:足足68个内置函数请收好!
查看>>
Python+Selenium自动化测试项目实战
查看>>
Python+Selenium自动化测试项目实战【建议收藏】
查看>>
Python+Selenium自动化测试:Page Object模式
查看>>
python+selenium进行cnblog的自动化登录测试
查看>>
Python函数只返回第一个值而不是数据框
查看>>
Python+SQL实战:京东用户行为数据分析案例解析(上)
查看>>
Python+SQL实战:京东用户行为数据分析案例解析(下)
查看>>
PYTHON+Twisted+sqlanydb=ABORT()
查看>>
Python函数之返回值、作用域和局部变量
查看>>
Python+统计学 | 探索常用的数据分析统计分布
查看>>
python, selenium中用于切换帧的函数
查看>>
python函数
查看>>
python----线程、进程、协程的区别及多线程详解
查看>>
python---5
查看>>
python---使用celery分布式系统异步发送短信(云通讯)来验证登录
查看>>