sph_radiogatun.h File Reference

#include <stddef.h>
#include "sph_types.h"

Go to the source code of this file.

Data Structures

struct  sph_radiogatun32_context
struct  sph_radiogatun64_context

Defines

#define SPH_SIZE_radiogatun32   256
#define SPH_SIZE_radiogatun64   256

Functions

void sph_radiogatun32_init (void *cc)
void sph_radiogatun32 (void *cc, const void *data, size_t len)
void sph_radiogatun32_close (void *cc, void *dst)
void sph_radiogatun64_init (void *cc)
void sph_radiogatun64 (void *cc, const void *data, size_t len)
void sph_radiogatun64_close (void *cc, void *dst)

Detailed Description

RadioGatun interface.

RadioGatun has been published in: G. Bertoni, J. Daemen, M. Peeters and G. Van Assche, "RadioGatun, a belt-and-mill hash function", presented at the Second Cryptographic Hash Workshop, Santa Barbara, August 24-25, 2006. The main Web site, containing that article, the reference code and some test vectors, appears to be currently located at the following URL: http://radiogatun.noekeon.org/

The presentation article does not specify endianness or padding. The reference code uses the following conventions, which we also apply here:

These conventions are very close to those we use for PANAMA, which is a close ancestor or RadioGatun.

RadioGatun is actually a family of functions, depending on some internal parameters. We implement here two functions, with a "belt length" of 13, a "belt width" of 3, and a "mill length" of 19. The RadioGatun[32] version uses 32-bit words, while the RadioGatun[64] variant uses 64-bit words.

Strictly speaking, the name "RadioGatun" should use an acute accent on the "u", which we omitted here to keep strict ASCII-compatibility of this file.

==========================(LICENSE BEGIN)============================

Copyright (c) 2007-2010 Projet RNRT SAPHIR

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.

===========================(LICENSE END)=============================

Author:
Thomas Pornin <thomas.pornin@cryptolog.com>

Define Documentation

#define SPH_SIZE_radiogatun32   256

Output size (in bits) for RadioGatun[32].

#define SPH_SIZE_radiogatun64   256

Output size (in bits) for RadioGatun[64].


Function Documentation

void sph_radiogatun32_init ( void *  cc  ) 

Initialize a RadioGatun[32] context. This process performs no memory allocation.

Parameters:
cc the RadioGatun[32] context (pointer to a sph_radiogatun32_context)
void sph_radiogatun32 ( void *  cc,
const void *  data,
size_t  len 
)

Process some data bytes. It is acceptable that len is zero (in which case this function does nothing).

Parameters:
cc the RadioGatun[32] context
data the input data
len the input data length (in bytes)
void sph_radiogatun32_close ( void *  cc,
void *  dst 
)

Terminate the current RadioGatun[32] computation and output the result into the provided buffer. The destination buffer must be wide enough to accomodate the result (32 bytes). The context is automatically reinitialized.

Parameters:
cc the RadioGatun[32] context
dst the destination buffer
void sph_radiogatun64_init ( void *  cc  ) 

Initialize a RadioGatun[64] context. This process performs no memory allocation.

Parameters:
cc the RadioGatun[64] context (pointer to a sph_radiogatun64_context)
void sph_radiogatun64 ( void *  cc,
const void *  data,
size_t  len 
)

Process some data bytes. It is acceptable that len is zero (in which case this function does nothing).

Parameters:
cc the RadioGatun[64] context
data the input data
len the input data length (in bytes)
void sph_radiogatun64_close ( void *  cc,
void *  dst 
)

Terminate the current RadioGatun[64] computation and output the result into the provided buffer. The destination buffer must be wide enough to accomodate the result (32 bytes). The context is automatically reinitialized.

Parameters:
cc the RadioGatun[64] context
dst the destination buffer
Generated on Mon Jun 21 17:48:04 2010 for sphlib by  doxygen 1.6.3