diff --git a/spdl/multiparty/mp-nsl.py b/spdl/multiparty/mp-nsl.py new file mode 100755 index 0000000..6061bea --- /dev/null +++ b/spdl/multiparty/mp-nsl.py @@ -0,0 +1,36 @@ +#!/usr/bin/python +# +# Generate Multi-party NSL protocol description for n parties +# + +def llist (n): + global P + + s = "" + first = 1 + for i in range(0,P): + if n != i: + if first: + first = 0 + else: + s = s + "," + s = s + "r%i" % (i) + return s + +def message1 (label): + global P + + s = "{ " + for i in range (0,label+1): + if i>0: + s = s + "," + s = s + "n%i" % (i) + s = s + "," + s = s + llist((label+1) % P) + s = s + " }pk(r%i)" % ((label+1) % P) + return s + +P = 4 +print message1 (1) + +