From eef9072324b99116611533e7023c5eef40ae9f02 Mon Sep 17 00:00:00 2001 From: ccremers Date: Tue, 28 Jun 2005 13:41:55 +0000 Subject: [PATCH] - Started to work on multiparty protocol generator. --- spdl/multiparty/mp-nsl.py | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 spdl/multiparty/mp-nsl.py 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) + +