summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authoragc <agc>2013-05-18 18:36:25 +0000
committeragc <agc>2013-05-18 18:36:25 +0000
commitdcef9fa37e11a5a70ac5e5f41cb59a3d178ffc82 (patch)
treea5e1929931af304dd8b64cb22604e03ac9ca3820 /security
parent740a5522bca3e234924dc2c3dd042429c70343c4 (diff)
downloadpkgsrc-dcef9fa37e11a5a70ac5e5f41cb59a3d178ffc82.tar.gz
Initial import of HElib, a library to perform homomorphic encryption,
into the Packages Collection. HElib is a software library that implements homomorphic encryption (HE). Currently available is an implementation of the Brakerski-Gentry-Vaikuntanathan (BGV) scheme, along with many optimizations to make homomorphic evaluation run faster, focusing mostly on effective use of the Smart-Vercauteren ciphertext packing techniques and the Gentry-Halevi-Smart optimizations.
Diffstat (limited to 'security')
-rw-r--r--security/HElib/DESCR6
-rw-r--r--security/HElib/Makefile25
-rw-r--r--security/HElib/PLIST16
-rw-r--r--security/HElib/distinfo6
-rw-r--r--security/HElib/patches/patch-Makefile46
5 files changed, 99 insertions, 0 deletions
diff --git a/security/HElib/DESCR b/security/HElib/DESCR
new file mode 100644
index 00000000000..dd007bffd5b
--- /dev/null
+++ b/security/HElib/DESCR
@@ -0,0 +1,6 @@
+HElib is a software library that implements homomorphic encryption
+(HE). Currently available is an implementation of the
+Brakerski-Gentry-Vaikuntanathan (BGV) scheme, along with many
+optimizations to make homomorphic evaluation run faster, focusing
+mostly on effective use of the Smart-Vercauteren ciphertext packing
+techniques and the Gentry-Halevi-Smart optimizations.
diff --git a/security/HElib/Makefile b/security/HElib/Makefile
new file mode 100644
index 00000000000..0293c2d5925
--- /dev/null
+++ b/security/HElib/Makefile
@@ -0,0 +1,25 @@
+# $NetBSD: Makefile,v 1.1.1.1 2013/05/18 18:36:25 agc Exp $
+
+DISTNAME= HElib-20130501
+CATEGORIES= security
+MASTER_SITES= ${MASTER_SITE_LOCAL}
+EXTRACT_SUFX= .zip
+
+MAINTAINER= agc@NetBSD.org
+HOMEPAGE= http://github.com/shaih/HElib/
+COMMENT= Homeomorphic Encryption library
+LICENSE= gnu-gpl-v2
+
+WRKSRC= ${WRKDIR}/HElib-master/src
+
+USE_LANGUAGES+= c++
+USE_TOOLS+= gmake
+
+TEST_TARGET= check
+
+AUTO_MKDIRS= yes
+
+.include "../../devel/gmp/buildlink3.mk"
+.include "../../math/ntl/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/security/HElib/PLIST b/security/HElib/PLIST
new file mode 100644
index 00000000000..2e21bc87097
--- /dev/null
+++ b/security/HElib/PLIST
@@ -0,0 +1,16 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2013/05/18 18:36:25 agc Exp $
+FHE/CModulus.h
+FHE/Ctxt.h
+FHE/DoubleCRT.h
+FHE/EncryptedArray.h
+FHE/FHE.h
+FHE/FHEContext.h
+FHE/IndexMap.h
+FHE/IndexSet.h
+FHE/NumbTh.h
+FHE/PAlgebra.h
+FHE/SingleCRT.h
+FHE/bluestein.h
+FHE/replicate.h
+FHE/timing.h
+lib/libfhe.a
diff --git a/security/HElib/distinfo b/security/HElib/distinfo
new file mode 100644
index 00000000000..66c915e2f24
--- /dev/null
+++ b/security/HElib/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.1.1.1 2013/05/18 18:36:25 agc Exp $
+
+SHA1 (HElib-20130501.zip) = 4f10c723eda202442550b89d98da8b9f4fdca013
+RMD160 (HElib-20130501.zip) = 729115076c6e90584cf5380694903631764849fb
+Size (HElib-20130501.zip) = 2287320 bytes
+SHA1 (patch-Makefile) = e3a867712039b83f2c49c4dec2e5ff0a6c26f6ac
diff --git a/security/HElib/patches/patch-Makefile b/security/HElib/patches/patch-Makefile
new file mode 100644
index 00000000000..a47a18a9045
--- /dev/null
+++ b/security/HElib/patches/patch-Makefile
@@ -0,0 +1,46 @@
+$NetBSD: patch-Makefile,v 1.1.1.1 2013/05/18 18:36:25 agc Exp $
+
+adapt for pkgsrc
+add an install target
+
+--- Makefile.orig 2013-04-30 14:31:26.000000000 -0700
++++ Makefile 2013-05-07 11:20:59.000000000 -0700
+@@ -16,7 +16,7 @@
+ CC = g++
+ #CFLAGS = -g -Wall -O3 -I/usr/local/include
+ #CFLAGS = -g -Wall -I/usr/local/include
+-CFLAGS = -g -O2 -Wfatal-errors -Wshadow -Wall -I/usr/local/include
++CFLAGS = -g -Wall -O2 -I${PREFIX}/include
+ #CFLAGS = -pg -Wall -I/usr/local/include
+ LD = g++
+
+@@ -41,12 +41,12 @@
+ all: fhe.a
+
+ check: Test_General_x
+- Test_General_x R=1 k=10 p=2 r=1 d=1
+- Test_General_x R=1 k=10 p=2 r=2 d=1
+- Test_General_x R=1 k=10 p=2 r=1 d=2
+- Test_General_x R=1 k=10 p=3 r=1 d=1
+- Test_General_x R=1 k=10 p=3 r=2 d=1
+- Test_General_x R=1 k=10 p=3 r=1 d=2
++ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=2 r=1 d=1
++ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=2 r=2 d=1
++ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=2 r=1 d=2
++ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=3 r=1 d=1
++ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=3 r=2 d=1
++ env LD_LIBRARY_PATH=${PREFIX}/lib ./Test_General_x R=1 k=10 p=3 r=1 d=2
+
+ test: $(TESTPROGS)
+
+@@ -64,3 +64,10 @@
+ clean:
+ rm -f *.o *_x *_x.exe *.a core.*
+ rm -rf *.dSYM
++
++install:
++ ${BSD_INSTALL_LIB} fhe.a ${DESTDIR}${PREFIX}/lib/libfhe.a
++ ${BSD_INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/FHE
++ for h in ${HEADER}; do \
++ ${BSD_INSTALL_DATA} $$h ${DESTDIR}${PREFIX}/FHE/$$h; \
++ done