pysnark:直接在Python中对zk-SNARKs进行编程的库

上传者: 42129412 | 上传时间: 2023-04-21 11:56:29 | 文件大小: 99KB | 文件类型: ZIP
y蛇 最近的新闻: 2020年3月11日:更新到最新的snarkjs (这是对PySNARK原始版本的重写,仍可。) PySNARK允许您直接在Python 3中编程zk-SNARK(又名可验证计算)。例如,以下代码运行SNARK程序以计算数字的立方,生成键材料,生成证明并验证它: import sys from pysnark.runtime import snark @snark def cube(x): return x*x*x print("The cube of", sys.argv[1], "is", cube(int(sys.argv[1]))) PySNARK可以使用或作为后端。 对于使用pysnark提供的PubVal数据类型(或使用@snark装饰器)执行的任何计算,该库都会跟踪该计算的Rank-1约束系统。 计算完成后,将生成(或重复使用)用于计算的关

文件下载

资源详情

[{"title":"( 74 个子文件 99KB ) pysnark:直接在Python中对zk-SNARKs进行编程的库","children":[{"title":"pysnark-master","children":[{"title":"setup.py <span style='color:#111;'> 500B </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 350B </span>","children":null,"spread":false},{"title":"LICENSE.md <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false},{"title":"TODO <span style='color:#111;'> 2.88KB </span>","children":null,"spread":false},{"title":"dist.sh <span style='color:#111;'> 122B </span>","children":null,"spread":false},{"title":"examples","children":[{"title":"kaplanmeier.py <span style='color:#111;'> 5.85KB </span>","children":null,"spread":false},{"title":"testcomm.py <span style='color:#111;'> 2.03KB </span>","children":null,"spread":false},{"title":"compare.py <span style='color:#111;'> 460B </span>","children":null,"spread":false},{"title":"cube-qaptools.py <span style='color:#111;'> 256B </span>","children":null,"spread":false},{"title":"binarycircuit.py <span style='color:#111;'> 4.51KB </span>","children":null,"spread":false},{"title":"binarycircuit_example.txt <span style='color:#111;'> 340B </span>","children":null,"spread":false},{"title":"factorial.py <span style='color:#111;'> 1.15KB </span>","children":null,"spread":false},{"title":"hash.py <span style='color:#111;'> 977B </span>","children":null,"spread":false},{"title":"cube.py <span style='color:#111;'> 200B </span>","children":null,"spread":false},{"title":"branch2.py <span style='color:#111;'> 2.89KB </span>","children":null,"spread":false},{"title":"hash_string.py <span style='color:#111;'> 1.75KB </span>","children":null,"spread":false},{"title":"test2.py <span style='color:#111;'> 224B </span>","children":null,"spread":false},{"title":"cs2 <span style='color:#111;'> 7.87KB </span>","children":null,"spread":false},{"title":"bench.py <span style='color:#111;'> 10.88KB </span>","children":null,"spread":false},{"title":"cube_json.py <span style='color:#111;'> 551B </span>","children":null,"spread":false},{"title":"testarray.py <span style='color:#111;'> 2.43KB </span>","children":null,"spread":false},{"title":"test.py <span style='color:#111;'> 2.90KB </span>","children":null,"spread":false},{"title":"index.html <span style='color:#111;'> 3.61KB </span>","children":null,"spread":false},{"title":"manysquares.py <span style='color:#111;'> 136B </span>","children":null,"spread":false},{"title":"secretsanta.py <span style='color:#111;'> 2.84KB </span>","children":null,"spread":false},{"title":"cs <span style='color:#111;'> 7.87KB </span>","children":null,"spread":false},{"title":"snarkprofile.py <span style='color:#111;'> 1.38KB </span>","children":null,"spread":false},{"title":"sudoku.py <span style='color:#111;'> 3.72KB </span>","children":null,"spread":false}],"spread":false},{"title":"notebooks","children":[{"title":"test.ipynb <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 14.27KB </span>","children":null,"spread":false},{"title":"pysnark","children":[{"title":"gmpy.py <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"runtime.py <span style='color:#111;'> 17.87KB </span>","children":null,"spread":false},{"title":"qaptools","children":[{"title":"Pairing.sol <span style='color:#111;'> 5.31KB </span>","children":null,"spread":false},{"title":"runqapver.py <span style='color:#111;'> 2.53KB </span>","children":null,"spread":false},{"title":"qapsplit.py <span style='color:#111;'> 5.30KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"backend.py <span style='color:#111;'> 18.82KB </span>","children":null,"spread":false},{"title":"options.py <span style='color:#111;'> 3.59KB </span>","children":null,"spread":false},{"title":"import.py <span style='color:#111;'> 2.74KB </span>","children":null,"spread":false},{"title":"testqap.py <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false},{"title":"schedule.py <span style='color:#111;'> 1.93KB </span>","children":null,"spread":false},{"title":"runqapgenf.py <span style='color:#111;'> 4.16KB </span>","children":null,"spread":false},{"title":"runqapprove.py <span style='color:#111;'> 2.20KB </span>","children":null,"spread":false},{"title":"contract.py <span style='color:#111;'> 17.08KB </span>","children":null,"spread":false},{"title":"runqapgen.py <span style='color:#111;'> 4.74KB </span>","children":null,"spread":false},{"title":"runqapinput.py <span style='color:#111;'> 3.89KB </span>","children":null,"spread":false}],"spread":false},{"title":"snarkjsbackend.py <span style='color:#111;'> 4.76KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 24B </span>","children":null,"spread":false},{"title":"hash.py <span style='color:#111;'> 1.72KB </span>","children":null,"spread":false},{"title":"fixedpoint.py <span style='color:#111;'> 5.20KB </span>","children":null,"spread":false},{"title":"libsnark","children":[{"title":"backendgg.py <span style='color:#111;'> 137B </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 38B </span>","children":null,"spread":false},{"title":"backend.py <span style='color:#111;'> 3.00KB </span>","children":null,"spread":false},{"title":"tosnarkjsgg.py <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"_libsnark.py <span style='color:#111;'> 502B </span>","children":null,"spread":false}],"spread":false},{"title":"nobackend.py <span style='color:#111;'> 508B </span>","children":null,"spread":false},{"title":"zkinterface","children":[{"title":"Root.py <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"BilinearConstraint.py <span style='color:#111;'> 2.49KB </span>","children":null,"spread":false},{"title":"Witness.py <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"Message.py <span style='color:#111;'> 189B </span>","children":null,"spread":false},{"title":"Circuit.py <span style='color:#111;'> 5.42KB </span>","children":null,"spread":false},{"title":"__init__.py <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"backend.py <span style='color:#111;'> 6.41KB </span>","children":null,"spread":false},{"title":"Variables.py <span style='color:#111;'> 4.92KB </span>","children":null,"spread":false},{"title":"R1CSConstraints.py <span style='color:#111;'> 2.75KB </span>","children":null,"spread":false},{"title":"KeyValue.py <span style='color:#111;'> 1.92KB </span>","children":null,"spread":false}],"spread":false},{"title":"pack.py <span style='color:#111;'> 2.57KB </span>","children":null,"spread":false},{"title":"array.py <span style='color:#111;'> 5.11KB </span>","children":null,"spread":false},{"title":"atexitmaybe.py <span style='color:#111;'> 2.47KB </span>","children":null,"spread":false},{"title":"branching.py <span style='color:#111;'> 7.54KB </span>","children":null,"spread":false},{"title":"linalg.py <span style='color:#111;'> 236B </span>","children":null,"spread":false}],"spread":false},{"title":"docs","children":[{"title":"_config.yml <span style='color:#111;'> 369B </span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'> 14.27KB </span>","children":null,"spread":false},{"title":"_layouts","children":[{"title":"default.html <span style='color:#111;'> 1.81KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明