/crypto/ |
D | af_alg.c | 408 sg_init_table(sgl->sg, npages + 1); in af_alg_make_sg() 413 sg_set_page(sgl->sg + i, sgl->pages[i], plen, off); in af_alg_make_sg() 418 sg_mark_end(sgl->sg + npages - 1); in af_alg_make_sg() 428 sg_unmark_end(sgl_prev->sg + sgl_prev->npages - 1); in af_alg_link_sg() 429 sg_chain(sgl_prev->sg, sgl_prev->npages + 1, sgl_new->sg); in af_alg_link_sg() 492 struct scatterlist *sg = NULL; in af_alg_alloc_tsgl() local 496 sg = sgl->sg; in af_alg_alloc_tsgl() 498 if (!sg || sgl->cur >= MAX_SGL_ENTS) { in af_alg_alloc_tsgl() 500 struct_size(sgl, sg, (MAX_SGL_ENTS + 1)), in af_alg_alloc_tsgl() 505 sg_init_table(sgl->sg, MAX_SGL_ENTS + 1); in af_alg_alloc_tsgl() [all …]
|
D | cts.c | 60 struct scatterlist sg[2]; member 109 struct scatterlist *sg; in cts_cbc_encrypt() local 116 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_encrypt() 117 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_encrypt() 122 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_encrypt() 128 skcipher_request_set_crypt(subreq, sg, sg, bsize, req->iv); in cts_cbc_encrypt() 190 struct scatterlist *sg; in cts_cbc_decrypt() local 198 sg = scatterwalk_ffwd(rctx->sg, req->dst, offset - bsize); in cts_cbc_decrypt() 201 scatterwalk_map_and_copy(d + bsize, sg, 0, bsize, 0); in cts_cbc_decrypt() 215 scatterwalk_map_and_copy(d, sg, 0, bsize + lastn, 1); in cts_cbc_decrypt() [all …]
|
D | keywrap.c | 102 struct scatterlist *sg, in crypto_kw_scatterlist_ff() argument 111 while (sg) { in crypto_kw_scatterlist_ff() 112 if (sg->length > skip) { in crypto_kw_scatterlist_ff() 113 scatterwalk_start(walk, sg); in crypto_kw_scatterlist_ff() 117 skip -= sg->length; in crypto_kw_scatterlist_ff() 119 sg = sg_next(sg); in crypto_kw_scatterlist_ff()
|
D | twofish_common.c | 486 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 604 CALC_S (se, sf, sg, sh, 8, 0x00, 0x2D, 0x01, 0x2D); /* 01 A4 02 A4 */ in __twofish_setkey() 605 CALC_S (se, sf, sg, sh, 9, 0x2D, 0xA4, 0x44, 0x8A); /* A4 56 A1 55 */ in __twofish_setkey() 606 CALC_S (se, sf, sg, sh, 10, 0x8A, 0xD5, 0xBF, 0xD1); /* 55 82 FC 87 */ in __twofish_setkey() 607 CALC_S (se, sf, sg, sh, 11, 0xD1, 0x7F, 0x3D, 0x99); /* 87 F3 C1 5A */ in __twofish_setkey() 608 CALC_S (se, sf, sg, sh, 12, 0x99, 0x46, 0x66, 0x96); /* 5A 1E 47 58 */ in __twofish_setkey() 609 CALC_S (se, sf, sg, sh, 13, 0x96, 0x3C, 0x5B, 0xED); /* 58 C6 AE DB */ in __twofish_setkey() [all …]
|
D | ccm.c | 184 struct scatterlist sg[3]; in crypto_ccm_auth() local 194 sg_init_table(sg, 3); in crypto_ccm_auth() 195 sg_set_buf(&sg[0], odata, 16); in crypto_ccm_auth() 200 sg_set_buf(&sg[1], idata, ilen); in crypto_ccm_auth() 201 sg_chain(sg, 3, req->src); in crypto_ccm_auth() 204 sg_chain(sg, 2, req->src); in crypto_ccm_auth() 209 ahash_request_set_crypt(ahreq, sg, NULL, assoclen + ilen + 16); in crypto_ccm_auth() 221 sg_init_table(sg, 2); in crypto_ccm_auth() 222 sg_set_buf(&sg[0], idata, ilen); in crypto_ccm_auth() 224 sg_chain(sg, 2, plain); in crypto_ccm_auth() [all …]
|
D | scatterwalk.c | 55 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()
|
D | essiv.c | 60 struct scatterlist sg[4]; member 225 struct scatterlist *sg; in essiv_aead_crypt() local 236 sg_init_table(rctx->sg, 4); in essiv_aead_crypt() 249 sg_set_buf(rctx->sg, rctx->assoc, ssize); in essiv_aead_crypt() 251 sg_set_page(rctx->sg, sg_page(req->src), ssize, in essiv_aead_crypt() 255 sg_set_buf(rctx->sg + 1, iv, ivsize); in essiv_aead_crypt() 256 sg = scatterwalk_ffwd(rctx->sg + 2, req->src, req->assoclen); in essiv_aead_crypt() 257 if (sg != rctx->sg + 2) in essiv_aead_crypt() 258 sg_chain(rctx->sg, 3, sg); in essiv_aead_crypt() 260 src = rctx->sg; in essiv_aead_crypt()
|
D | gcm.c | 70 struct scatterlist sg; member 80 struct scatterlist sg; member 105 struct scatterlist sg[1]; in crypto_gcm_setkey() member 125 sg_init_one(data->sg, &data->hash, sizeof(data->hash)); in crypto_gcm_setkey() 131 skcipher_request_set_crypt(&data->req, data->sg, data->sg, in crypto_gcm_setkey() 162 struct scatterlist *sg; in crypto_gcm_init_common() local 170 sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); in crypto_gcm_init_common() 171 if (sg != pctx->src + 1) in crypto_gcm_init_common() 172 sg_chain(pctx->src, 2, sg); in crypto_gcm_init_common() 177 sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); in crypto_gcm_init_common() [all …]
|
D | tcrypt.c | 112 static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE], in sg_init_aead() argument 126 sg_init_table(sg, np + 1); in sg_init_aead() 128 sg_set_buf(&sg[0], assoc, aad_size); in sg_init_aead() 133 sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE); in sg_init_aead() 136 sg_set_buf(&sg[k + 1], xbuf[k], rem); in sg_init_aead() 147 struct scatterlist sg[XBUFSIZE]; member 381 sg_init_aead(cur->sg, cur->xbuf, in test_mb_aead_speed() 395 cur->sg, in test_mb_aead_speed() 407 aead_request_set_crypt(cur->req, cur->sg, in test_mb_aead_speed() 528 struct scatterlist *sg; in test_aead_speed() local [all …]
|
D | ahash.c | 66 struct scatterlist *sg; in hash_walk_new_entry() local 68 sg = walk->sg; in hash_walk_new_entry() 69 walk->offset = sg->offset; in hash_walk_new_entry() 70 walk->pg = sg_page(walk->sg) + (walk->offset >> PAGE_SHIFT); in hash_walk_new_entry() 72 walk->entrylen = sg->length; in hash_walk_new_entry() 123 walk->sg = sg_next(walk->sg); in crypto_hash_walk_done() 140 walk->sg = req->src; in crypto_hash_walk_first() 158 walk->sg = req->src; in crypto_ahash_walk_first()
|
D | algif_aead.c | 184 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()
|
D | algif_hash.c | 100 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()
|
D | shash.c | 309 struct scatterlist *sg; in shash_ahash_digest() local 314 (sg = req->src, offset = sg->offset, in shash_ahash_digest() 315 nbytes <= min(sg->length, ((unsigned int)(PAGE_SIZE)) - offset))) { in shash_ahash_digest() 318 data = kmap_atomic(sg_page(sg)); in shash_ahash_digest()
|
D | ablkcipher.c | 81 scatterwalk_start(&walk->out, sg_next(walk->out.sg)); in ablkcipher_done_slow() 281 scatterwalk_start(&walk->in, walk->in.sg); in ablkcipher_walk_first() 282 scatterwalk_start(&walk->out, walk->out.sg); in ablkcipher_walk_first()
|
D | adiantum.c | 124 struct scatterlist sg; in adiantum_setkey() member 149 sg_init_one(&data->sg, data->derived_keys, sizeof(data->derived_keys)); in adiantum_setkey() 155 skcipher_request_set_crypt(&data->req, &data->sg, &data->sg, in adiantum_setkey()
|
D | rsa-pkcs1pad.c | 161 static void pkcs1pad_sg_set_buf(struct scatterlist *sg, void *buf, size_t len, in pkcs1pad_sg_set_buf() argument 166 sg_init_table(sg, nsegs); in pkcs1pad_sg_set_buf() 167 sg_set_buf(sg, buf, len); in pkcs1pad_sg_set_buf() 170 sg_chain(sg, nsegs, next); in pkcs1pad_sg_set_buf()
|
D | xts.c | 36 struct scatterlist sg[2]; member 174 rctx->tail = scatterwalk_ffwd(rctx->sg, req->dst, in cts_final()
|
D | blkcipher.c | 334 scatterwalk_start(&walk->in, walk->in.sg); in blkcipher_walk_first() 335 scatterwalk_start(&walk->out, walk->out.sg); in blkcipher_walk_first()
|
D | algif_skcipher.c | 108 areq->first_rsgl.sgl.sg, len, ctx->iv); in _skcipher_recvmsg()
|
D | testmgr.c | 631 struct scatterlist *sg = &tsgl->sgl_ptr[i]; in verify_correct_output() local 632 unsigned int len = sg->length; in verify_correct_output() 633 unsigned int offset = sg->offset; in verify_correct_output() 646 actual_output = page_address(sg_page(sg)) + offset; in verify_correct_output() 1081 static inline const void *sg_data(struct scatterlist *sg) in sg_data() argument 1083 return page_address(sg_page(sg)) + sg->offset; in sg_data()
|