pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/security Import libstark-20191018 into the packages co...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/51628123df92
branches:  trunk
changeset: 343020:51628123df92
user:      agc <agc%pkgsrc.org@localhost>
date:      Mon Oct 28 17:46:58 2019 +0000

description:
Import libstark-20191018 into the packages collection

        The libSTARK library implements scalable and transparent argument of
        knowledge (STARK) systems.  These systems can be executed with, or
        without, zero knowledge (ZK), and may be designed as either
        interactive or non-interactive protocols.  The theoretical
        constructions which this library implements are described in detail in
        the zk-STARK paper:

        Scalable, transparent, and post-quantum secure computational integrity
        Eli Ben-Sasson and Iddo Bentov and Yinon Horesh and Michael Riabzev

                https://eprint.iacr.org/2018/046

diffstat:

 security/Makefile                                                                 |   3 +-
 security/libstark/DESCR                                                           |  11 +++
 security/libstark/Makefile                                                        |  29 ++++++++
 security/libstark/PLIST                                                           |   3 +
 security/libstark/distinfo                                                        |  13 +++
 security/libstark/patches/patch-algebra__algebralib-tests__Makefile               |  15 ++++
 security/libstark/patches/patch-algebra__algebralib__src__ErrorHandling.cpp       |  15 ++++
 security/libstark/patches/patch-libstark-tests__Makefile                          |  15 ++++
 security/libstark/patches/patch-libstark__src__common__Utils__ErrorHandling.cpp   |  15 ++++
 security/libstark/patches/patch-libstark__src__protocols__Ali__prover.cpp         |  33 ++++++++++
 security/libstark/patches/patch-tinyram__gadgetlib__gadgetlib__infrastructure.cpp |  33 ++++++++++
 security/libstark/patches/patch-tinyram__stark-tinyram-tests__Makefile            |  15 ++++
 12 files changed, 199 insertions(+), 1 deletions(-)

diffs (258 lines):

diff -r 0d48d3cea5ee -r 51628123df92 security/Makefile
--- a/security/Makefile Mon Oct 28 17:32:35 2019 +0000
+++ b/security/Makefile Mon Oct 28 17:46:58 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.713 2019/10/25 11:14:32 nia Exp $
+# $NetBSD: Makefile,v 1.714 2019/10/28 17:46:58 agc Exp $
 #
 
 COMMENT=       Security tools
@@ -184,6 +184,7 @@
 SUBDIR+=       libsodium
 SUBDIR+=       libssh
 SUBDIR+=       libssh2
+SUBDIR+=       libstark
 SUBDIR+=       libtasn1
 SUBDIR+=       libtcpa
 SUBDIR+=       libtomcrypt
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/DESCR   Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,11 @@
+The libSTARK library implements scalable and transparent argument of
+knowledge (STARK) systems.  These systems can be executed with, or
+without, zero knowledge (ZK), and may be designed as either
+interactive or non-interactive protocols.  The theoretical
+constructions which this library implements are described in detail in
+the zk-STARK paper:
+
+Scalable, transparent, and post-quantum secure computational integrity
+Eli Ben-Sasson and Iddo Bentov and Yinon Horesh and Michael Riabzev
+
+       https://eprint.iacr.org/2018/046
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/Makefile        Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,29 @@
+# $NetBSD: Makefile,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+DISTNAME=      libstark-20191018
+CATEGORIES=    security devel
+MASTER_SITES=  ${MASTER_SITE_GITHUB:=elibensasson/}
+GITHUB_PROJECT=        libSTARK
+GITHUB_TAG=    11c72adf909e259aa20a36317e22108784f6dd73
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      https://github.com/elibensasson/
+COMMENT=       Library for succinct non-interactive zero knowledge proofs
+LICENSE=       mit
+
+BUILD_TARGET=  default
+TEST_TARGET=   tests
+
+USE_TOOLS+=    gmake
+USE_LANGUAGES= c c++11
+
+AUTO_MKDIRS=   yes
+
+do-install:
+       for f in stark-dpm stark-tinyram; do                            \
+               ${INSTALL_PROGRAM} ${WRKSRC}/$$f ${DESTDIR}${PREFIX}/bin/; \
+       done
+
+.include "../../devel/googletest/buildlink3.mk"
+
+.include "../../mk/bsd.pkg.mk"
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/PLIST   Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2019/10/28 17:46:58 agc Exp $
+bin/stark-dpm
+bin/stark-tinyram
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/distinfo        Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,13 @@
+$NetBSD: distinfo,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+SHA1 (libstark-20191018-11c72adf909e259aa20a36317e22108784f6dd73.tar.gz) = 3e609b75229f80a18601728a2aabe575ba1fdae8
+RMD160 (libstark-20191018-11c72adf909e259aa20a36317e22108784f6dd73.tar.gz) = 1567c6807ee15488452030ae2c5644e80c5309aa
+SHA512 (libstark-20191018-11c72adf909e259aa20a36317e22108784f6dd73.tar.gz) = 
049d0dc9605923f3975127528680a1e2d18c31eebd48aba95b3272d4ae95aec5833250c9094d491d8d8acbb02cc54332d2462203698c203bc42c6a8f72f8a1ad
+Size (libstark-20191018-11c72adf909e259aa20a36317e22108784f6dd73.tar.gz) = 358152 bytes
+SHA1 (patch-algebra__algebralib-tests__Makefile) = 4bd9e24561ca3d9ea38b826be7d8639c94af2df1
+SHA1 (patch-algebra__algebralib__src__ErrorHandling.cpp) = 3343a878efc35ee4001ffeea8e10bd9f02244863
+SHA1 (patch-libstark-tests__Makefile) = e389d5907c199dfabe2942751c853b89085c518c
+SHA1 (patch-libstark__src__common__Utils__ErrorHandling.cpp) = c3ee3bfbbe078b80ef81a2d9ff1a182a21088df0
+SHA1 (patch-libstark__src__protocols__Ali__prover.cpp) = 68b1a7827c0a821bb4e5e2dcc5a37ffca7f06977
+SHA1 (patch-tinyram__gadgetlib__gadgetlib__infrastructure.cpp) = 4d0f10b58e2cc4de0fe54add60f7490ea3d83872
+SHA1 (patch-tinyram__stark-tinyram-tests__Makefile) = dab5fcdcee388a8d8a0b1768841aa7e24ae1918a
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-algebra__algebralib-tests__Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-algebra__algebralib-tests__Makefile       Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-algebra__algebralib-tests__Makefile,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+Find gtest in appropriate place 
+
+--- algebra/algebralib-tests/Makefile  2019/10/19 04:42:41     1.1
++++ algebra/algebralib-tests/Makefile  2019/10/19 04:43:13
+@@ -15,7 +15,7 @@
+       FFT
+ 
+ LIBFLAGS=$(addprefix -l, $(LIBS))
+-LNKFLAGS=-L"$(ALGEBRALNKDIR)" -L"$(FFTLIBLNKDIR)" -lgomp
++LNKFLAGS=-L"$(ALGEBRALNKDIR)" -L"$(FFTLIBLNKDIR)" -L${PREFIX}/lib -lgomp
+ 
+ TARGET=$(BLDDIR)/algebralib_tests
+ 
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-algebra__algebralib__src__ErrorHandling.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-algebra__algebralib__src__ErrorHandling.cpp       Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-algebra__algebralib__src__ErrorHandling.cpp,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+Linux has backtrace(), so change the cpp definition
+
+--- algebra/algebralib/src/ErrorHandling.cpp   2019/10/19 04:04:58     1.1
++++ algebra/algebralib/src/ErrorHandling.cpp   2019/10/19 04:05:39
+@@ -79,7 +79,7 @@
+       }
+ 
+       void ErrorHandling::printStacktrace() {
+-#ifdef __GNUC__
++#ifdef __linux__
+               std::cerr << "Stack trace (pipe through c++filt to demangle identifiers):" << std::endl;
+               const int maxFrames = 100;
+               void* frames[maxFrames];
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-libstark-tests__Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-libstark-tests__Makefile  Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-libstark-tests__Makefile,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+Find libgtest as well
+
+--- libstark-tests/Makefile    2019/10/19 04:37:04     1.1
++++ libstark-tests/Makefile    2019/10/19 04:37:45
+@@ -12,7 +12,7 @@
+       FFT
+ 
+ LIBFLAGS=$(addprefix -l, $(LIBS))
+-LNKFLAGS=-L"$(ALGEBRALNKDIR)" -L"$(FFTLIBLNKDIR)" -L"$(LIBSTARKLINKDIR)" -lgomp
++LNKFLAGS=-L"$(ALGEBRALNKDIR)" -L"$(FFTLIBLNKDIR)" -L"$(LIBSTARKLINKDIR)" -L${PREFIX}/lib -lgomp
+ 
+ SRCDIR  = .
+ SRCEXT  = cpp
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-libstark__src__common__Utils__ErrorHandling.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-libstark__src__common__Utils__ErrorHandling.cpp   Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-libstark__src__common__Utils__ErrorHandling.cpp,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+backtrace() available on linux
+
+--- libstark/src/common/Utils/ErrorHandling.cpp        2019/10/19 04:10:03     1.1
++++ libstark/src/common/Utils/ErrorHandling.cpp        2019/10/19 04:10:31
+@@ -53,7 +53,7 @@
+ }
+ 
+ void ErrorHandling::printStacktrace() {
+-#ifdef __GNUC__
++#ifdef __linux__
+       cerr << "Stack trace (pipe through c++filt to demangle identifiers):" << endl;
+       const int maxFrames = 100;
+       void* frames[maxFrames];
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-libstark__src__protocols__Ali__prover.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-libstark__src__protocols__Ali__prover.cpp Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-libstark__src__protocols__Ali__prover.cpp,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+NetBSD has no sys/sysinfo.h
+
+--- libstark/src/protocols/Ali/prover.cpp      2019/10/19 04:15:01     1.1
++++ libstark/src/protocols/Ali/prover.cpp      2019/10/19 04:15:57
+@@ -6,7 +6,7 @@
+ #include "reductions/BairToAcsp/BairToAcsp.hpp"
+ 
+ #include <set>
+-#if __GNUG__
++#if __linux__
+ #include <sys/sysinfo.h>
+ #endif
+ 
+@@ -165,7 +165,7 @@
+                 unsigned short logVM;
+                 //compute RAM amount on current machine
+                 {
+-#if __GNUG__
++#if __linux__
+                     struct sysinfo info;
+                     sysinfo(&info);
+                     logRAM = std::floor(Log2(info.totalram));
+@@ -585,7 +585,7 @@
+             unsigned short logRAM;
+             //compute RAM amount on current machine
+             {
+-#if __GNUG__
++#if __linux__
+                 struct sysinfo info;
+                 sysinfo(&info);
+                 logRAM = Log2(std::round(info.totalram));
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-tinyram__gadgetlib__gadgetlib__infrastructure.cpp
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-tinyram__gadgetlib__gadgetlib__infrastructure.cpp Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,33 @@
+$NetBSD: patch-tinyram__gadgetlib__gadgetlib__infrastructure.cpp,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+linux has backtrace()
+
+--- tinyram/gadgetlib/gadgetlib/infrastructure.cpp     2019/10/19 04:23:13     1.1
++++ tinyram/gadgetlib/gadgetlib/infrastructure.cpp     2019/10/19 04:23:50
+@@ -17,7 +17,7 @@
+ #include <unistd.h>
+ #include <cstdio>
+ #endif
+-#ifdef __GLIBC__
++#ifdef __linux__
+ #include <execinfo.h> // backtraces
+ #endif
+ 
+@@ -81,7 +81,7 @@
+       }
+ 
+       void ErrorHandling::printStacktrace() {
+-#ifdef __GNUC__
++#ifdef __linux__
+               std::cerr << "Stack trace (pipe through c++filt to demangle identifiers):" << std::endl;
+               const int maxFrames = 100;
+               void* frames[maxFrames];
+@@ -92,7 +92,7 @@
+ #else
+               //TODO make this available for Windows
+               std::cerr << "  (stack trace not available on this platform)" << std::endl;
+-#endif // __GNUC__
++#endif // __linux__
+       }
+ 
+       /*****************************************************************************/
diff -r 0d48d3cea5ee -r 51628123df92 security/libstark/patches/patch-tinyram__stark-tinyram-tests__Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/security/libstark/patches/patch-tinyram__stark-tinyram-tests__Makefile    Mon Oct 28 17:46:58 2019 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-tinyram__stark-tinyram-tests__Makefile,v 1.1 2019/10/28 17:46:58 agc Exp $
+
+Find gtest lib in right place
+
+--- tinyram/stark-tinyram-tests/Makefile       2019/10/19 04:45:20     1.1
++++ tinyram/stark-tinyram-tests/Makefile       2019/10/19 04:45:42
+@@ -13,7 +13,7 @@
+       FFT
+ 
+ LIBFLAGS=$(addprefix -l, $(LIBS))
+-LNKFLAGS=-L"$(ALGEBRALNKDIR)" -L"$(FFTLIBLNKDIR)" -L"$(GADGET3LNKDIR)" -L"$(LIBSTARKLINKDIR)" -lgomp
++LNKFLAGS=-L"$(ALGEBRALNKDIR)" -L"$(FFTLIBLNKDIR)" -L"$(GADGET3LNKDIR)" -L"$(LIBSTARKLINKDIR)" -L${PREFIX}/lib -lgomp
+ 
+ SRCS:=        $(shell ls *.cpp)
+ OBJS=$(addprefix $(BLDDIR)/, $(SRCS:.cpp=.o))



Home | Main Index | Thread Index | Old Index