Home
last modified time | relevance | path

Searched refs:sg (Results 1 – 19 of 19) sorted by relevance

/crypto/
Daf_alg.c418 sg_init_table(sgl->sg, npages + 1); in af_alg_make_sg()
423 sg_set_page(sgl->sg + i, sgl->pages[i], plen, off); in af_alg_make_sg()
428 sg_mark_end(sgl->sg + npages - 1); in af_alg_make_sg()
438 sg_unmark_end(sgl_prev->sg + sgl_prev->npages - 1); in af_alg_link_sg()
439 sg_chain(sgl_prev->sg, sgl_prev->npages + 1, sgl_new->sg); in af_alg_link_sg()
502 struct scatterlist *sg = NULL; in af_alg_alloc_tsgl() local
506 sg = sgl->sg; in af_alg_alloc_tsgl()
508 if (!sg || sgl->cur >= MAX_SGL_ENTS) { in af_alg_alloc_tsgl()
510 struct_size(sgl, sg, (MAX_SGL_ENTS + 1)), in af_alg_alloc_tsgl()
515 sg_init_table(sgl->sg, MAX_SGL_ENTS + 1); in af_alg_alloc_tsgl()
[all …]
Dcts.c60 struct scatterlist sg[2]; member
105 struct scatterlist *sg; in cts_cbc_encrypt() local
112 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_encrypt()
113 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_encrypt()
118 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_encrypt()
124 skcipher_request_set_crypt(subreq, sg, sg, bsize, req->iv); in cts_cbc_encrypt()
186 struct scatterlist *sg; in cts_cbc_decrypt() local
194 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_decrypt()
197 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_decrypt()
211 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_decrypt()
[all …]
Dkeywrap.c103 struct scatterlist *sg, in crypto_kw_scatterlist_ff() argument
112 while (sg) { in crypto_kw_scatterlist_ff()
113 if (sg->length > skip) { in crypto_kw_scatterlist_ff()
114 scatterwalk_start(walk, sg); in crypto_kw_scatterlist_ff()
119 skip -= sg->length; in crypto_kw_scatterlist_ff()
120 sg = sg_next(sg); in crypto_kw_scatterlist_ff()
Dtwofish_common.c486 ctx->s[2][i] = mds[2][q1[(a) ^ sc] ^ sg]; \
494 ctx->s[2][i] = mds[2][q1[q0[(a) ^ sc] ^ sg] ^ sk]; \
502 ctx->s[2][i] = mds[2][q1[q0[q0[(a) ^ sc] ^ sg] ^ sk] ^ so]; \
579 u8 sa = 0, sb = 0, sc = 0, sd = 0, se = 0, sf = 0, sg = 0, sh = 0; in __twofish_setkey() local
601 CALC_S (se, sf, sg, sh, 8, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */ in __twofish_setkey()
602 CALC_S (se, sf, sg, sh, 9, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */ in __twofish_setkey()
603 CALC_S (se, sf, sg, sh, 10, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */ in __twofish_setkey()
604 CALC_S (se, sf, sg, sh, 11, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */ in __twofish_setkey()
605 CALC_S (se, sf, sg, sh, 12, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */ in __twofish_setkey()
606 CALC_S (se, sf, sg, sh, 13, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */ in __twofish_setkey()
[all …]
Dccm.c176 struct scatterlist sg[3]; in crypto_ccm_auth() local
186 sg_init_table(sg, 3); in crypto_ccm_auth()
187 sg_set_buf(&sg[0], odata, 16); in crypto_ccm_auth()
192 sg_set_buf(&sg[1], idata, ilen); in crypto_ccm_auth()
193 sg_chain(sg, 3, req->src); in crypto_ccm_auth()
196 sg_chain(sg, 2, req->src); in crypto_ccm_auth()
201 ahash_request_set_crypt(ahreq, sg, NULL, assoclen + ilen + 16); in crypto_ccm_auth()
213 sg_init_table(sg, 2); in crypto_ccm_auth()
214 sg_set_buf(&sg[0], idata, ilen); in crypto_ccm_auth()
216 sg_chain(sg, 2, plain); in crypto_ccm_auth()
[all …]
Dscatterwalk.c55 void scatterwalk_map_and_copy(void *buf, struct scatterlist *sg, in scatterwalk_map_and_copy() argument
64 sg = scatterwalk_ffwd(tmp, sg, start); in scatterwalk_map_and_copy()
66 scatterwalk_start(&walk, sg); in scatterwalk_map_and_copy()
Dgcm.c69 struct scatterlist sg; member
79 struct scatterlist sg; member
104 struct scatterlist sg[1]; in crypto_gcm_setkey() member
122 sg_init_one(data->sg, &data->hash, sizeof(data->hash)); in crypto_gcm_setkey()
128 skcipher_request_set_crypt(&data->req, data->sg, data->sg, in crypto_gcm_setkey()
156 struct scatterlist *sg; in crypto_gcm_init_common() local
164 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common()
165 if (sg != pctx->src + 1) in crypto_gcm_init_common()
166 sg_chain(pctx->src, 2, sg); in crypto_gcm_init_common()
171 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_gcm_init_common()
[all …]
Dfips140-selftests.c231 struct scatterlist sg; in fips_test_skcipher() local
258 sg_init_one(&sg, message, vec->message_size); in fips_test_skcipher()
262 skcipher_request_set_crypt(req, &sg, &sg, vec->message_size, iv); in fips_test_skcipher()
308 struct scatterlist sg[2]; in fips_test_aead() local
339 sg_init_table(sg, ARRAY_SIZE(sg)); in fips_test_aead()
341 sg_set_buf(&sg[sg_idx++], assoc, vec->assoc_size); in fips_test_aead()
342 sg_set_buf(&sg[sg_idx++], message, vec->ciphertext_size); in fips_test_aead()
365 aead_request_set_crypt(req, sg, sg, vec->plaintext_size, iv); in fips_test_aead()
381 aead_request_set_crypt(req, sg, sg, vec->ciphertext_size, iv); in fips_test_aead()
Dessiv.c61 struct scatterlist sg[4]; member
208 struct scatterlist *sg; in essiv_aead_crypt() local
219 sg_init_table(rctx->sg, 4); in essiv_aead_crypt()
232 sg_set_buf(rctx->sg, rctx->assoc, ssize); in essiv_aead_crypt()
234 sg_set_page(rctx->sg, sg_page(req->src), ssize, in essiv_aead_crypt()
238 sg_set_buf(rctx->sg + 1, iv, ivsize); in essiv_aead_crypt()
239 sg = scatterwalk_ffwd(rctx->sg + 2, req->src, req->assoclen); in essiv_aead_crypt()
240 if (sg != rctx->sg + 2) in essiv_aead_crypt()
241 sg_chain(rctx->sg, 3, sg); in essiv_aead_crypt()
243 src = rctx->sg; in essiv_aead_crypt()
Dtcrypt.c113 static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE], in sg_init_aead() argument
127 sg_init_table(sg, np + 1); in sg_init_aead()
129 sg_set_buf(&sg[0], assoc, aad_size); in sg_init_aead()
134 sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE); in sg_init_aead()
137 sg_set_buf(&sg[k + 1], xbuf[k], rem); in sg_init_aead()
148 struct scatterlist sg[XBUFSIZE]; member
389 sg_init_aead(cur->sg, cur->xbuf, in test_mb_aead_speed()
403 cur->sg, in test_mb_aead_speed()
415 aead_request_set_crypt(cur->req, cur->sg, in test_mb_aead_speed()
536 struct scatterlist *sg; in test_aead_speed() local
[all …]
Dahash.c64 struct scatterlist *sg; in hash_walk_new_entry() local
66 sg = walk->sg; in hash_walk_new_entry()
67 walk->offset = sg->offset; in hash_walk_new_entry()
68 walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); in hash_walk_new_entry()
70 walk->entrylen = sg->length; in hash_walk_new_entry()
113 walk->sg = sg_next(walk->sg); in crypto_hash_walk_done()
130 walk->sg = req->src; in crypto_hash_walk_first()
Dalgif_aead.c184 struct scatterlist *process_sg = tsgl->sg + i; in _aead_recvmsg()
213 rsgl_src = areq->first_rsgl.sgl.sg; in _aead_recvmsg()
227 areq->first_rsgl.sgl.sg, processed); in _aead_recvmsg()
245 areq->first_rsgl.sgl.sg, outlen); in _aead_recvmsg()
271 sg_unmark_end(sgl_prev->sg + sgl_prev->npages - 1); in _aead_recvmsg()
272 sg_chain(sgl_prev->sg, sgl_prev->npages + 1, in _aead_recvmsg()
281 areq->first_rsgl.sgl.sg, used, ctx->iv); in _aead_recvmsg()
Dalgif_hash.c100 ahash_request_set_crypt(&ctx->req, ctx->sgl.sg, NULL, len); in hash_sendmsg()
143 sg_init_table(ctx->sgl.sg, 1); in hash_sendpage()
144 sg_set_page(ctx->sgl.sg, page, size, offset); in hash_sendpage()
153 ahash_request_set_crypt(&ctx->req, ctx->sgl.sg, ctx->result, size); in hash_sendpage()
Dshash.c324 struct scatterlist *sg; in shash_ahash_digest() local
329 (sg = req->src, offset = sg->offset, in shash_ahash_digest()
330 nbytes <= min(sg->length, ((unsigned int)(PAGE_SIZE)) - offset))) { in shash_ahash_digest()
333 data = kmap_atomic(sg_page(sg)); in shash_ahash_digest()
Dadiantum.c124 struct scatterlist sg; in adiantum_setkey() member
146 sg_init_one(&data->sg, data->derived_keys, sizeof(data->derived_keys)); in adiantum_setkey()
152 skcipher_request_set_crypt(&data->req, &data->sg, &data->sg, in adiantum_setkey()
Drsa-pkcs1pad.c162 static void pkcs1pad_sg_set_buf(struct scatterlist *sg, void *buf, size_t len, in pkcs1pad_sg_set_buf() argument
167 sg_init_table(sg, nsegs); in pkcs1pad_sg_set_buf()
168 sg_set_buf(sg, buf, len); in pkcs1pad_sg_set_buf()
171 sg_chain(sg, nsegs, next); in pkcs1pad_sg_set_buf()
Dxts.c37 struct scatterlist sg[2]; member
171 rctx->tail = scatterwalk_ffwd(rctx->sg, req->dst, in xts_cts_final()
Dalgif_skcipher.c108 areq->first_rsgl.sgl.sg, len, ctx->iv); in _skcipher_recvmsg()
Dtestmgr.c661 struct scatterlist *sg = &tsgl->sgl_ptr[i]; in verify_correct_output() local
662 unsigned int len = sg->length; in verify_correct_output()
663 unsigned int offset = sg->offset; in verify_correct_output()
676 actual_output = page_address(sg_page(sg)) + offset; in verify_correct_output()