From nobody Mon Jul 17 20:46:04 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R4YyN4dMKz4myHj; Mon, 17 Jul 2023 20:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R4YyN40Phz4JkV; Mon, 17 Jul 2023 20:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689626764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7V4rG8qoMRQqHqN+/dDPKdewGSQR2Cp0cEQ21kHU0yk=; b=vNRpOR/U3RN278Oydz1P5Av1e7vpxqsjj4fqyCF/OgLaj7x0OkhjrfRB7Zw/+aEYZ1XJCQ QPoO5lMoIxtlIU+GbfC0PYMR+5R9Bi01OomlgjZ85PVBU69C2S4C/liJAUAbbTIXrEQ3+z hMW5siKeGLfdojbXKeAPFYKuVyv7XDHIRsqfxlLJSuQPwpadW0mwkyTAWSk3IFl+NOgCog Tb5xx8vaq47bAHX/yA6T50KmOHd0teXeasTTCoBoCjqof5ltkfjSgqGZFbrwrxWXiJQg6f Bl87wzCs7RlYAe/FsNmeYLpOeMkgogITJhJouQVbWE60kRewuEc4kqShzR2YyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689626764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7V4rG8qoMRQqHqN+/dDPKdewGSQR2Cp0cEQ21kHU0yk=; b=sCEbYmjR7+RGzNhFAz4cPs852ag82Cj99p1WrOc0kNrWPsodHLZGzRGCd+PVTOnPlcV9kL 02q/wHNhuuqU3iUUWGmyMmxM1gdT9UluIUWjl3QgzG4Czhrz226PfVOvYfJUrc7Ztfwzag wEfID/BCmWM4i7BolTwCIgPccj3JfRoVMidtdSU4cc1W51vmHfcXktJjrpuroRCyJo103W CviELKmDmrUYxj9dTPqjjLYN9oMsBc9J9V5WIrcskwsh6l85C3BJ83aLIGguYOSIo3aOT5 Yl7Og9ebgaQfrLwgC8YVQDKTrozSxdTTETJICxIKQn54ANZWafaRV94V2R+Qpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689626764; a=rsa-sha256; cv=none; b=WVFktl0H/7Mh4JkNu8eh/IBF45FXvq3+EFmjiM52CEpFC1f42S18Gw7nrQjcfIauUD60yj PvrC0D58R0WBihUwx0icrqG0o2qYM4F8Qw0ss+4IGeWW43Vr0wnpCOhVpNSHW15bvUh7/T 0NeSN/bL/aE5tx+JT57zBp6G0+afuYjXj1UTyQRXrplAbXERtQHKlV8kOwDH5dZxpe/gsA YCZWGPhV8Y7biU15SXj3rsDD+5387HD6bTwu06jWdz6brO1wx2cbX30qSWQ6axDCBHhb2U LpNrJ+ewsPFcaGkS7fH0m8DBLVRNtSLNOB4EvIPzWBzZO7brx69Toi3GeNnMxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R4YyN32kjzdld; Mon, 17 Jul 2023 20:46:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36HKk4Dt078358; Mon, 17 Jul 2023 20:46:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36HKk478078357; Mon, 17 Jul 2023 20:46:04 GMT (envelope-from git) Date: Mon, 17 Jul 2023 20:46:04 GMT Message-Id: <202307172046.36HKk478078357@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 3ebf55c3f3c6 - main - security/monocypher: NEW PORT - easy to use, deploy, auditable crypto library List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3ebf55c3f3c6f0245fc20eabd7956b4c9acb5511 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=3ebf55c3f3c6f0245fc20eabd7956b4c9acb5511 commit 3ebf55c3f3c6f0245fc20eabd7956b4c9acb5511 Author: Dave Cottlehuber AuthorDate: 2023-07-17 20:43:22 +0000 Commit: Dave Cottlehuber CommitDate: 2023-07-17 20:45:41 +0000 security/monocypher: NEW PORT - easy to use, deploy, auditable crypto library It is written in portable C, and approaches the size of TweetNaCl, and the speed of libsodium. Reviewed by: zirias Sponsored by: SkunkWerks, GmbH --- security/Makefile | 1 + security/monocypher/Makefile | 20 ++++++++++ security/monocypher/distinfo | 3 ++ security/monocypher/files/patch-makefile | 22 +++++++++++ security/monocypher/pkg-descr | 15 ++++++++ security/monocypher/pkg-plist | 66 ++++++++++++++++++++++++++++++++ 6 files changed, 127 insertions(+) diff --git a/security/Makefile b/security/Makefile index 1ca071f87b2e..e6b0233a393c 100644 --- a/security/Makefile +++ b/security/Makefile @@ -366,6 +366,7 @@ SUBDIR += modsecurity3 SUBDIR += modsecurity3-nginx SUBDIR += monkeysphere + SUBDIR += monocypher SUBDIR += munge SUBDIR += n2n SUBDIR += ncrack diff --git a/security/monocypher/Makefile b/security/monocypher/Makefile new file mode 100644 index 000000000000..86f5916f3566 --- /dev/null +++ b/security/monocypher/Makefile @@ -0,0 +1,20 @@ +PORTNAME= monocypher +DISTVERSION= 4.0.1 +CATEGORIES= security +MASTER_SITES= https://monocypher.org/download/ + +MAINTAINER= dch@FreeBSD.org +COMMENT= Compact cryptographic library in C +WWW= https://monocypher.org/ + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENCE.md + +USE_CSTD= c99 +USE_LDCONFIG= yes + +MAKEFILE= makefile +ALL_TARGET= all +TEST_TARGET= test + +.include diff --git a/security/monocypher/distinfo b/security/monocypher/distinfo new file mode 100644 index 000000000000..f958e5abb766 --- /dev/null +++ b/security/monocypher/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1689253203 +SHA256 (monocypher-4.0.1.tar.gz) = 2f5796dba699cfdda5acd7721bf7df2c42e7e01d5cb843294a2a6e0a28cec0e9 +SIZE (monocypher-4.0.1.tar.gz) = 939452 diff --git a/security/monocypher/files/patch-makefile b/security/monocypher/files/patch-makefile new file mode 100644 index 000000000000..97293d462930 --- /dev/null +++ b/security/monocypher/files/patch-makefile @@ -0,0 +1,22 @@ +--- makefile.orig 2023-07-17 16:11:09 UTC ++++ makefile +@@ -52,14 +52,14 @@ + .POSIX: + .SUFFIXES: + +-CC=gcc -std=c99 +-CFLAGS=-pedantic -Wall -Wextra -O3 -march=native +-DESTDIR= +-PREFIX=usr/local ++CC?=gcc -std=c99 ++CFLAGS?=-pedantic -Wall -Wextra -O3 -march=native ++DESTDIR?= ++PREFIX?=usr/local + LIBDIR=$(PREFIX)/lib + INCLUDEDIR=$(PREFIX)/include + PKGCONFIGDIR=$(LIBDIR)/pkgconfig +-MANDIR=$(PREFIX)/share/man/man3 ++MANDIR?=$(PREFIX)/share/man/man3 + SONAME=libmonocypher.so.4 + + .PHONY: all library static-library dynamic-library \ diff --git a/security/monocypher/pkg-descr b/security/monocypher/pkg-descr new file mode 100644 index 000000000000..94c075534ab6 --- /dev/null +++ b/security/monocypher/pkg-descr @@ -0,0 +1,15 @@ +Monocypher is an easy to use crypto library. It is: + +- Small. Sloccount counts about 1700 lines of code, small enough to +allow audits. The binaries are under 65KB. + +- Easy to deploy. Just add monocypher.c and monocypher.h to your +project. They compile as C99 or C++, have no dependency, and +are dedicated to the public domain. + +- Easy to use. The API is small, consistent, and cannot fail +on correct input. + +- Fast. The primitives are fast to begin with, and performance +wasn't needlessly sacrificed. Monocypher holds up pretty well +against Libsodium, despite being closer in size to TweetNaCl. diff --git a/security/monocypher/pkg-plist b/security/monocypher/pkg-plist new file mode 100644 index 000000000000..d49f542de844 --- /dev/null +++ b/security/monocypher/pkg-plist @@ -0,0 +1,66 @@ +include/monocypher-ed25519.h +include/monocypher.h +lib/libmonocypher.a +lib/libmonocypher.so +lib/libmonocypher.so.4 +libdata/pkgconfig/monocypher.pc +share/man/man3/crypto_aead_init_djb.3monocypher.gz +share/man/man3/crypto_aead_init_ietf.3monocypher.gz +share/man/man3/crypto_aead_init_x.3monocypher.gz +share/man/man3/crypto_aead_lock.3monocypher.gz +share/man/man3/crypto_aead_read.3monocypher.gz +share/man/man3/crypto_aead_unlock.3monocypher.gz +share/man/man3/crypto_aead_write.3monocypher.gz +share/man/man3/crypto_argon2.3monocypher.gz +share/man/man3/crypto_blake2b_final.3monocypher.gz +share/man/man3/crypto_blake2b_init.3monocypher.gz +share/man/man3/crypto_blake2b_keyed_init.3monocypher.gz +share/man/man3/crypto_blake2b_keyed.3monocypher.gz +share/man/man3/crypto_blake2b_update.3monocypher.gz +share/man/man3/crypto_blake2b.3monocypher.gz +share/man/man3/crypto_chacha20_djb.3monocypher.gz +share/man/man3/crypto_chacha20_h.3monocypher.gz +share/man/man3/crypto_chacha20_ietf.3monocypher.gz +share/man/man3/crypto_chacha20_x.3monocypher.gz +share/man/man3/crypto_ed25519_check.3monocypher.gz +share/man/man3/crypto_ed25519_key_pair.3monocypher.gz +share/man/man3/crypto_ed25519_ph_check.3monocypher.gz +share/man/man3/crypto_ed25519_ph_sign.3monocypher.gz +share/man/man3/crypto_ed25519_sign.3monocypher.gz +share/man/man3/crypto_eddsa_check_equation.3monocypher.gz +share/man/man3/crypto_eddsa_check.3monocypher.gz +share/man/man3/crypto_eddsa_key_pair.3monocypher.gz +share/man/man3/crypto_eddsa_mul_add.3monocypher.gz +share/man/man3/crypto_eddsa_reduce.3monocypher.gz +share/man/man3/crypto_eddsa_scalarbase.3monocypher.gz +share/man/man3/crypto_eddsa_sign.3monocypher.gz +share/man/man3/crypto_eddsa_to_x25519.3monocypher.gz +share/man/man3/crypto_eddsa_trim_scalar.3monocypher.gz +share/man/man3/crypto_elligator_key_pair.3monocypher.gz +share/man/man3/crypto_elligator_map.3monocypher.gz +share/man/man3/crypto_elligator_rev.3monocypher.gz +share/man/man3/crypto_poly1305_final.3monocypher.gz +share/man/man3/crypto_poly1305_init.3monocypher.gz +share/man/man3/crypto_poly1305_update.3monocypher.gz +share/man/man3/crypto_poly1305.3monocypher.gz +share/man/man3/crypto_sha512_final.3monocypher.gz +share/man/man3/crypto_sha512_hkdf_expand.3monocypher.gz +share/man/man3/crypto_sha512_hkdf.3monocypher.gz +share/man/man3/crypto_sha512_hmac_final.3monocypher.gz +share/man/man3/crypto_sha512_hmac_init.3monocypher.gz +share/man/man3/crypto_sha512_hmac_update.3monocypher.gz +share/man/man3/crypto_sha512_hmac.3monocypher.gz +share/man/man3/crypto_sha512_init.3monocypher.gz +share/man/man3/crypto_sha512_update.3monocypher.gz +share/man/man3/crypto_sha512.3monocypher.gz +share/man/man3/crypto_verify16.3monocypher.gz +share/man/man3/crypto_verify32.3monocypher.gz +share/man/man3/crypto_verify64.3monocypher.gz +share/man/man3/crypto_wipe.3monocypher.gz +share/man/man3/crypto_x25519_dirty_fast.3monocypher.gz +share/man/man3/crypto_x25519_dirty_small.3monocypher.gz +share/man/man3/crypto_x25519_inverse.3monocypher.gz +share/man/man3/crypto_x25519_public_key.3monocypher.gz +share/man/man3/crypto_x25519_to_eddsa.3monocypher.gz +share/man/man3/crypto_x25519.3monocypher.gz +share/man/man3/intro.3monocypher.gz