head	1.5;
access;
symbols
	netbsd-11-0-RC4:1.5
	netbsd-11-0-RC3:1.5
	netbsd-11-0-RC2:1.5
	netbsd-11-0-RC1:1.5
	perseant-exfatfs-base-20250801:1.5
	netbsd-11:1.5.0.6
	netbsd-11-base:1.5
	netbsd-10-1-RELEASE:1.5
	perseant-exfatfs-base-20240630:1.5
	perseant-exfatfs:1.5.0.4
	perseant-exfatfs-base:1.5
	netbsd-10-0-RELEASE:1.5
	netbsd-10-0-RC6:1.5
	netbsd-10-0-RC5:1.5
	netbsd-10-0-RC4:1.5
	netbsd-10-0-RC3:1.5
	netbsd-10-0-RC2:1.5
	netbsd-10-0-RC1:1.5
	netbsd-10:1.5.0.2
	netbsd-10-base:1.5
	cjep_sun2x-base1:1.2
	cjep_sun2x:1.2.0.8
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.6
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi:1.2.0.4
	phil-wifi-20200411:1.2
	is-mlppp:1.2.0.2
	is-mlppp-base:1.2
	phil-wifi-20200406:1.2
	phil-wifi-20191119:1.2;
locks; strict;
comment	@# @;


1.5
date	2022.05.17.18.55.41;	author christos;	state Exp;
branches;
next	1.4;
commitid	mWsYXkcHPyulprED;

1.4
date	2021.11.22.14.34.35;	author nia;	state Exp;
branches;
next	1.3;
commitid	1nPj2HZrnGT1yNhD;

1.3
date	2021.10.12.17.24.36;	author nia;	state dead;
branches;
next	1.2;
commitid	K9DZJI6jHCUiSxcD;

1.2
date	2019.10.21.02.36.48;	author jhigh;	state Exp;
branches
	1.2.4.1;
next	1.1;
commitid	ZoJaBvGczltd9GHB;

1.1
date	2019.10.09.13.13.09;	author jhigh;	state Exp;
branches;
next	;
commitid	wEOyDkCxcEjJ3cGB;

1.2.4.1
date	2019.10.21.02.36.48;	author martin;	state dead;
branches;
next	1.2.4.2;
commitid	X01YhRUPVUDaec4C;

1.2.4.2
date	2020.04.13.07.45.47;	author martin;	state Exp;
branches;
next	;
commitid	X01YhRUPVUDaec4C;


desc
@@


1.5
log
@Move guts of the Makefile into Makefile.inc so it can be re-used.
@
text
@# $NetBSD: Makefile,v 1.4 2021/11/22 14:34:35 nia Exp $

LIBISPRIVATE=	pic

.include <bsd.own.mk>

LIB=	argon2

.include "${.CURDIR}/Makefile.inc"

.include <bsd.lib.mk>
@


1.4
log
@cgdconfig(8): Add an argon2id password-based key generation method

This provides an extra level of side-channel and cracking resistance
compared to the pre-existing pkcs5_pbkdf2/sha1 method used for
password-based disk encryption.

Several new keygen parameters are supported:

	memory (integer, in kilobytes)
	parallelism (integer, usually the number of CPU cores)
	version (integer, usually 19...)

We do our best to calibrate these automatically when the paramsfile
is initially generated.

lgtm riastradh@@
@
text
@d1 1
a1 1
# $NetBSD$
a6 6
ARGON2DIR=	${NETBSDSRCDIR}/external/apache2/argon2

.PATH: ${ARGON2DIR}/dist/phc-winner-argon2/src \
       ${ARGON2DIR}/dist/phc-winner-argon2/src/blake2 \
       ${ARGON2DIR}/dist/phc-winner-argon2/include

a7 4
SRCS=	argon2.c core.c blake2b.c thread.c encoding.c ref.c

CFLAGS+=	-pthread
CPPFLAGS+=	-I${ARGON2DIR}/dist/phc-winner-argon2/include
d9 1
a9 3
.if ${MACHINE} == "vax"
COPTS.blake2b.c+=	-O0
.endif
@


1.3
log
@Fix release builds with MKARGON2=yes

This changes argon2 from a separately built library into a private
dependency of libcrypt and removes the argon2(1) utility (we already
have pwhash(1)). Giving libcrypt more library dependencies
complicates things (e.g. libcrypt is a dependency of openssl).
pthreads support gets disabled in argon2 for similar reasons.

For testing argon2, we rely on the libcrypt test suite.
@
text
@d1 1
a1 3
USE_SHLIBDIR=	yes
SHLIB_MAJOR=  1
SHLIB_MINOR=  0
d3 1
a3 1
#DIST=../../dist/phc-winner-argon2
d5 1
a5 1
.PATH: ../../dist/phc-winner-argon2/src ../../dist/phc-winner-argon2/src/blake2 ../../dist/phc-winner-argon2/include
d7 1
a7 2
INCS=   	argon2.h
INCSDIR=	/usr/include
d9 5
a13 1
LIB=	argon2	
d16 2
a17 1
CPPFLAGS= -std=c89 -O3 -Wall -g -I../../dist/phc-winner-argon2/include -Isrc -fPIC -DARGON2_NO_THREADS
d19 3
a21 3
OPTTARGET ?= native
OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
                        -o /dev/null 2>/dev/null; echo $$?)
a22 1
install:	all incinstall
@


1.2
log
@adding argon2 support to libcrypt. argon2 user authentication now
available via MKARGON2=yes (3 variants supported; argon2id recommended)
before using, please read argon2 paper at
https://github.com/P-H-C/phc-winner-argon2
@
text
@@


1.2.4.1
log
@file Makefile was added on branch phil-wifi on 2020-04-13 07:45:47 +0000
@
text
@d1 22
@


1.2.4.2
log
@Mostly merge changes from HEAD upto 20200411
@
text
@a0 22
USE_SHLIBDIR=	yes
SHLIB_MAJOR=  1
SHLIB_MINOR=  0

#DIST=../../dist/phc-winner-argon2

.PATH: ../../dist/phc-winner-argon2/src ../../dist/phc-winner-argon2/src/blake2 ../../dist/phc-winner-argon2/include

INCS=   	argon2.h
INCSDIR=	/usr/include

LIB=	argon2	
SRCS=	argon2.c core.c blake2b.c thread.c encoding.c ref.c

CPPFLAGS= -std=c89 -O3 -Wall -g -I../../dist/phc-winner-argon2/include -Isrc -fPIC -DARGON2_NO_THREADS

OPTTARGET ?= native
OPTTEST := $(shell $(CC) -Iinclude -Isrc -march=$(OPTTARGET) src/opt.c -c \
                        -o /dev/null 2>/dev/null; echo $$?)

install:	all incinstall
.include <bsd.lib.mk>
@


1.1
log
@added backend support for argon2 password scheme
@
text
@d15 1
a15 9

CPPFLAGS= -std=c89 -O3 -Wall -g -I../../dist/phc-winner-argon2/include -Isrc -shared -fPIC

.ifdef NO_THREADS
CPPFLAGS += -DARGON2_NO_THREADS
.else
CPPFLAGS += -pthread
LDADD+=-lpthread
.endif
@

