博客
关于我
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 中的机器学习简介:多项式回归
查看>>
python读取grib2数据_用Python加载grib2文件
查看>>
Python 中的注意点_s2
查看>>
Python读取Excel的几种工具包(附Demo)
查看>>
Python 中的生成器是什么?
查看>>
Python 中的离线语音转文本
查看>>
Python读写json文件的简单实现
查看>>
Python 中的线程
查看>>
Python 中的继承机制是什么样的?
查看>>
python读写excel之xlrd&xlwt&xlutils组合
查看>>
Python 中的装饰器是什么?
查看>>
Python 中的装饰器是如何工作的,有哪些实际应用场景?
查看>>
python读excel
查看>>
Python 中读取 CSV 文件-ChatGPT4o作答
查看>>
Python 之 filecmp
查看>>
python请求html_使用Python请求获取HTML?
查看>>
Python 之匿名函数和偏函数
查看>>
python 之栈的实现
查看>>
python语音播放
查看>>
python语言:装饰器原理
查看>>