Lines Matching refs:hash

294 /* The NH-based hash functions used in UMAC are described in the UMAC paper
298 * in a single buffer and returns the hash result immediately. The second
302 * hash, the client calls nh_final() which calculates the hash output.
303 * Before beginning another hash calculation the nh_reset() routine
308 * responsability to pass no more than L1_KEY_LEN bytes per hash result.
320 #define STREAMS (UMAC_OUTPUT_LEN / 4) /* Number of times hash is applied */
339 /* NH hashing primitive. Previous (partial) hash result is loaded and
375 * reading and writing 16 bytes of hash-state per call.
422 * reading and writing 24 bytes of hash-state per call.
477 * reading and writing 24 bytes of hash-state per call.
545 /* This function is a wrapper for the primitive NH hash functions. It takes
546 * as argument "hc" the current hash context and a buffer which must be a
676 * into an NH context, nh_final is called to produce a hash result. If any
723 /* Initialize the hash state */
747 * hashed by NH. The NH output is then hashed by a polynomial-hash layer
749 * layer, an inner-product hash is used to produce the final UHASH output.
771 /* ----- Poly hash and Inner-Product hash Constants --------------------- */
783 nh_ctx hash; /* Hash context for L1 NH hash */
785 UINT64 poly_accum[STREAMS]; /* poly hash result */
800 * be within Z_p32 and Z_p64, but the Inner-Product hash implementation
833 /* Although UMAC is specified to use a ramped polynomial hash scheme, this
861 /* The final step in UHASH is an inner-product hash. The poly hash
863 * product hash breaks the polyhash output into 16-bit chunks and
940 /* Reset uhash context for next hash session */
943 nh_reset(&pc->hash);
973 /* Initialize the L1 hash */
974 nh_init(&ahc->hash, prf_key);
976 /* Setup L2 hash variables */
990 /* Setup L3-1 hash variables */
1000 /* Setup L3-2 hash variables */
1054 * hash each one with NH, calling the polyhash on each NH output.
1062 nh_update(&ctx->hash, (const UINT8 *)input, len);
1072 /* If some bytes have been passed to the hash function */
1077 nh_update(&ctx->hash, (const UINT8 *)input, bytes_remaining);
1078 nh_final(&ctx->hash, nh_result);
1087 nh(&ctx->hash, (const UINT8 *)input, L1_KEY_LEN,
1098 nh_update(&ctx->hash, (const UINT8 *)input, len);
1116 nh_final(&ctx->hash, nh_result);
1121 nh_final(&ctx->hash, nh_result);
1149 nh(&ahc->hash, (UINT8 *)msg, nh_len, len, nh_result);
1152 /* Otherwise, we hash each L1_KEY_LEN chunk with NH, passing the NH
1156 nh(&ahc->hash, (UINT8 *)msg, L1_KEY_LEN, L1_KEY_LEN, nh_result);
1165 nh(&ahc->hash, (UINT8 *)msg, nh_len, len, nh_result);
1190 uhash_ctx hash; /* Hash function for message compression */
1199 /* Reset the hash function to begin a new authentication. */
1201 uhash_reset(&ctx->hash);
1240 uhash_init(&ctx->hash, prf_key);
1251 uhash_final(&ctx->hash, (u_char *)tag);
1261 /* hash each one, calling the PDF on the hashed output whenever the hash- */
1264 uhash_update(&ctx->hash, input, len);
1276 uhash(&ctx->hash, input, len, (u_char *)tag);