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);
350 struct tcp_sigpool hp;
353 err = tcp_sigpool_start(mkt->tcp_sigpool_id, &hp);
357 tmp = hp.scratch;
368 err = tcp_ao_calc_traffic_key(mkt, key, tmp, sizeof(*tmp), &hp);
369 tcp_sigpool_end(&hp);
438 static int tcp_v4_ao_hash_pseudoheader(struct tcp_sigpool *hp,
445 bp = hp->scratch;
453 ahash_request_set_crypt(hp->req, &sg, NULL, sizeof(*bp));
454 return crypto_ahash_update(hp->req);
460 struct tcp_sigpool *hp, int nbytes)
467 return tcp_v4_ao_hash_pseudoheader(hp, sk->sk_daddr,
471 return tcp_v6_ao_hash_pseudoheader(hp, &sk->sk_v6_daddr,
481 return tcp_v4_ao_hash_pseudoheader(hp, iph->daddr,
487 return tcp_v6_ao_hash_pseudoheader(hp, &iph->daddr,
509 /* tcp_ao_hash_sne(struct tcp_sigpool *hp)
510 * @hp - used for hashing
513 static int tcp_ao_hash_sne(struct tcp_sigpool *hp, u32 sne)
518 bp = (__be32 *)hp->scratch;
522 ahash_request_set_crypt(hp->req, &sg, NULL, sizeof(*bp));
523 return crypto_ahash_update(hp->req);
526 static int tcp_ao_hash_header(struct tcp_sigpool *hp,
532 u8 *hdr = hp->scratch;
554 ahash_request_set_crypt(hp->req, &sg, NULL, len);
555 err = crypto_ahash_update(hp->req);
568 struct tcp_sigpool hp;
575 if (tcp_sigpool_start(key->tcp_sigpool_id, &hp))
578 if (crypto_ahash_setkey(crypto_ahash_reqtfm(hp.req), tkey, tkey_len))
581 if (crypto_ahash_init(hp.req))
584 if (tcp_ao_hash_sne(&hp, sne))
587 if (tcp_v4_ao_hash_pseudoheader(&hp, daddr->a4.s_addr,
592 if (tcp_v6_ao_hash_pseudoheader(&hp, &daddr->a6,
600 if (tcp_ao_hash_header(&hp, th,
604 ahash_request_set_crypt(hp.req, NULL, hash_buf, 0);
605 if (crypto_ahash_final(hp.req))
609 tcp_sigpool_end(&hp);
614 tcp_sigpool_end(&hp);
628 struct tcp_sigpool hp;
635 if (tcp_sigpool_start(key->tcp_sigpool_id, &hp))
638 if (crypto_ahash_setkey(crypto_ahash_reqtfm(hp.req), tkey, tkey_len))
642 if (crypto_ahash_init(hp.req))
645 if (tcp_ao_hash_sne(&hp, sne))
647 if (tcp_ao_hash_pseudoheader(family, sk, skb, &hp, skb->len))
649 if (tcp_ao_hash_header(&hp, th,
653 if (tcp_sigpool_hash_skb_data(&hp, skb, th->doff << 2))
655 ahash_request_set_crypt(hp.req, NULL, hash_buf, 0);
656 if (crypto_ahash_final(hp.req))
660 tcp_sigpool_end(&hp);
665 tcp_sigpool_end(&hp);
1342 struct tcp_sigpool hp;
1397 err = tcp_sigpool_start(key->tcp_sigpool_id, &hp);
1401 tfm = crypto_ahash_reqtfm(hp.req);
1403 void *scratch = hp.scratch;
1415 err = crypto_ahash_init(hp.req);
1419 ahash_request_set_crypt(hp.req, &sg, key->key, cmd->keylen);
1420 err = crypto_ahash_update(hp.req);
1424 err |= crypto_ahash_final(hp.req);
1434 tcp_sigpool_end(&hp);
1443 tcp_sigpool_end(&hp);
1554 struct tcp_sigpool hp;
1572 err = tcp_sigpool_start(pool_id, &hp);
1576 tfm = crypto_ahash_reqtfm(hp.req);
1578 tcp_sigpool_end(&hp);