Lines Matching defs:hp

24 			    unsigned int len, struct tcp_sigpool *hp)
29 if (crypto_ahash_setkey(crypto_ahash_reqtfm(hp->req),
33 ret = crypto_ahash_init(hp->req);
38 ahash_request_set_crypt(hp->req, &sg, key, len);
39 crypto_ahash_update(hp->req);
41 ret = crypto_ahash_final(hp->req);
349 struct tcp_sigpool hp;
352 err = tcp_sigpool_start(mkt->tcp_sigpool_id, &hp);
356 tmp = hp.scratch;
367 err = tcp_ao_calc_traffic_key(mkt, key, tmp, sizeof(*tmp), &hp);
368 tcp_sigpool_end(&hp);
437 static int tcp_v4_ao_hash_pseudoheader(struct tcp_sigpool *hp,
444 bp = hp->scratch;
452 ahash_request_set_crypt(hp->req, &sg, NULL, sizeof(*bp));
453 return crypto_ahash_update(hp->req);
459 struct tcp_sigpool *hp, int nbytes)
466 return tcp_v4_ao_hash_pseudoheader(hp, sk->sk_daddr,
470 return tcp_v6_ao_hash_pseudoheader(hp, &sk->sk_v6_daddr,
480 return tcp_v4_ao_hash_pseudoheader(hp, iph->daddr,
486 return tcp_v6_ao_hash_pseudoheader(hp, &iph->daddr,
508 /* tcp_ao_hash_sne(struct tcp_sigpool *hp)
509 * @hp - used for hashing
512 static int tcp_ao_hash_sne(struct tcp_sigpool *hp, u32 sne)
517 bp = (__be32 *)hp->scratch;
521 ahash_request_set_crypt(hp->req, &sg, NULL, sizeof(*bp));
522 return crypto_ahash_update(hp->req);
525 static int tcp_ao_hash_header(struct tcp_sigpool *hp,
531 u8 *hdr = hp->scratch;
553 ahash_request_set_crypt(hp->req, &sg, NULL, len);
554 err = crypto_ahash_update(hp->req);
567 struct tcp_sigpool hp;
574 if (tcp_sigpool_start(key->tcp_sigpool_id, &hp))
577 if (crypto_ahash_setkey(crypto_ahash_reqtfm(hp.req), tkey, tkey_len))
580 if (crypto_ahash_init(hp.req))
583 if (tcp_ao_hash_sne(&hp, sne))
586 if (tcp_v4_ao_hash_pseudoheader(&hp, daddr->a4.s_addr,
591 if (tcp_v6_ao_hash_pseudoheader(&hp, &daddr->a6,
599 if (tcp_ao_hash_header(&hp, th,
603 ahash_request_set_crypt(hp.req, NULL, hash_buf, 0);
604 if (crypto_ahash_final(hp.req))
608 tcp_sigpool_end(&hp);
613 tcp_sigpool_end(&hp);
627 struct tcp_sigpool hp;
634 if (tcp_sigpool_start(key->tcp_sigpool_id, &hp))
637 if (crypto_ahash_setkey(crypto_ahash_reqtfm(hp.req), tkey, tkey_len))
641 if (crypto_ahash_init(hp.req))
644 if (tcp_ao_hash_sne(&hp, sne))
646 if (tcp_ao_hash_pseudoheader(family, sk, skb, &hp, skb->len))
648 if (tcp_ao_hash_header(&hp, th,
652 if (tcp_sigpool_hash_skb_data(&hp, skb, th->doff << 2))
654 ahash_request_set_crypt(hp.req, NULL, hash_buf, 0);
655 if (crypto_ahash_final(hp.req))
659 tcp_sigpool_end(&hp);
664 tcp_sigpool_end(&hp);
1343 struct tcp_sigpool hp;
1398 err = tcp_sigpool_start(key->tcp_sigpool_id, &hp);
1402 tfm = crypto_ahash_reqtfm(hp.req);
1404 void *scratch = hp.scratch;
1416 err = crypto_ahash_init(hp.req);
1420 ahash_request_set_crypt(hp.req, &sg, key->key, cmd->keylen);
1421 err = crypto_ahash_update(hp.req);
1425 err |= crypto_ahash_final(hp.req);
1435 tcp_sigpool_end(&hp);
1444 tcp_sigpool_end(&hp);
1555 struct tcp_sigpool hp;
1573 err = tcp_sigpool_start(pool_id, &hp);
1577 tfm = crypto_ahash_reqtfm(hp.req);
1579 tcp_sigpool_end(&hp);