4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://opensource.org/licenses/CDDL-1.0.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Based on Edon-R implementation for SUPERCOP, based on NIST API.
24 * Copyright (c) 2009, 2010 Jørn Amundsen <jorn.amundsen@ntnu.no>
25 * Copyright (c) 2013 Saso Kiselkov, All rights reserved
26 * Copyright (c) 2022 Tino Reichardt <milky-zfs@mcmilk.de>
37 #include <sys/types.h>
44 * EdonR allows to call EdonRUpdate() consecutively only if the total length
45 * of stored unprocessed data and the new supplied data is less than or equal
46 * to the BLOCK_SIZE on which the compression functions operates.
47 * Otherwise an assertion failure is invoked.
50 /* Specific algorithm definitions */
51 #define EdonR512_DIGEST_SIZE 64
52 #define EdonR512_BLOCK_SIZE 128
53 #define EdonR512_BLOCK_BITSIZE 1024
56 uint64_t DoublePipe
[16];
57 uint8_t LastPart
[EdonR512_BLOCK_SIZE
* 2];
61 uint64_t bits_processed
;
68 void EdonRInit(EdonRState
*state
);
69 void EdonRUpdate(EdonRState
*state
, const uint8_t *data
, size_t databitlen
);
70 void EdonRFinal(EdonRState
*state
, uint8_t *hashval
);
71 void EdonRHash(const uint8_t *data
, size_t databitlen
, uint8_t *hashval
);
77 #endif /* _SYS_EDONR_H_ */