Validus 1.0.5
192-bit OWHF
Loading...
Searching...
No Matches
validus.h File Reference

Definitions for the Validus hash function. More...

Go to the source code of this file.

Data Structures

struct  validus_state
 Represents the state of an individual Validus hash operation. More...

Macros

#define VALIDUS_FP_SIZE_B   192
 The size of a Validus fingerprint, in bits.
#define VALIDUS_FP_SIZE_O   48
 The size of a Validus fingerprint, in octets.
#define WORDALIGNED(addr)
 Determines if address addr is aligned on 4-byte boundaries.
#define OCTETSWAP(a, b)
 Swaps octet order of a 32-bit value b and stores the result in a.
#define ROL(a, b)
 Cyclically rotates word a by b bits to the left.
#define ROR(a, b)
 Cyclically rotates word a by b bits to the right.
#define M0(a, b, c, d, e)
 Mixer function 0.
#define M1(a, b, c, d, e)
 Mixer function 1.
#define M2(a, b, c, d, e)
 Mixer function 2.
#define M3(a, b, c, d, e)
 Mixer function 3.
#define VC_0(a, b, c, d, e, f, r1, r2, blk, hcv)
 Compression function 0.
#define VC_1(a, b, c, d, e, f, r1, r2, blk, hcv)
 Compression function 1.
#define VC_2(a, b, c, d, e, f, r1, r2, blk, hcv)
 Compression function 2.
#define VC_3(a, b, c, d, e, f, r1, r2, blk, hcv)
 Compression function 3.
#define VALIDUS_INIT_0   0x81010881U
 10000001000000010000100010000001
#define VALIDUS_INIT_1   0xA529298BU
 10100101001010010010100110001011
#define VALIDUS_INIT_2   0x66AC654AU
 01100110101011000110010101001010
#define VALIDUS_INIT_3   0x52865650U
 01010010100001100101011001010000
#define VALIDUS_INIT_4   0x18529234U
 00011000010100101001001000110100
#define VALIDUS_INIT_5   0x08508024U
 00001000010100001000000000100100

Typedefs

typedef uint8_t validus_octet
 Validus byte (8-bit).
typedef uint32_t validus_word
 Validus word (32-bit).

Functions

void validus_init (validus_state *state)
 Initializes a validus_state object.
void validus_append (validus_state *state, const void *data, size_t len)
 Processes a block of data, accumulating the results in the validus_state object.
void validus_finalize (validus_state *state)
 Finalizes a Validus hashing operation.
bool validus_compare (const validus_state *one, const validus_state *two)
 Compares two validus_state objects for equality.
void _validus_process (validus_state *state, const validus_word *blk32)
 Processes a 192-bit block of data, accumulating the results in the validus_state object.

Detailed Description

Definitions for the Validus hash function.

Configures the build, defines types, macros, constants, and functions that comprise the core of Validus.

Author
Ryan M. Lederman <leder.nosp@m.man@.nosp@m.gmail.nosp@m..com>
Date
2004-2025
Version
1.0.5

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.