aboutsummaryrefslogtreecommitdiffstats
path: root/moon-abe/cpabe-0.11/test
diff options
context:
space:
mode:
authorWuKong <rebirthmonkey@gmail.com>2015-09-04 09:25:34 +0200
committerWuKong <rebirthmonkey@gmail.com>2015-09-04 09:25:34 +0200
commit3baeb11a8fbcfcdbc31976d421f17b85503b3ecd (patch)
tree04891d88c1127148f1b390b5a24414e85b270aee /moon-abe/cpabe-0.11/test
parent67c5b73910f5fc437429c356978081b252a59480 (diff)
init attribute-based encryption
Change-Id: Iba1a3d722110abf747a0fba366f3ebc911d25b25
Diffstat (limited to 'moon-abe/cpabe-0.11/test')
-rw-r--r--moon-abe/cpabe-0.11/test/cpabe-dec.py18
-rw-r--r--moon-abe/cpabe-0.11/test/cpabe-enc.py18
-rw-r--r--moon-abe/cpabe-0.11/test/cpabe-keygen.py18
-rw-r--r--moon-abe/cpabe-0.11/test/cpabe-setup.py17
-rw-r--r--moon-abe/cpabe-0.11/test/enc_indbin0 -> 532 bytes
-rw-r--r--moon-abe/cpabe-0.11/test/enc_trapbin0 -> 132 bytes
-rw-r--r--moon-abe/cpabe-0.11/test/indexClear2
-rw-r--r--moon-abe/cpabe-0.11/test/master_keybin0 -> 156 bytes
-rw-r--r--moon-abe/cpabe-0.11/test/peks-ind.py18
-rw-r--r--moon-abe/cpabe-0.11/test/peks-test.py18
-rw-r--r--moon-abe/cpabe-0.11/test/peks-trap.py18
-rw-r--r--moon-abe/cpabe-0.11/test/priv_keybin0 -> 411 bytes
-rw-r--r--moon-abe/cpabe-0.11/test/pub_keybin0 -> 888 bytes
-rw-r--r--moon-abe/cpabe-0.11/test/testFile.txt1
-rw-r--r--moon-abe/cpabe-0.11/test/testFile.txt.dec1
15 files changed, 129 insertions, 0 deletions
diff --git a/moon-abe/cpabe-0.11/test/cpabe-dec.py b/moon-abe/cpabe-0.11/test/cpabe-dec.py
new file mode 100644
index 00000000..3e120578
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/cpabe-dec.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import os, sys
+from subprocess import call
+
+c_prog = "cpabe-dec"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ args = [c_prog] + sys.argv[1::]
+ call(args)
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ args = ["./" + c_prog] + sys.argv[1::]
+ call(args)
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/cpabe-enc.py b/moon-abe/cpabe-0.11/test/cpabe-enc.py
new file mode 100644
index 00000000..cff9a6f6
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/cpabe-enc.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import os, sys
+from subprocess import call
+
+c_prog = "cpabe-enc"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ args = [c_prog] + sys.argv[1::]
+ call(args)
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ args = ["./" + c_prog] + sys.argv[1::]
+ call(args)
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/cpabe-keygen.py b/moon-abe/cpabe-0.11/test/cpabe-keygen.py
new file mode 100644
index 00000000..21e1306b
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/cpabe-keygen.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import os, sys
+from subprocess import call
+
+c_prog = "cpabe-keygen"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ args = [c_prog] + sys.argv[1::]
+ call(args)
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ args = ["./" + c_prog] + sys.argv[1::]
+ call(args)
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/cpabe-setup.py b/moon-abe/cpabe-0.11/test/cpabe-setup.py
new file mode 100644
index 00000000..a1d82c9f
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/cpabe-setup.py
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+import os.path
+import sys
+from subprocess import call
+
+c_prog = "cpabe-setup"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ call([c_prog])
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ call(["./" + c_prog])
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/enc_ind b/moon-abe/cpabe-0.11/test/enc_ind
new file mode 100644
index 00000000..01aeabaf
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/enc_ind
Binary files differ
diff --git a/moon-abe/cpabe-0.11/test/enc_trap b/moon-abe/cpabe-0.11/test/enc_trap
new file mode 100644
index 00000000..200de618
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/enc_trap
Binary files differ
diff --git a/moon-abe/cpabe-0.11/test/indexClear b/moon-abe/cpabe-0.11/test/indexClear
new file mode 100644
index 00000000..6f6894cd
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/indexClear
@@ -0,0 +1,2 @@
+Keyword1
+Keyword2
diff --git a/moon-abe/cpabe-0.11/test/master_key b/moon-abe/cpabe-0.11/test/master_key
new file mode 100644
index 00000000..63e4dec5
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/master_key
Binary files differ
diff --git a/moon-abe/cpabe-0.11/test/peks-ind.py b/moon-abe/cpabe-0.11/test/peks-ind.py
new file mode 100644
index 00000000..ca7c5ad5
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/peks-ind.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import os, sys
+from subprocess import call
+
+c_prog = "peks-ind"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ args = [c_prog] + sys.argv[1::]
+ call(args)
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ args = ["./" + c_prog] + sys.argv[1::]
+ call(args)
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/peks-test.py b/moon-abe/cpabe-0.11/test/peks-test.py
new file mode 100644
index 00000000..2cb59713
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/peks-test.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import os, sys
+from subprocess import call
+
+c_prog = "peks-test"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ args = [c_prog] + sys.argv[1::]
+ sys.exit(call(args))
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ args = ["./" + c_prog] + sys.argv[1::]
+ sys.exit(call(args))
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/peks-trap.py b/moon-abe/cpabe-0.11/test/peks-trap.py
new file mode 100644
index 00000000..02e88cee
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/peks-trap.py
@@ -0,0 +1,18 @@
+#!/usr/bin/python
+import os, sys
+from subprocess import call
+
+c_prog = "peks-trap"
+c_file = "/usr/local/bin/" + c_prog
+
+if(os.path.isfile(c_file)):
+ args = [c_prog] + sys.argv[1::]
+ call(args)
+
+elif(os.path.isfile("./" + c_prog)):
+ print "Warning: missing file %s using binary in local repository" % c_file
+ args = ["./" + c_prog] + sys.argv[1::]
+ call(args)
+
+else:
+ sys.exit(c_prog + " was not found. Be sure that the C library cpabe is installed before running this program")
diff --git a/moon-abe/cpabe-0.11/test/priv_key b/moon-abe/cpabe-0.11/test/priv_key
new file mode 100644
index 00000000..9e882734
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/priv_key
Binary files differ
diff --git a/moon-abe/cpabe-0.11/test/pub_key b/moon-abe/cpabe-0.11/test/pub_key
new file mode 100644
index 00000000..24be30ad
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/pub_key
Binary files differ
diff --git a/moon-abe/cpabe-0.11/test/testFile.txt b/moon-abe/cpabe-0.11/test/testFile.txt
new file mode 100644
index 00000000..98a1cfb8
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/testFile.txt
@@ -0,0 +1 @@
+I am a test File!!!
diff --git a/moon-abe/cpabe-0.11/test/testFile.txt.dec b/moon-abe/cpabe-0.11/test/testFile.txt.dec
new file mode 100644
index 00000000..98a1cfb8
--- /dev/null
+++ b/moon-abe/cpabe-0.11/test/testFile.txt.dec
@@ -0,0 +1 @@
+I am a test File!!!