Lines Matching refs:sg

117 	struct scatterlist sg[2];  in rxkad_prime_packet_security()  local
140 sg_init_one(&sg[0], &tmpbuf, sizeof(tmpbuf)); in rxkad_prime_packet_security()
141 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf)); in rxkad_prime_packet_security()
142 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf)); in rxkad_prime_packet_security()
161 struct scatterlist sg[2]; in rxkad_secure_packet_auth() local
184 sg_init_one(&sg[0], &tmpbuf, sizeof(tmpbuf)); in rxkad_secure_packet_auth()
185 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf)); in rxkad_secure_packet_auth()
186 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf)); in rxkad_secure_packet_auth()
208 struct scatterlist sg[16]; in rxkad_secure_packet_encrypt() local
230 sg_init_one(&sg[0], sechdr, sizeof(rxkhdr)); in rxkad_secure_packet_encrypt()
231 sg_init_one(&sg[1], &rxkhdr, sizeof(rxkhdr)); in rxkad_secure_packet_encrypt()
232 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(rxkhdr)); in rxkad_secure_packet_encrypt()
242 sg_init_table(sg, nsg); in rxkad_secure_packet_encrypt()
243 skb_to_sgvec(skb, sg, 0, len); in rxkad_secure_packet_encrypt()
244 crypto_blkcipher_encrypt_iv(&desc, sg, sg, len); in rxkad_secure_packet_encrypt()
261 struct scatterlist sg[2]; in rxkad_secure_packet() local
294 sg_init_one(&sg[0], &tmpbuf, sizeof(tmpbuf)); in rxkad_secure_packet()
295 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf)); in rxkad_secure_packet()
296 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf)); in rxkad_secure_packet()
335 struct scatterlist sg[16]; in rxkad_verify_packet_auth() local
350 sg_init_table(sg, nsg); in rxkad_verify_packet_auth()
351 skb_to_sgvec(skb, sg, 0, 8); in rxkad_verify_packet_auth()
359 crypto_blkcipher_decrypt_iv(&desc, sg, sg, 8); in rxkad_verify_packet_auth()
410 struct scatterlist _sg[4], *sg; in rxkad_verify_packet_encrypt() local
425 sg = _sg; in rxkad_verify_packet_encrypt()
427 sg = kmalloc(sizeof(*sg) * nsg, GFP_NOIO); in rxkad_verify_packet_encrypt()
428 if (!sg) in rxkad_verify_packet_encrypt()
432 sg_init_table(sg, nsg); in rxkad_verify_packet_encrypt()
433 skb_to_sgvec(skb, sg, 0, skb->len); in rxkad_verify_packet_encrypt()
442 crypto_blkcipher_decrypt_iv(&desc, sg, sg, skb->len); in rxkad_verify_packet_encrypt()
443 if (sg != _sg) in rxkad_verify_packet_encrypt()
444 kfree(sg); in rxkad_verify_packet_encrypt()
493 struct scatterlist sg[2]; in rxkad_verify_packet() local
529 sg_init_one(&sg[0], &tmpbuf, sizeof(tmpbuf)); in rxkad_verify_packet()
530 sg_init_one(&sg[1], &tmpbuf, sizeof(tmpbuf)); in rxkad_verify_packet()
531 crypto_blkcipher_encrypt_iv(&desc, &sg[0], &sg[1], sizeof(tmpbuf)); in rxkad_verify_packet()
694 static void rxkad_sg_set_buf2(struct scatterlist sg[2], in rxkad_sg_set_buf2()
699 sg_init_table(sg, 2); in rxkad_sg_set_buf2()
701 sg_set_buf(&sg[0], buf, buflen); in rxkad_sg_set_buf2()
702 if (sg[0].offset + buflen > PAGE_SIZE) { in rxkad_sg_set_buf2()
704 sg[0].length = PAGE_SIZE - sg[0].offset; in rxkad_sg_set_buf2()
705 sg_set_buf(&sg[1], buf + sg[0].length, buflen - sg[0].length); in rxkad_sg_set_buf2()
709 sg_mark_end(&sg[nsg - 1]); in rxkad_sg_set_buf2()
711 ASSERTCMP(sg[0].length + sg[1].length, ==, buflen); in rxkad_sg_set_buf2()
723 struct scatterlist sg[2]; in rxkad_encrypt_response() local
731 rxkad_sg_set_buf2(sg, &resp->encrypted, sizeof(resp->encrypted)); in rxkad_encrypt_response()
732 crypto_blkcipher_encrypt_iv(&desc, sg, sg, sizeof(resp->encrypted)); in rxkad_encrypt_response()
827 struct scatterlist sg[1]; in rxkad_decrypt_ticket() local
860 sg_init_one(&sg[0], ticket, ticket_len); in rxkad_decrypt_ticket()
861 crypto_blkcipher_decrypt_iv(&desc, sg, sg, ticket_len); in rxkad_decrypt_ticket()
970 struct scatterlist sg[2]; in rxkad_decrypt_response() local
988 rxkad_sg_set_buf2(sg, &resp->encrypted, sizeof(resp->encrypted)); in rxkad_decrypt_response()
989 crypto_blkcipher_decrypt_iv(&desc, sg, sg, sizeof(resp->encrypted)); in rxkad_decrypt_response()