summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorfox <fox@pkgsrc.org>2019-08-11 16:47:52 +0000
committerfox <fox@pkgsrc.org>2019-08-11 16:47:52 +0000
commit2d5aaff68e1f6942ea518920635eb9196097d663 (patch)
tree6bf302d007ef2e1f3eea40603867f78607649f6f /security
parent52579f2d917ace0a19d1463a9db65dbdcf6c12ad (diff)
downloadpkgsrc-2d5aaff68e1f6942ea518920635eb9196097d663.tar.gz
Import of libdecaf 1.0.0 as security/libdecaf
Implementation of elliptic curve cryptography using the Montgomery and Edwards curves Curve25519, Ed25519, Ed448-Goldilocks and Curve448, using the Decaf / Ristretto encoding.
Diffstat (limited to 'security')
-rw-r--r--security/libdecaf/DESCR3
-rw-r--r--security/libdecaf/Makefile33
-rw-r--r--security/libdecaf/PLIST26
-rw-r--r--security/libdecaf/buildlink3.mk14
-rw-r--r--security/libdecaf/distinfo7
-rw-r--r--security/libdecaf/patches/patch-src_CMakeLists.txt18
6 files changed, 101 insertions, 0 deletions
diff --git a/security/libdecaf/DESCR b/security/libdecaf/DESCR
new file mode 100644
index 00000000000..31fc39675d3
--- /dev/null
+++ b/security/libdecaf/DESCR
@@ -0,0 +1,3 @@
+Implementation of elliptic curve cryptography using the Montgomery
+and Edwards curves Curve25519, Ed25519, Ed448-Goldilocks and
+Curve448, using the Decaf / Ristretto encoding.
diff --git a/security/libdecaf/Makefile b/security/libdecaf/Makefile
new file mode 100644
index 00000000000..32238a8351b
--- /dev/null
+++ b/security/libdecaf/Makefile
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1 2019/08/11 16:47:52 fox Exp $
+
+DISTNAME= libdecaf-1.0.0
+CATEGORIES= security
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ed448goldilocks/}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= fox@NetBSD.org
+HOMEPAGE= http://ed448goldilocks.sourceforge.net/
+COMMENT= Implementation of Ed448-Goldilocks elliptic curve for cryptography
+LICENSE= mit
+
+USE_CMAKE= yes
+USE_LANGUAGES= c99 c++11
+CMAKE_ARGS+= -DENABLE_TESTS=YES
+
+# These are required to prevent build breakage when tests are enabled
+# This is probably due to the auto-generated headers clobbering with
+# the #defines
+CFLAGS.NetBSD+= -D_NETBSD_SOURCE
+
+PYTHON_FOR_BUILD_ONLY= tool
+
+# XXX: Avoid to pick up possibe installed libdecaf.so
+TEST_ENV+= LD_LIBRARY_PATH=${WRKSRC}/src
+
+TEST_TARGET= test
+
+post-install:
+ ${CHMOD} -x ${DESTDIR}${PREFIX}/lib/libdecaf.a
+
+.include "../../lang/python/pyversion.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/security/libdecaf/PLIST b/security/libdecaf/PLIST
new file mode 100644
index 00000000000..c2559e3dbc8
--- /dev/null
+++ b/security/libdecaf/PLIST
@@ -0,0 +1,26 @@
+@comment $NetBSD: PLIST,v 1.1 2019/08/11 16:47:52 fox Exp $
+include/decaf.h
+include/decaf.hxx
+include/decaf/common.h
+include/decaf/ed255.h
+include/decaf/ed255.hxx
+include/decaf/ed448.h
+include/decaf/ed448.hxx
+include/decaf/eddsa.hxx
+include/decaf/point_255.h
+include/decaf/point_255.hxx
+include/decaf/point_448.h
+include/decaf/point_448.hxx
+include/decaf/secure_buffer.hxx
+include/decaf/sha512.h
+include/decaf/sha512.hxx
+include/decaf/shake.h
+include/decaf/shake.hxx
+include/decaf/spongerng.h
+include/decaf/spongerng.hxx
+lib/libdecaf.a
+lib/libdecaf.so
+lib/libdecaf.so.0
+share/decaf/cmake/DecafConfig.cmake
+share/decaf/cmake/DecafTargets-noconfig.cmake
+share/decaf/cmake/DecafTargets.cmake
diff --git a/security/libdecaf/buildlink3.mk b/security/libdecaf/buildlink3.mk
new file mode 100644
index 00000000000..9528d9e60cf
--- /dev/null
+++ b/security/libdecaf/buildlink3.mk
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2019/08/11 16:47:52 fox Exp $
+
+BUILDLINK_TREE+= libdecaf
+
+.if !defined(LIBDECAF_BUILDLINK3_MK)
+LIBDECAF_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.libdecaf+= libdecaf>=1.0.0
+BUILDLINK_ABI_DEPENDS.libdecaf+= libdecaf>=1.0.0
+BUILDLINK_PKGSRCDIR.libdecaf?= ../../security/libdecaf
+
+.endif # LIBDECAF_BUILDLINK3_MK
+
+BUILDLINK_TREE+= -libdecaf
diff --git a/security/libdecaf/distinfo b/security/libdecaf/distinfo
new file mode 100644
index 00000000000..c217325a38e
--- /dev/null
+++ b/security/libdecaf/distinfo
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2019/08/11 16:47:52 fox Exp $
+
+SHA1 (libdecaf-1.0.0.tgz) = c36a3b392763d6ddae4304a7e4c48353d8f1f474
+RMD160 (libdecaf-1.0.0.tgz) = 1ff710c56f2e0682547ed78dc427893b40604c06
+SHA512 (libdecaf-1.0.0.tgz) = 0a962fe01e73655db98c98692938794d6ec4cee5656f9a6172ab24e385882229f9163d09212b2a13bff874623c18befb6aaa2f0ed65aa638e1a3c56dd3e124c0
+Size (libdecaf-1.0.0.tgz) = 614589 bytes
+SHA1 (patch-src_CMakeLists.txt) = f9ddfd9e6d3e334d310bfed9f2542477ba2cf9a6
diff --git a/security/libdecaf/patches/patch-src_CMakeLists.txt b/security/libdecaf/patches/patch-src_CMakeLists.txt
new file mode 100644
index 00000000000..0a26cfd2a0b
--- /dev/null
+++ b/security/libdecaf/patches/patch-src_CMakeLists.txt
@@ -0,0 +1,18 @@
+$NetBSD: patch-src_CMakeLists.txt,v 1.1 2019/08/11 16:47:52 fox Exp $
+
+Do not create a include/decaf/decaf.
+
+Removed the trailing decaf so that the directory containing the
+includes is include/decaf.
+
+--- src/CMakeLists.txt.orig 2019-05-05 22:55:13.720148509 +0000
++++ src/CMakeLists.txt
+@@ -119,7 +119,7 @@ if(ENABLE_SHARED)
+ endif()
+
+ install(DIRECTORY ${GSOURCE_PATH}/include/
+- DESTINATION include/decaf
++ DESTINATION include
+ FILES_MATCHING PATTERN "*.h*"
+ PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
+ )