head	1.16;
access;
symbols
	RELENG_8_4:1.15.0.2
	RELENG_9_1_0_RELEASE:1.13.2.2.2.2
	RELENG_9_1:1.13.2.2.0.2
	RELENG_9_1_BP:1.13.2.2
	RELENG_8_3_0_RELEASE:1.11.32.1.8.1
	RELENG_8_3:1.11.32.1.0.8
	RELENG_8_3_BP:1.11.32.1
	RELENG_9_0_0_RELEASE:1.13.2.1.2.1
	RELENG_9_0:1.13.2.1.0.2
	RELENG_9_0_BP:1.13.2.1
	RELENG_9:1.13.0.2
	RELENG_9_BP:1.13
	RELENG_7_4_0_RELEASE:1.11.36.1
	RELENG_8_2_0_RELEASE:1.11.32.1.6.1
	RELENG_7_4:1.11.0.36
	RELENG_7_4_BP:1.11
	RELENG_8_2:1.11.32.1.0.6
	RELENG_8_2_BP:1.11.32.1
	RELENG_8_1_0_RELEASE:1.11.32.1.4.1
	RELENG_8_1:1.11.32.1.0.4
	RELENG_8_1_BP:1.11.32.1
	RELENG_7_3_0_RELEASE:1.11.34.1
	RELENG_7_3:1.11.0.34
	RELENG_7_3_BP:1.11
	RELENG_8_0_0_RELEASE:1.11.32.1.2.1
	RELENG_8_0:1.11.32.1.0.2
	RELENG_8_0_BP:1.11.32.1
	RELENG_8:1.11.0.32
	RELENG_8_BP:1.11
	RELENG_7_2_0_RELEASE:1.11.30.1
	RELENG_7_2:1.11.0.30
	RELENG_7_2_BP:1.11
	RELENG_7_1_0_RELEASE:1.11.28.1
	RELENG_6_4_0_RELEASE:1.11.26.1
	RELENG_7_1:1.11.0.28
	RELENG_7_1_BP:1.11
	RELENG_6_4:1.11.0.26
	RELENG_6_4_BP:1.11
	RELENG_7_0_0_RELEASE:1.11
	RELENG_6_3_0_RELEASE:1.11
	RELENG_7_0:1.11.0.24
	RELENG_7_0_BP:1.11
	RELENG_6_3:1.11.0.22
	RELENG_6_3_BP:1.11
	RELENG_7:1.11.0.20
	RELENG_7_BP:1.11
	RELENG_6_2_0_RELEASE:1.11
	RELENG_6_2:1.11.0.18
	RELENG_6_2_BP:1.11
	RELENG_5_5_0_RELEASE:1.11
	RELENG_5_5:1.11.0.16
	RELENG_5_5_BP:1.11
	RELENG_6_1_0_RELEASE:1.11
	RELENG_6_1:1.11.0.14
	RELENG_6_1_BP:1.11
	RELENG_6_0_0_RELEASE:1.11
	RELENG_6_0:1.11.0.12
	RELENG_6_0_BP:1.11
	RELENG_6:1.11.0.10
	RELENG_6_BP:1.11
	RELENG_5_4_0_RELEASE:1.11
	RELENG_5_4:1.11.0.8
	RELENG_5_4_BP:1.11
	RELENG_5_3_0_RELEASE:1.11
	RELENG_5_3:1.11.0.6
	RELENG_5_3_BP:1.11
	RELENG_5:1.11.0.4
	RELENG_5_BP:1.11
	RELENG_5_2_1_RELEASE:1.11
	RELENG_5_2_0_RELEASE:1.11
	RELENG_5_2:1.11.0.2
	RELENG_5_2_BP:1.11
	RELENG_5_1_0_RELEASE:1.10
	RELENG_5_1:1.10.0.2
	RELENG_5_1_BP:1.10
	RELENG_5_0_0_RELEASE:1.4.2.1
	RELENG_5_0:1.4.0.2
	RELENG_5_0_BP:1.4;
locks; strict;
comment	@# @;


1.16
date	2013.04.20.00.35.20;	author svnexp;	state Exp;
branches;
next	1.15;

1.15
date	2012.11.17.01.50.20;	author svnexp;	state Exp;
branches
	1.15.2.1;
next	1.14;

1.14
date	2011.12.17.00.14.40;	author dim;	state Exp;
branches;
next	1.13;

1.13
date	2010.08.23.22.24.11;	author imp;	state Exp;
branches
	1.13.2.1;
next	1.12;

1.12
date	2010.02.15.14.07.40;	author uqs;	state Exp;
branches;
next	1.11;

1.11
date	2003.10.17.19.52.07;	author phk;	state Exp;
branches
	1.11.10.1
	1.11.20.1
	1.11.26.1
	1.11.28.1
	1.11.30.1
	1.11.32.1
	1.11.34.1
	1.11.36.1;
next	1.10;

1.10
date	2003.05.17.19.05.17;	author ru;	state Exp;
branches;
next	1.9;

1.9
date	2003.04.16.11.54.11;	author ru;	state Exp;
branches;
next	1.8;

1.8
date	2003.04.03.12.36.56;	author phk;	state Exp;
branches;
next	1.7;

1.7
date	2003.03.31.18.38.31;	author phk;	state Exp;
branches;
next	1.6;

1.6
date	2002.12.18.22.11.54;	author phk;	state Exp;
branches;
next	1.5;

1.5
date	2002.12.17.19.16.10;	author phk;	state Exp;
branches;
next	1.4;

1.4
date	2002.11.04.09.27.01;	author phk;	state Exp;
branches
	1.4.2.1;
next	1.3;

1.3
date	2002.10.21.05.25.02;	author phk;	state Exp;
branches;
next	1.2;

1.2
date	2002.10.20.15.02.26;	author phk;	state Exp;
branches;
next	1.1;

1.1
date	2002.10.20.11.16.13;	author phk;	state Exp;
branches;
next	;

1.15.2.1
date	2012.11.17.01.50.20;	author svnexp;	state dead;
branches;
next	1.15.2.2;

1.15.2.2
date	2013.03.28.13.03.32;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1
date	2011.09.23.00.51.37;	author kensmith;	state Exp;
branches
	1.13.2.1.2.1;
next	1.13.2.2;

1.13.2.2
date	2012.01.01.17.23.03;	author dim;	state Exp;
branches
	1.13.2.2.2.1;
next	1.13.2.3;

1.13.2.3
date	2012.11.17.11.36.31;	author svnexp;	state Exp;
branches;
next	;

1.13.2.1.2.1
date	2011.11.11.04.20.22;	author kensmith;	state Exp;
branches;
next	1.13.2.1.2.2;

1.13.2.1.2.2
date	2012.11.17.08.36.30;	author svnexp;	state Exp;
branches;
next	;

1.13.2.2.2.1
date	2012.08.05.23.54.33;	author kensmith;	state Exp;
branches;
next	1.13.2.2.2.2;

1.13.2.2.2.2
date	2012.11.17.08.47.20;	author svnexp;	state Exp;
branches;
next	;

1.11.10.1
date	2012.11.17.07.41.16;	author svnexp;	state Exp;
branches;
next	;

1.11.20.1
date	2012.11.17.08.03.34;	author svnexp;	state Exp;
branches;
next	;

1.11.26.1
date	2008.10.02.02.57.24;	author kensmith;	state Exp;
branches;
next	;

1.11.28.1
date	2008.11.25.02.59.29;	author kensmith;	state Exp;
branches;
next	;

1.11.30.1
date	2009.04.15.03.14.26;	author kensmith;	state Exp;
branches;
next	;

1.11.32.1
date	2009.08.03.08.13.06;	author kensmith;	state Exp;
branches
	1.11.32.1.2.1
	1.11.32.1.4.1
	1.11.32.1.6.1
	1.11.32.1.8.1;
next	1.11.32.2;

1.11.32.2
date	2012.11.17.10.36.15;	author svnexp;	state Exp;
branches;
next	;

1.11.32.1.2.1
date	2009.10.25.01.10.29;	author kensmith;	state Exp;
branches;
next	;

1.11.32.1.4.1
date	2010.06.14.02.09.06;	author kensmith;	state Exp;
branches;
next	;

1.11.32.1.6.1
date	2010.12.21.17.09.25;	author kensmith;	state Exp;
branches;
next	;

1.11.32.1.8.1
date	2012.03.03.06.15.13;	author kensmith;	state Exp;
branches;
next	1.11.32.1.8.2;

1.11.32.1.8.2
date	2012.11.17.08.24.56;	author svnexp;	state Exp;
branches;
next	;

1.11.34.1
date	2010.02.10.00.26.20;	author kensmith;	state Exp;
branches;
next	;

1.11.36.1
date	2010.12.21.17.10.29;	author kensmith;	state Exp;
branches;
next	1.11.36.2;

1.11.36.2
date	2012.11.17.08.16.54;	author svnexp;	state Exp;
branches;
next	;

1.4.2.1
date	2002.12.20.21.52.02;	author phk;	state Exp;
branches;
next	;


desc
@@


1.16
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/249657
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@# $FreeBSD: head/sbin/gbde/Makefile 249657 2013-04-19 19:45:00Z ed $

PROG=	gbde
SRCS=	gbde.c template.c
SRCS+=	rijndael-alg-fst.c
SRCS+=	rijndael-api-fst.c
SRCS+=	sha2.c
SRCS+=	g_bde_lock.c

# rijndael-fst.c does evil casting things which can results in warnings,
# the test-vectors check out however, so it works right.
NO_WCAST_ALIGN=
NO_WMISSING_VARIABLE_DECLARATIONS=

CFLAGS+= -I${.CURDIR}/../../sys
.PATH:	${.CURDIR}/../../sys/geom/bde \
	${.CURDIR}/../../sys/crypto/rijndael \
	${.CURDIR}/../../sys/crypto/sha2

CLEANFILES+= template.c

MAN=	gbde.8
DPADD=	${LIBMD} ${LIBUTIL} ${LIBGEOM}
LDADD=	-lmd -lutil -lgeom

template.c: template.txt
	file2c 'const char template[] = {' ',0};' \
		< ${.CURDIR}/template.txt > template.c

test: ${PROG}
	sh ${.CURDIR}/test.sh ${.CURDIR}

.include <bsd.prog.mk>
@


1.15
log
@Switching exporter and resync
@
text
@d1 1
a1 1
# $FreeBSD: head/sbin/gbde/Makefile 228610 2011-12-17 00:14:40Z dim $
d13 1
@


1.15.2.1
log
@file Makefile was added on branch RELENG_8_4 on 2013-03-28 13:03:32 +0000
@
text
@d1 32
@


1.15.2.2
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/248810
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@a0 36
# $FreeBSD: releng/8.4/sbin/gbde/Makefile 121169 2003-10-17 19:52:07Z phk $

PROG=	gbde
SRCS=	gbde.c template.c
SRCS+=	rijndael-alg-fst.c
SRCS+=	rijndael-api-fst.c
SRCS+=	sha2.c
SRCS+=	g_bde_lock.c

# rijndael-fst.c does evil casting things which results in warnings on
# 64 bit machines, the test-vectors check out however, so it works right.
.if ${MACHINE_ARCH} == "i386"
WARNS?=	5
.else
WARNS?=	3
.endif

CFLAGS+= -I${.CURDIR}/../../sys
.PATH:	${.CURDIR}/../../sys/geom/bde \
	${.CURDIR}/../../sys/crypto/rijndael \
	${.CURDIR}/../../sys/crypto/sha2

CLEANFILES+= template.c

MAN=	gbde.8
DPADD=	${LIBMD} ${LIBUTIL} ${LIBGEOM}
LDADD=	-lmd -lutil -lgeom

template.c: template.txt
	file2c 'const char template[] = {' ',0};' \
		< ${.CURDIR}/template.txt > template.c

test: ${PROG}
	sh ${.CURDIR}/test.sh ${.CURDIR}

.include <bsd.prog.mk>
@


1.14
log
@SVN rev 228610 on 2011-12-17 00:14:40Z by dim

Use NO_WCAST_ALIGN for sbin/gbde, this is more appropriate to fix the
alignment warnings than using WARNS=3, and it also works for clang.

MFC after:	1 week
@
text
@d1 1
a1 1
# $FreeBSD$
@


1.13
log
@SVN rev 211725 on 2010-08-23 22:24:11Z by imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
@
text
@d10 3
a12 5
# rijndael-fst.c does evil casting things which results in warnings on
# 64 bit machines, the test-vectors check out however, so it works right.
.if ${MACHINE_CPUARCH} != "i386"
WARNS?=	3
.endif
@


1.13.2.1
log
@SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.2
log
@SVN rev 229174 on 2012-01-01 17:23:03Z by dim

MFC r228610:

Use NO_WCAST_ALIGN for sbin/gbde, this is more appropriate to fix the
alignment warnings than using WARNS=3, and it also works for clang.
@
text
@d10 5
a14 3
# rijndael-fst.c does evil casting things which can results in warnings,
# the test-vectors check out however, so it works right.
NO_WCAST_ALIGN=
@


1.13.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242902
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242902 | dteske | 2012-11-11 23:29:45 +0000 (Sun, 11 Nov 2012) | 10 lines
## SVN ##
## SVN ## Fix a regression introduced by SVN r211417 that saw the breakage of a feature
## SVN ## documented in usr.sbin/sysinstall/help/shortcuts.hlp (reproduced below):
## SVN ##
## SVN ## If /usr/sbin/sysinstall is linked to another filename, say
## SVN ## `/usr/local/bin/configPackages', then the basename will be used
## SVN ## as an implicit command name.
## SVN ##
## SVN ## Reviewed by:	adrian (co-mentor)
## SVN ## Approved by:	adrian (co-mentor)
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/9/sbin/gbde/Makefile 229174 2012-01-01 17:23:03Z dim $
@


1.13.2.2.2.1
log
@SVN rev 239080 on 2012-08-05 23:54:33Z by kensmith

Copy stable/9 to releng/9.1 as part of the 9.1-RELEASE release process.

Approved by:	re (implicit)
@
text
@@


1.13.2.2.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.1/sbin/gbde/Makefile 229174 2012-01-01 17:23:03Z dim $
@


1.13.2.1.2.1
log
@SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)
@
text
@@


1.13.2.1.2.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/9.0/sbin/gbde/Makefile 211725 2010-08-23 22:24:11Z imp $
@


1.12
log
@SVN rev 203916 on 2010-02-15 14:07:40Z by uqs

Bump WARNS where possible.

Checked by:	make universe
Approved by:	ed (co-mentor)
@
text
@d12 1
a12 1
.if ${MACHINE_ARCH} != "i386"
@


1.11
log
@Make the regression test run also with obj directories.
@
text
@d12 1
a12 3
.if ${MACHINE_ARCH} == "i386"
WARNS?=	5
.else
@


1.11.20.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/7/sbin/gbde/Makefile 121169 2003-10-17 19:52:07Z phk $
@


1.11.10.1
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: stable/6/sbin/gbde/Makefile 121169 2003-10-17 19:52:07Z phk $
@


1.11.36.1
log
@SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)
@
text
@@


1.11.36.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/7.4/sbin/gbde/Makefile 121169 2003-10-17 19:52:07Z phk $
@


1.11.34.1
log
@SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)
@
text
@@


1.11.32.1
log
@SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)
@
text
@@


1.11.32.2
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 242909
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r242909 | dim | 2012-11-12 07:47:19 +0000 (Mon, 12 Nov 2012) | 20 lines
## SVN ##
## SVN ## MFC r242625:
## SVN ##
## SVN ## Remove duplicate const specifiers in many drivers (I hope I got all of
## SVN ## them, please let me know if not).  Most of these are of the form:
## SVN ##
## SVN ## static const struct bzzt_type {
## SVN ##       [...list of members...]
## SVN ## } const bzzt_devs[] = {
## SVN ##       [...list of initializers...]
## SVN ## };
## SVN ##
## SVN ## The second const is unnecessary, as arrays cannot be modified anyway,
## SVN ## and if the elements are const, the whole thing is const automatically
## SVN ## (e.g. it is placed in .rodata).
## SVN ##
## SVN ## I have verified this does not change the binary output of a full kernel
## SVN ## build (except for build timestamps embedded in the object files).
## SVN ##
## SVN ## Reviewed by:	yongari, marius
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@d1 1
a1 1
# $FreeBSD: stable/8/sbin/gbde/Makefile 121169 2003-10-17 19:52:07Z phk $
@


1.11.32.1.8.1
log
@SVN rev 232438 on 2012-03-03 06:15:13Z by kensmith

Copy stable/8 to releng/8.3 as part of 8.3-RELEASE release cycle.

Approved by:	re (implicit)
@
text
@@


1.11.32.1.8.2
log
@Switch importer
@
text
@d1 1
a1 1
# $FreeBSD: releng/8.3/sbin/gbde/Makefile 121169 2003-10-17 19:52:07Z phk $
@


1.11.32.1.6.1
log
@SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)
@
text
@@


1.11.32.1.4.1
log
@SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)
@
text
@@


1.11.32.1.2.1
log
@SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)
@
text
@@


1.11.30.1
log
@SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)
@
text
@@


1.11.28.1
log
@SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)
@
text
@@


1.11.26.1
log
@SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)
@
text
@@


1.10
log
@Moved libgeom.so dependencies to where they belong.

Reviewed by:	phk
Approved by:	re (scottl)
@
text
@d34 1
a34 1
	sh ${.CURDIR}/test.sh
@


1.9
log
@Normalize, fix ``make checkdpadd''.
@
text
@d26 2
a27 2
DPADD=	${LIBMD} ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
LDADD=	-lmd -lutil -lgeom -lbsdxml -lsbuf
@


1.8
log
@Don't pull in geom_enc.c any more.
@
text
@d26 2
a27 1
LDADD=	-lmd  -lutil -lgeom -lbsdxml -lsbuf
d29 1
a29 3
.include <bsd.prog.mk>

template.c:	template.txt
d33 1
a33 1
test:	${PROG}
d35 2
@


1.7
log
@Use new GEOM OAM.  Kernels have supported this for a number of days, so
people should be OK.
@
text
@a4 1
SRCS+=	geom_enc.c
d19 1
a19 2
.PATH:	${.CURDIR}/../../sys/geom \
	${.CURDIR}/../../sys/geom/bde \
@


1.6
log
@Solve another bug in the mapping code: correctly skip lock sectors.
Make sure sector zero is protected if it contains metadata.

Lower WARNS for gbde to 3 on non-i386 archs.  rijndael-fst is evil
but appearntly does the right thing and passes the test-vectors.

MFC Candidate.
@
text
@d28 1
a28 1
LDADD=	-lmd  -lutil
@


1.5
log
@A couple of stylistic improvements.
@
text
@d11 3
d15 3
@


1.4
log
@Run a revision on the GBDE encryption facility.

Replace ARC4 with SHA2-512.
Change lock-structure encoding to use random ordering rather for obscurity.
Encrypt lock-structure with AES/256 instead of AES/128.
Change kkey derivation to be MD5 hash based.
Watch for malloc(M_NOWAIT) failures and ditch our cache when they happen.
Remove clause 3 of the license with NAI Labs consent.

Many thanks to "Lucky Green" <shamrock@@cypherpunks.to> and "David
Wagner" <daw@@cs.berkeley.edu>, for code reading, inputs and
suggestions.

This code has still not been stared at for 10 years by a gang of
hard-core cryptographers.  Discretion advised.

NB: These changes result in the on-disk format changing: dump/restore needed.

Sponsored by:   DARPA & NAI Labs.
@
text
@d11 2
@


1.4.2.1
log
@MFC:	GEOM and gbde changes.

1: fix serious bugs in gbde.
2: add alignment checks to avoid panic(8) implementations.
3: sync API with -current for forwards compatibility.

Approved by:	re
@
text
@a10 8
# rijndael-fst.c does evil casting things which results in warnings on
# 64 bit machines, the test-vectors check out however, so it works right.
.if ${MACHINE_ARCH} == "i386"
WARNS?=	5
.else
WARNS?=	3
.endif

@


1.3
log
@I overlooked an absolute path.

Submitted by:	Henric Jungheim <henric@@attbi.com>
@
text
@d8 1
d12 4
a15 2
.PATH: ${.CURDIR}/../../sys/geom ${.CURDIR}/../../sys/geom/bde \
	${.CURDIR}/../../sys/crypto/rijndael
@


1.2
log
@Use .PATH instead of VPATH.

Fix typo in man-page: man-section is 8.
@
text
@d10 1
a10 1
CFLAGS+= -I/sys
@


1.1
log
@Complete the Geom Based Disk Encryption:  Add the OAM utility.

Sponsored by:	DARPA and NAI Labs
@
text
@d11 2
a12 1
VPATH += ${.CURDIR}/../../sys/geom:${.CURDIR}/../../sys/geom/bde:${.CURDIR}/../../sys/crypto/rijndael
@

