博客
关于我
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/

你可能感兴趣的文章
npm发布自己的组件UI包(详细步骤,图文并茂)
查看>>
npm和yarn清理缓存命令
查看>>
npm和yarn的使用对比
查看>>
npm学习(十一)之package-lock.json
查看>>
npm安装crypto-js 如何安装crypto-js, python爬虫安装加解密插件 找不到模块crypto-js python报错解决丢失crypto-js模块
查看>>
npm报错unable to access ‘https://github.com/sohee-lee7/Squire.git/‘
查看>>
npm的常用配置项---npm工作笔记004
查看>>
npm的问题:config global `--global`, `--local` are deprecated. Use `--location=global` instead 的解决办法
查看>>
npm编译报错You may need an additional loader to handle the result of these loaders
查看>>
npm配置安装最新淘宝镜像,旧镜像会errror
查看>>
npm错误 gyp错误 vs版本不对 msvs_version不兼容
查看>>
npm错误Error: Cannot find module ‘postcss-loader‘
查看>>
NPOI之Excel——合并单元格、设置样式、输入公式
查看>>
NPOI利用多任务模式分批写入多个Excel
查看>>
NPOI在Excel中插入图片
查看>>
NPOI格式设置
查看>>
Npp删除选中行的Macro录制方式
查看>>
NR,NF,FNR
查看>>
nrf开发笔记一开发软件
查看>>
nrm —— 快速切换 NPM 源 (附带测速功能)
查看>>