Add security/libdecaf

Implementation of elliptic curve cryptography using the Montgomery
and Edwards curves Curve25519, Ed25519, Ed448-Goldilocks and
Curve448, using the Decaf / Ristretto encoding.

Approved by:	mat (mentor)
This commit is contained in:
Kirill Ponomarev 2018-01-08 17:11:27 +00:00
parent c425ccee01
commit 14be0111ee
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458457
5 changed files with 83 additions and 0 deletions

View file

@ -329,6 +329,7 @@
SUBDIR += libbeid
SUBDIR += libbf
SUBDIR += libcryptui
SUBDIR += libdecaf
SUBDIR += libecc
SUBDIR += libfprint
SUBDIR += libgcrypt

View file

@ -0,0 +1,29 @@
# $FreeBSD$
PORTNAME= libdecaf
PORTVERSION= 0.9.4
CATEGORIES= security
MASTER_SITES= SF/ed448goldilocks/
MAINTAINER= krion@FreeBSD.org
COMMENT= Implementation of elliptic curve cryptography
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
USES= gmake python:2.7 tar:tgz
USE_LDCONFIG= yes
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_FILES= bin/ristretto bin/shakesum \
lib/libdecaf.so lib/libdecaf.so.1
post-patch:
@${REINPLACE_CMD} -e 's|PYTHON ?= python|PYTHON ?= ${PYTHON_CMD}|g' \
${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/build/bin/* ${STAGEDIR}${PREFIX}/bin/
${INSTALL_LIB} ${WRKSRC}/build/lib/* ${STAGEDIR}${PREFIX}/lib/
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1515406054
SHA256 (libdecaf-0.9.4.tgz) = 6b0b6dc77a8dec88ea5b45902f8211d9f6c55b3346191dcd0aaeeb45a8d23f7f
SIZE (libdecaf-0.9.4.tgz) = 557122

View file

@ -0,0 +1,45 @@
--- Makefile.orig 2018-01-08 13:58:29 UTC
+++ Makefile
@@ -19,7 +19,7 @@ BUILD_IBIN = build/obj/bin
DOXYGEN ?= doxygen
-ifeq ($(UNAME),Darwin)
+ifeq ($(UNAME),FreeBSD)
CC = clang
CXX = clang++
else
@@ -97,14 +97,14 @@ scan: clean
# Internal test programs, which are not part of the final build/bin directory.
$(BUILD_IBIN)/test: $(BUILD_OBJ)/test_decaf.o lib
-ifeq ($(UNAME),Darwin)
+ifeq ($(UNAME),FreeBSD)
$(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf
else
$(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf
endif
$(BUILD_BIN)/ristretto: $(BUILD_OBJ)/ristretto.o lib
-ifeq ($(UNAME),Darwin)
+ifeq ($(UNAME),FreeBSD)
$(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf
else
$(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf
@@ -112,14 +112,14 @@ endif
# Internal test programs, which are not part of the final build/bin directory.
$(BUILD_IBIN)/test_ct: $(BUILD_OBJ)/test_ct.o lib
-ifeq ($(UNAME),Darwin)
+ifeq ($(UNAME),FreeBSD)
$(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf
else
$(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf
endif
$(BUILD_IBIN)/bench: $(BUILD_OBJ)/bench_decaf.o lib
-ifeq ($(UNAME),Darwin)
+ifeq ($(UNAME),FreeBSD)
$(LDXX) $(LDFLAGS) -o $@ $< -L$(BUILD_LIB) -ldecaf
else
$(LDXX) $(LDFLAGS) -Wl,-rpath,`pwd`/$(BUILD_LIB) -o $@ $< -L$(BUILD_LIB) -ldecaf

View file

@ -0,0 +1,5 @@
Implementation of elliptic curve cryptography using the Montgomery
and Edwards curves Curve25519, Ed25519, Ed448-Goldilocks and
Curve448, using the Decaf / Ristretto encoding.
WWW: http://ed448goldilocks.sourceforge.net/