hanyunx / wysteria_ Goto Github PK
View Code? Open in Web Editor NEWclone of Wysteria by Aseem Rastogi
Home Page: https://bitbucket.org/aseemr/wysteria/src/a0ef9b69b465fc88e7874edaac56227d2ce1b4d0?at=master
clone of Wysteria by Aseem Rastogi
Home Page: https://bitbucket.org/aseemr/wysteria/src/a0ef9b69b465fc88e7874edaac56227d2ce1b4d0?at=master
INSTALLATION: ------------- To install Wysteria, cd into the src directory and run following command: terminal>./build.sh This script builds the GMW library (to execute boolean circuits), Z3 SMT solver (to do refinement type checking for Wysteria programs), and the Wysteria interpreter and type checker. RUNNING EXAMPLES: ------------------ The examples directory contains 3 sample programs, the main function of which is generic in the number of parties. 1. mill.wy : Millionaire application. 2. gps.wy : Nearest neighbor application. 3. spa.wy : Second-price auction To run each of these, for let's say three parties, one needs to start three instances of the interpreter: one for each party. An instance of the interpreter consists of a GMW server and the Wysteria interpreter itself. All the following commands should be run from the src directory in the checkout. To start GMW servers, run following commands (in different terminals, if possible): ./mpc.exe 9000 3 addresses.txt 0 10000 ./mpc.exe 9001 3 addresses.txt 1 10000 ./mpc.exe 9002 3 addresses.txt 2 10000 Once the servers are successfully started, you should see a "Server Ready" message on each terminal. Once this is done, run following 3 commands, again in 3 different terminals if possible: ./bin/wysteria --i-am \!Alice --gmw-port 9000 examples/mill.wy ./bin/wysteria --i-am \!Bob --gmw-port 9001 examples/mill.wy ./bin/wysteria --i-am \!Charlie --gmw-port 9002 examples/mill.wy After the third command is run, you should see the secure computation output for each party. (To run a different example, follow all the steps above, just change the filename to the example). ---- FAQ: ---- Q. Which datatypes are supported in Wysteria ? A. Wysteria supports natural numbers, booleans, arrays, records, sum types, and function types. In addition, Wysteria also has support for Wire bundle types and Share types (see our paper for more details on these: http://www.cs.umd.edu/~aseem/wysteria.pdf). Supported types are listed in file ast.ml under OCaml datatype "typ". Q. Which binary operators are supported in Wysteria ? A. Wysteria supports following operators for natural numbers: addition (+), subtraction (-), greater than (>), and equals (=). Supported operators are listed in file ast.ml under OCaml datatype "natop". Q. Is it possible to select random numbers in Wysteria ? A. Wysteria supports random number selection via following expression: sysop rand <n> where n is a natural number constant. At run time, Wysteria interpreter evaluates this by calling Random.int <n> in OCaml (http://caml.inria.fr/pub/docs/manual-ocaml/libref/Random.html). Expression sysop rand <n> has type nat in Wysteria. Q. What is the bit width of Wysteria nat types when generating boolean circtuis ? A. Nat width for boolean circtuis in Wysteria taken from cktlib.ml (variable natsize). Currently it is set to 12 bits, but can be changed to a different value (4, 8, ...). For any queries or suggestions, please contact: Aseem Rastogi - [email protected] Matthew Hammer - [email protected] Michael Hicks - [email protected]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.