svn commit: r548687 - in head/security: . heaan heaan/files
Yuri Victorovich
yuri at FreeBSD.org
Mon Sep 14 23:56:46 UTC 2020
Author: yuri
Date: Mon Sep 14 23:56:44 2020
New Revision: 548687
URL: https://svnweb.freebsd.org/changeset/ports/548687
Log:
New port: security/heaan: Library that implements homomorphic encryption
Added:
head/security/heaan/
head/security/heaan/Makefile (contents, props changed)
head/security/heaan/distinfo (contents, props changed)
head/security/heaan/files/
head/security/heaan/files/patch-makefile (contents, props changed)
head/security/heaan/files/patch-src_subdir.mk (contents, props changed)
head/security/heaan/pkg-descr (contents, props changed)
head/security/heaan/pkg-plist (contents, props changed)
Modified:
head/security/Makefile
Modified: head/security/Makefile
==============================================================================
--- head/security/Makefile Mon Sep 14 22:45:18 2020 (r548686)
+++ head/security/Makefile Mon Sep 14 23:56:44 2020 (r548687)
@@ -205,6 +205,7 @@
SUBDIR += hardening-check
SUBDIR += hashcat
SUBDIR += hashcat-legacy
+ SUBDIR += heaan
SUBDIR += heimdal
SUBDIR += helib
SUBDIR += highwayhash
Added: head/security/heaan/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/heaan/Makefile Mon Sep 14 23:56:44 2020 (r548687)
@@ -0,0 +1,48 @@
+# $FreeBSD$
+
+PORTNAME= heaan
+DISTVERSION= 2.1-40
+DISTVERSIONSUFFIX= -g48a1ed0
+CATEGORIES= security math
+
+MAINTAINER= yuri at FreeBSD.org
+COMMENT= Library that implements homomorphic encryption
+
+LICENSE= CC-BY-3.0
+LICENSE_FILE= ${WRKSRC}/../../LICENSE
+
+LIB_DEPENDS= libntl.so:math/ntl
+
+USES= compiler:c++11-lang gmake localbase:ldflags
+USE_GITHUB= yes
+GH_ACCOUNT= snucrypto
+GH_PROJECT= ${PORTNAME:tu}
+USE_LDCONFIG= yes
+
+MAKEFILE= makefile
+
+WRKSRC_SUBDIR= HEAAN/lib
+
+CXXFLAGS+= -fPIC
+
+BINARY_ALIAS= g++=${CXX}
+
+post-patch: # for tests, otherwise they try to use static libs
+ @${REINPLACE_CMD} 's|-L/usr/local/lib ../lib/libHEAAN.a|$$(CXXFLAGS) $$(LDFLAGS) ../lib/libHEAAN.so|' ${WRKSRC}/../run/makefile
+
+do-install: # no install target: https://github.com/snucrypto/HEAAN/issues/47
+ ${MKDIR} ${STAGEDIR}${PREFIX}/include/${PORTNAME}
+ cd ${WRKSRC}/../src && ${COPYTREE_SHARE} \*.h ${STAGEDIR}${PREFIX}/include/${PORTNAME}
+ ${INSTALL_LIB} ${WRKSRC}/libHEAAN.so ${STAGEDIR}${PREFIX}/lib
+
+do-test: # available tests are listed in HEAAN/run/test.cpp
+ @cd ${WRKSRC}/../run && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} && \
+ ./TestHEAAN Encrypt && \
+ ./TestHEAAN EncryptSingle && \
+ ./TestHEAAN Add && \
+ ./TestHEAAN Mult && \
+ ./TestHEAAN iMult && \
+ ./TestHEAAN RotateFast && \
+ ./TestHEAAN Conjugate
+
+.include <bsd.port.mk>
Added: head/security/heaan/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/heaan/distinfo Mon Sep 14 23:56:44 2020 (r548687)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1600127297
+SHA256 (snucrypto-HEAAN-2.1-40-g48a1ed0_GH0.tar.gz) = a944d5004759c8d55dfec51e62e0089ba9c8d8b26e35b8f4c49f807b3b9bda50
+SIZE (snucrypto-HEAAN-2.1-40-g48a1ed0_GH0.tar.gz) = 81943
Added: head/security/heaan/files/patch-makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/heaan/files/patch-makefile Mon Sep 14 23:56:44 2020 (r548687)
@@ -0,0 +1,19 @@
+--- makefile.orig 2020-02-08 04:35:40 UTC
++++ makefile
+@@ -38,13 +38,13 @@ endif
+ # Add inputs and outputs from these tool invocations to the build variables
+
+ # All Target
+-all: libHEAAN.a
++all: libHEAAN.so
+
+ # Tool invocations
+-libHEAAN.a: $(OBJS) $(USER_OBJS)
++libHEAAN.so: $(OBJS) $(USER_OBJS)
+ @echo 'Building target: $@'
+ @echo 'Invoking: GCC Archiver'
+- ar -r "libHEAAN.a" $(OBJS) $(USER_OBJS) $(LIBS)
++ $(CXX) -shared -o "libHEAAN.so" $(OBJS) $(USER_OBJS) $(LIBS) $(LOCALBASE)/lib/libntl.so
+ @echo 'Finished building target: $@'
+ @echo ' '
+
Added: head/security/heaan/files/patch-src_subdir.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/heaan/files/patch-src_subdir.mk Mon Sep 14 23:56:44 2020 (r548687)
@@ -0,0 +1,11 @@
+--- src/subdir.mk.orig 2020-02-19 03:33:58 UTC
++++ src/subdir.mk
+@@ -56,7 +56,7 @@ CPP_DEPS += \
+ src/%.o: ../src/%.cpp
+ @echo 'Building file: $<'
+ @echo 'Invoking: GCC C++ Compiler'
+- g++ -I/usr/local/include -O3 -c -std=c++11 -pthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
++ g++ -I/usr/local/include $(CXXFLAGS) -c -std=c++11 -pthread -MMD -MP -MF"$(@:%.o=%.d)" -MT"$(@)" -o "$@" "$<"
+ @echo 'Finished building: $<'
+ @echo ' '
+
Added: head/security/heaan/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/heaan/pkg-descr Mon Sep 14 23:56:44 2020 (r548687)
@@ -0,0 +1,8 @@
+HEAAN is software library that implements homomorphic encryption (HE) that
+supports fixed point arithmetics. This library supports approximate
+operations between rational numbers. The approximate error depends on some
+parameters and almost same with floating point operation errors. The scheme in
+this library is on the paper "Homomorphic Encryption for Arithmetic of
+Approximate Numbers".
+
+WWW: https://github.com/snucrypto/HEAAN
Added: head/security/heaan/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/heaan/pkg-plist Mon Sep 14 23:56:44 2020 (r548687)
@@ -0,0 +1,17 @@
+include/heaan/BootContext.h
+include/heaan/Ciphertext.h
+include/heaan/EvaluatorUtils.h
+include/heaan/HEAAN.h
+include/heaan/Key.h
+include/heaan/Params.h
+include/heaan/Plaintext.h
+include/heaan/Ring.h
+include/heaan/RingMultiplier.h
+include/heaan/Scheme.h
+include/heaan/SchemeAlgo.h
+include/heaan/SecretKey.h
+include/heaan/SerializationUtils.h
+include/heaan/StringUtils.h
+include/heaan/TestScheme.h
+include/heaan/TimeUtils.h
+lib/libHEAAN.so
More information about the svn-ports-all
mailing list