crypto: Cryptographic routines


Defines

#define SURF_OUT_U32   8
#define SURF_IN_U32   12
#define SURF_SEED_U32   32
#define SURF_OUT   32
#define SURF_IN   48
#define SURF_SEED   128

Functions

void surf (uint32 out[8], const uint32 in[12], const uint32 seed[32])

Define Documentation

#define SURF_IN   48

The number of bytes used as input by surf

#define SURF_IN_U32   12

The number of 32-bit words used as input by surf

#define SURF_OUT   32

The number of bytes output by surf

#define SURF_OUT_U32   8

The number of 32-bit words output by surf

#define SURF_SEED   128

The number of bytes used as seed data by surf

#define SURF_SEED_U32   32

The number of 32-bit words used as seed data by surf


Function Documentation

void surf ( uint32  out[8],
const uint32  in[12],
const uint32  seed[32] 
)

Simple Unpredictable Random Function

This function converts a 384-bit input into a 256-bit output, given a 1024-bit seed k. When k is secret and uniformly selected, surf(k) seems to be indistinguishable from a uniformly selected 384-bit-to-256-bit function.

See http://cr.yp.to/papers/surf.ps This implementation was derived from this paper and from dns_random.c from djbdns-1.05, which was made public domain as per http://cr.yp.to/distributors.html on 2007-12-28.


Generated on Thu Feb 19 11:11:50 2009 for bglibs by  doxygen 1.5.4