Note: The first version of our interpretor was made available on-line (and presented at AAMAS in July 2004). A language and a compiler for 2-party secure function evaluation (called FairPlay) was made available and was presented at USENIX (in August 2004), nevertheless FairPlay does not address multiparty computation (i.e., more than 2 participants).A set of applets that use the engine of this interpreter was written with help from students Vaihav Rajeshirke, Amit Abhyankar, and Julia Hamilton.
java mcs.apps.SMC -A Version4.smc -P public.smc -S secret.smc -K secret-key-file -i 5
################################ # file "public.smc" # # Year 2004 # a meeting-scheduling application # 3 participants choose from 2 places. If both places could work, the solution is picked randomly # a file of type: ################################ GENERIC_DISWCSP_V1 # use modulus 13 for arithmetic circuits (the minimum one is chosen automatically) MODULUS 13 # THRESHOLD-SCHEME n / 2 # default is n/2, in version 1.3 the user is not yet allowed to change it # number of participants PARTICIPANTS 3 # n-g for Paillier keys. Real users will want bigger safe values and surely different for participants :) # you can generate these numbers with the Paillier generator applet at http://cs.fit.edu/~msilaghi/ PUBLIC-KEYS # n-g for 1st participant 2257 158 # n-g for 2nd participant 2257 158 # n-g for 2nd participant 2257 158 # the IP addresses for participants ADDRESSES # IP PORT for 1st participant 127.0.0.1 2001 # IP PORT for 2nd participant 127.0.0.1 2002 # IP PORT for 3rd participant 127.0.0.1 2003 INPUTS # T-table, V-vector, I-integer, B-boolean 0/1 1 # inputs for participant 1 ic1 V 2 # a vector with two elements label c11 c12 # the labels for the elements are shown here Boolean # the type of the inputs is Boolean 1 # 1 input for the 2nd participant ic2 V 2 # a vector with two elements label c21 c22 # the labels for the elements are shown here Boolean # the type of the inputs is Boolean 1 # 1 input for the 3rd participant ic3 V 2 label c31 c32 Boolean INTERMEDIARY-INPUTS 2 r1=*(*(ic1(0),ic2(0)),ic3(0)) r2=*(*(ic1(1),ic2(1)),ic3(1)) # r(x)=ARRAY(r,x,r1,r2) # these can be set in an array # the elements become r(0) for r1 and r(1) for r2 # CONSTRAINT-PROBLEM VARIABLES 1 # a single variable place 2 # it is called "place" and has 2 values INDUCED-CONSTRAINTS 1 C # name for this constraint 1 # nb of variables involved in this constraint place { r1 r2 } # the constraint is here computed separately for each place OUTPUTS 1 # 1 input for participant 1 place place # output the value of variable place with label "place" 1 # 1 input for participant 2 place place 1 # 1 input for participant 3 place place EOF # |
############################ # file "secret.smc" # # Year 2004 # A file of type ############################ GENERIC_DISWCSP_V2 1 # nb of inputs ic3 # name of the input -- was declared vector of size 2 in the file "public.smc" 1 1 # elements of the vector |
########################## # file "Version4.smc" # SMC solver for distributed constraint satisfaction program # implements the algorithm MPC-DisCSP4 # but uses Generate and Test instead of a powerful backtracker # # Year 2004 ########################## p(t)=PROD(i,0,-(C,1),CONSTRAINT(i,t)) makeS=FOR(t,0,-(TuplesNb,1), _S, p(t), 0) selectS(length)=FOR(j,0,-(length,1), _k,IF(j,*(_k(-(j,1)),-(1,_S(-(j,1)))),1), _S2,*(_S(j),_k(j)), 0) main=SEQUENCE( makeS, SETLOCAL(length,CONDENSE(_S,TuplesNb,_permutation)), SHUFFLE(_S,length), selectS(length), UNSHUFFLE(_S2,length), UNCONDENSE(_S2,length,_permutation,_S,TuplesNb), FOR(i,0,-(M,1), _x,f(i), 0)) f(i)=SUM(t,0,-(TuplesNb,1),*(PROJ(t,i),_S(t))) # |
Create Nov. 25, 2004 by Silaghi, Marius-Călin.