EXTRA_DIST = FAQ
SUBDIRS = \
- luks \
lib \
src \
man \
-For 1.02
-
-* Add LUKS key copy cmd: luksKeyCopy
-* Add option to supply a master key directly. For LUKS commands: luksFormat, luksOpen and luksAddKey.
-
-For 2.0
-
-* LUKS header version bump:
- * Add LUKS partition footer.
- * change luks_write_phdr stuff.
- * change luks_read_phdr stuff
- * change hashing according to conversation with Sarah.
AC_CONFIG_FILES([ Makefile
lib/Makefile
lib/libcryptsetup.pc
+lib/luks1/Makefile
src/Makefile
po/Makefile.in
-luks/Makefile
man/Makefile
tests/Makefile
])
+SUBDIRS = luks1
+
moduledir = $(libdir)/cryptsetup
pkgconfigdir = $(libdir)/pkgconfig
INCLUDES = \
-I$(top_srcdir) \
- -I$(top_srcdir)/luks \
+ -I$(top_srcdir)/lib/luks1 \
-DDATADIR=\""$(datadir)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DPREFIX=\""$(prefix)"\" \
@UUID_LIBS@ \
@DEVMAPPER_LIBS@ \
@LIBGCRYPT_LIBS@ \
- ../luks/libluks.la
+ luks1/libluks1.la
libcryptsetup_la_SOURCES = \
setup.c \
moduledir = $(libdir)/cryptsetup
-noinst_LTLIBRARIES = libluks.la
+noinst_LTLIBRARIES = libluks1.la
-libluks_la_CFLAGS = -Wall @LIBGCRYPT_CFLAGS@
+libluks1_la_CFLAGS = -Wall @LIBGCRYPT_CFLAGS@
-libluks_la_SOURCES = \
+libluks1_la_SOURCES = \
af.c \
pbkdf.c \
keymanage.c \
* Copyright 2004, Clemens Fruhwirth <clemens@endorphin.org>
* Copyright (C) 2009 Red Hat, Inc. All rights reserved.
*
- * AFsplitter diffuses information over a large stripe of data,
+ * AFsplitter diffuses information over a large stripe of data,
* therefor supporting secure data destruction.
*
* This program is free software; you can redistribute it and/or
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
+
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <netinet/in.h>
#include <errno.h>
#include <gcrypt.h>
-#include <../lib/internal.h>
+#include "internal.h"
static void XORblock(char const *src1, char const *src2, char *dst, size_t n)
{
/*
* Information splitting. The amount of data is multiplied by
- * blocknumbers. The same blocksize and blocknumbers values
+ * blocknumbers. The same blocksize and blocknumbers values
* must be supplied to AF_merge to recover information.
*/
/*
- * LUKS - Linux Unified Key Setup
+ * LUKS - Linux Unified Key Setup
*
* Copyright (C) 2004-2006, Clemens Fruhwirth <clemens@endorphin.org>
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* version 2 as published by the Free Software Foundation.
#include <signal.h>
#include "luks.h"
-//#include "../lib/libcryptsetup.h"
-#include "../lib/internal.h"
-//#include "../lib/blockdev.h"
+#include "internal.h"
#define div_round_up(a,b) ({ \
typeof(a) __a = (a); \
if(devfd >= 0)
close(devfd);
devfd = -1;
- if(cleaner_name)
+ if(cleaner_name)
dm_remove_device(cleaner_name, 1, cleaner_size);
signal(SIGINT, SIG_DFL);
/* This function is not reentrant safe, as it installs a signal
handler and global vars for cleaning */
-static int LUKS_endec_template(char *src, size_t srcLength,
- struct luks_phdr *hdr,
- char *key, size_t keyLength,
- const char *device,
+static int LUKS_endec_template(char *src, size_t srcLength,
+ struct luks_phdr *hdr,
+ char *key, size_t keyLength,
+ const char *device,
unsigned int sector,
ssize_t (*func)(int, void *, size_t),
int mode,
char *name = NULL;
char *fullpath = NULL;
char *dmCipherSpec = NULL;
- const char *dmDir = dm_get_dir();
+ const char *dmDir = dm_get_dir();
int r = -1;
if(dmDir == NULL) {
/*
- * LUKS - Linux Unified Key Setup
+ * LUKS - Linux Unified Key Setup
*
* Copyright (C) 2004-2006, Clemens Fruhwirth <clemens@endorphin.org>
*
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#include <uuid/uuid.h>
#include "luks.h"
#include "af.h"
#include "pbkdf.h"
-#include <uuid/uuid.h>
-#include <../lib/internal.h>
+#include "internal.h"
#define div_round_up(a,b) ({ \
typeof(a) __a = (a); \
struct luks_phdr *hdr,
struct crypt_device *ctx)
{
- int devfd = 0;
- unsigned int i;
+ int devfd = 0;
+ unsigned int i;
struct luks_phdr convHdr;
int r;
sizeof(struct luks_phdr), device);
devfd = open(device,O_RDWR | O_DIRECT | O_SYNC);
- if(-1 == devfd) {
+ if(-1 == devfd) {
log_err(ctx, _("Cannot open device %s.\n"), device);
return -EINVAL;
}
/* Do not retry for errors that are no -EPERM or -ENOENT,
former meaning password wrong, latter key slot inactive */
- if ((r != -EPERM) && (r != -ENOENT))
+ if ((r != -EPERM) && (r != -ENOENT))
return r;
}
/* Warning, early returns above */
#include <stddef.h>
-/* */
-
int PBKDF2_HMAC(const char *hash,
const char *password, size_t passwordLen,
const char *salt, size_t saltLen, unsigned int iterations,
lib/utils.c
lib/utils_crypt.c
lib/utils_debug.c
-luks/af.c
-luks/keyencryption.c
-luks/keymanage.c
-luks/pbkdf.c
+lib/luks1/af.c
+lib/luks1/keyencryption.c
+lib/luks1/keymanage.c
+lib/luks1/pbkdf.c
src/cryptsetup.c