surfpcs

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

surfpcs - SURF protected counter sums  

SYNTAX

#include <surfpcs.h>

void surfpcs_init(&s,seed);

void surfpcs_add(&s,buf,len);

void surfpcs_out(&s,h);

surfpcs s;
uint32 seed[32];
unsigned char *buf;
unsigned int len;
unsigned char h[SURFPCS_LEN];  

DESCRIPTION

surfpcs converts a character string to a 256-bit output, under control of a 1024-bit seed. When the seed is secret, surfpcs appears to be indistinguishable from a completely random variable-length-to-256-bit function.

Applying surfpcs takes three steps. First, initialize a surfpcs variable, s, with surfpcs_init. The seed will be recorded inside s.

Second, feed the input to surfpcs_add. buf is a pointer to len characters of input. You can split the input across any number of surfpcs_add calls.

Third, call surfpcs_out. The output will be placed into h, an array of SURFPCS_LEN bytes. SURFPCS_LEN is 32.

To apply surfpcs to another input you must call surfpcs_init again.  

SEE ALSO

surf(3)


 

Index

NAME
SYNTAX
DESCRIPTION
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 18:00:51 GMT, June 16, 2008