Commit 88bdb609 authored by Milan Broz's avatar Milan Broz

Move XOR function to af.c, nobody outside of it use it now.



git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@81 36d66b0a-2a48-0410-832c-cd162a569da5
parent ed9e146c
......@@ -5,6 +5,7 @@
* Return ENOENT for empty keyslots, EINVAL will be used later for other type of error.
* Switch PBKDF2 from internal SHA1 to libgcrypt, make hash algorithm not hardcoded to SHA1 here.
* Add required parameters for changing hash used in LUKS key setup scheme.
* Do not export simple XOR helper now used only inside AF functions.
2009-07-28 Milan Broz <mbroz@redhat.com>
* Pad luks header to 512 sector size.
......
......@@ -16,7 +16,6 @@ libluks_la_SOURCES = \
sha/hmac.h \
sha/hmac_sha1.c \
sha/sha1.h \
XORblock.h \
pbkdf.h \
random.h \
af.h \
......
#ifndef INCLUDED_CRYPTSETUP_LUKS_XORBLOCK_H
#define INCLUDED_CRYPTSETUP_LUKS_XORBLOCK_H
#include <stddef.h>
static void inline XORblock(char const *src1, char const *src2, char *dst, size_t n)
{
size_t j;
for(j = 0; j < n; ++j)
dst[j] = src1[j] ^ src2[j];
}
#endif
......@@ -27,9 +27,16 @@
#include <errno.h>
#include <gcrypt.h>
#include "sha1.h"
#include "XORblock.h"
#include "random.h"
static void XORblock(char const *src1, char const *src2, char *dst, size_t n)
{
size_t j;
for(j = 0; j < n; ++j)
dst[j] = src1[j] ^ src2[j];
}
static int hash_buf(char *src, char *dst, uint32_t iv, int len, int hash_id)
{
gcry_md_hd_t hd;
......
......@@ -35,7 +35,6 @@
#include "pbkdf.h"
#include "sha1.h"
#include "random.h"
#include "XORblock.h"
#include <uuid/uuid.h>
#include <../lib/internal.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment