使用乱码电路的蟒蛇图书馆

gabes的Python项目详细描述


https://travis-ci.org/nachonavarro/gabes.svg?branch=masterhttps://img.shields.io/badge/License-MIT-yellow.svg

简介

混乱的电路让两个不信任的人 计算一个联合函数,同时保持它们的输入是私有的。更准确地说, 它允许输入x的alice和输入y的bob计算函数 f(x,y)爱丽丝不知道y和鲍勃不知道x。方法 它首先将f转换成一个布尔电路 巧妙地混淆或garble电路以允许计算f 同时保持输入私有。

典型的例子是两个百万富翁想知道谁是 富有而不暴露自己的财富。在这种情况下,f变成“>;”(更大 函数,xy是它们的财富。

gabes在python中实现乱码电路。应用程序作为命令运行 线路接口,但运行乱码电路所需的功能可在没有 命令行(参见gabes)。

安装

在命令行通过pip:

$ pip install gabes

或者,如果安装了virtualenvwrapper:

$ mkvirtualenv gabes
$ pip install gabes

用法

各方将在其计算机上运行自己的程序实例作为cli应用程序。 Garbler将提供IP和端口号以建立与 评估者。

注意

在连接两个不同的网络时,请确保打开端口。

garbler一侧

gabes -g -grr3 -c Desktop/my-circuit.circuit -a localhost:5000

evaluator一侧

gabes -e -grr3 -a localhost:5000

标志

usage: gabes [-h] [-g] [-e] [-b bits] [-i identifier [identifier ...]]
                   [-c file] -a ip:port [-cl] [-pp] [-grr3] [-free] [-grr2]
                   [-fle] [-half]

Program to garble and evaluate a circuit.

optional arguments:
  -h, --help            show this help message and exit
  -g, --garbler         Set this flag to become the garbler
  -e, --evaluator       Set this flag to become the evaluator
  -b bits, --bits bits  Include your private input bitstring to the circuit
                        (e.g. 001011)
  -i identifier [identifier ...], --identifiers identifier [identifier ...]
                        Indicate which input wires you supply to the circuit
                        (e.g. -i A C D)
  -c file, --circuit file
                        Path of the file representing the circuit. Only the
                        garbler needs to supply the file
  -a ip:port, --address ip:port
                        IP address followed by the port number
  -cl, --classical      Set this flag for classical garbled circuits
  -pp, --point-and-permute
                        Set this flag to include point-and-permute
  -grr3, --grr3         Set this flag for GRR3 garbled circuits
  -free, --free-xor     Set this flag for free-xor garbled circuits
  -fle, --flexor        Set this flag for flexor garbled circuits
  -half, --half-gates   Set this flag for half gates garbled circuits

文档

所有文档都可以在https://gabes.readthedocs.io/en/latest/

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
使用“Google Play Api Client Library for Java”时,Google Play Api默认为“仅限我”   Java REST web服务如何使用复杂的XML   java提供了这个供应链问题的递归解决方案   java找不到适合jdbc的驱动程序?   java IntelliJ Git集成插件>“新分支”将大写字母F放在“功能/abc”中   多线程Java线程间共享变量   HibernateJava。util。自定义包装枚举类型不支持TreeSet集合类型   JAVAsocket调用次数过多   java有没有办法在没有附加库的情况下启动代理?   javaudp优化   java动态检索rj的路径。jar(OS X中的classes.jar)   在Java中解析DTD   playframework 2.1.4java如何使用@options helper,并将Map<String,String>作为参数   java rest web服务中的web服务异步任务   java使用数组创建密码和用户名   java获取OnCheckedChangedListener中的视图位置   java如果我搞砸了登录,它将直接进入else条件,如果我正确登录,它将进入这两个条件   Java正则表达式跳过匹配项   oracle如何使用jdbc将变量从plsql发送到java?