edonr_zfs.c revision 45818ee124adeaaf947698996b4f4c722afc6d1f
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2013 Saso Kiselkov. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/zfs_context.h>
#define EDONR_MODE 512
#define EDONR_BLOCK_SIZE EdonR512_BLOCK_SIZE
/*
* Native zio_checksum interface for the Edon-R hash function.
*/
/*ARGSUSED*/
void
{
}
/*
* Byteswapped zio_checksum interface for the Edon-R hash function.
*/
void
{
}
void *
{
/*
* Edon-R needs all but the last hash invocation to be on full-size
* blocks, but the salt is too small. Rather than simply padding it
* with zeros, we expand the salt into a new salt block of proper
* size by double-hashing it (the new salt block will be composed of
* H(salt) || H(H(salt))).
*/
EDONR_MODE / 8);
/*
* Feed the new salt block into the hash function - this will serve
* as our MAC key.
*/
return (ctx);
}
void
{
}