This file comes from http://www.cs.technion.ac.il/~biham/Reports/Tiger/
Inclusion in gtk-gnutella is:
#include "common.h"
#include "endian.h"
#include "misc.h"
#include "base32.h"
#include "tiger.h"
#include "override.h"
#include "tiger_sboxes.h"
Defines | |
#define | OPTIMIZE_FOR_64BIT |
#define | PASSES 3 |
#define | t1 (tiger_sboxes) |
#define | t2 (tiger_sboxes + 256) |
#define | t3 (tiger_sboxes + 256 * 2) |
#define | t4 (tiger_sboxes + 256 * 3) |
#define | save_abc |
#define | round(a, b, c, x, mul) |
#define | pass(a, b, c, mul) |
#define | key_schedule |
#define | feedforward |
#define | compress |
#define | tiger_compress_macro(str, state) |
#define | tiger_compress(str, state) tiger_compress_macro(((guint64 *) str), ((guint64 *) state)) |
Functions | |
RCSID ("$Id:tiger.c, v 1.10 2005/07/31 18:45:36 graaff Exp $") | |
void | tiger (gconstpointer data, guint64 length, guint64 res[3]) |
void | tiger_init (void) |
Runs some test cases to check whether the implementation of the tiger hash algorithm is alright. |
|
Value: save_abc \ pass(a, b, c, 5) \ key_schedule \ pass(c, a, b, 7) \ key_schedule \ pass(b, c, a, 9) \ for (pass_no = 3; pass_no < PASSES; pass_no++) { \ key_schedule \ pass(a, b, c, 9) \ tmpa = a; a = c; c = b; b = tmpa; \ } \ feedforward |
|
Value: a ^= aa; \ b -= bb; \ c += cc; |
|
Value: x0 -= x7 ^ (((guint64) 0xA5A5A5A5UL << 32) | 0xA5A5A5A5UL); \ x1 ^= x0; \ x2 += x1; \ x3 -= x2 ^ ((~x1) << 19); \ x4 ^= x3; \ x5 += x4; \ x6 -= x5 ^ ((~x4) >> 23); \ x7 ^= x6; \ x0 += x7; \ x1 -= x0 ^ ((~x7) << 19); \ x2 ^= x1; \ x3 += x2; \ x4 -= x3 ^ ((~x2) >> 23); \ x5 ^= x4; \ x6 += x5; \ x7 -= x6 ^ (((guint64) 0x01234567UL << 32) | 0x89ABCDEFUL); |
|
|
|
Value: |
|
|
|
Value: |
|
Value: aa = a; \ bb = b; \ cc = c; |
|
|
|
|
|
|
|
|
|
|
|
Value: { \ guint64 a, b, c, tmpa; \ guint64 aa, bb, cc; \ guint64 x0, x1, x2, x3, x4, x5, x6, x7; \ int pass_no; \ \ a = state[0]; \ b = state[1]; \ c = state[2]; \ \ x0 = str[0]; x1 = str[1]; x2 = str[2]; x3 = str[3]; \ x4 = str[4]; x5 = str[5]; x6 = str[6]; x7 = str[7]; \ \ compress; \ \ state[0] = a; \ state[1] = b; \ state[2] = c; \ } |
|
|
|
|
|
Runs some test cases to check whether the implementation of the tiger hash algorithm is alright.
|