surfpcs(3) surfpcs(3) NNAAMMEE surfpcs - SURF protected counter sums SSYYNNTTAAXX ##iinncclluuddee <> void ssuurrffppccss__iinniitt(&_s,_s_e_e_d); void ssuurrffppccss__aadddd(&_s,_b_u_f,_l_e_n); void ssuurrffppccss__oouutt(&_s,_h); surfpcs _s; uint32 _s_e_e_d[32]; unsigned char *_b_u_f; unsigned int _l_e_n; unsigned char _h[SURFPCS_LEN]; DDEESSCCRRIIPPTTIIOONN ssuurrffppccss converts a character string to a 256-bit output, under control of a 1024-bit seed. When the seed is secret, ssuurrffppccss appears to be indistinguishable from a completely random variable-length-to-256-bit function. Applying ssuurrffppccss takes three steps. First, initialize a ssuurrffppccss vari- able, _s, with ssuurrffppccss__iinniitt. The seed will be recorded inside _s. Second, feed the input to ssuurrffppccss__aadddd. _b_u_f is a pointer to _l_e_n charac- ters of input. You can split the input across any number of ssuurrff-- ppccss__aadddd calls. Third, call ssuurrffppccss__oouutt. The output will be placed into _h, an array of SSUURRFFPPCCSS__LLEENN bytes. SSUURRFFPPCCSS__LLEENN is 32. To apply ssuurrffppccss to another input you must call ssuurrffppccss__iinniitt again. SSEEEE AALLSSOO surf(3) surfpcs(3)