博客
关于我
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 3 范围与 Python 2 范围
查看>>
Python 3 读取ini文件
查看>>
Python 3.0 使用 turtle.onclick
查看>>
Python 3.10 明年发布,看看都有哪些新特性?
查看>>
python 3.10上安装pyqt5
查看>>
Python 3.12 正式发布了!
查看>>
Python 3.2 中的蛮力脚本
查看>>
Python 3.4 多处理递归 Pool.map()
查看>>
Python 3.4:未知格式代码“x“
查看>>
Python 3.5、ldap3 和 modify_password()
查看>>
python 3.6.8 升级至3.9版本升级
查看>>
Python 3.9 到 Python 3.12 的发展历程与区别
查看>>
python 32位和64位的区别在哪
查看>>
Python 3:何时使用 dict,何时使用元组列表?
查看>>
Python 3d 绘图 - 轴居中
查看>>
python ==》 字典
查看>>
python anaconda 安装使用
查看>>
python and或or 当参数传递的时候的用法
查看>>
Python append() 与列表上的 + 运算符,为什么这些会给出不同的结果?
查看>>
Python APP自动化测试工具adb与Monkey使用详解
查看>>