/crypto/ |
D | af_alg.c | 418 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 …]
|
D | cts.c | 60 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 …]
|
D | keywrap.c | 103 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() 118 skip -= sg->length; in crypto_kw_scatterlist_ff() 120 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 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 …]
|
D | ccm.c | 176 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 …]
|
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 | gcm.c | 69 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 …]
|
D | essiv.c | 61 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()
|
D | fips140-selftests.c | 231 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()
|
D | tcrypt.c | 113 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 382 sg_init_aead(cur->sg, cur->xbuf, in test_mb_aead_speed() 396 cur->sg, in test_mb_aead_speed() 408 aead_request_set_crypt(cur->req, cur->sg, in test_mb_aead_speed() 529 struct scatterlist *sg; in test_aead_speed() local [all …]
|
D | ahash.c | 64 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()
|
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 | 324 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()
|
D | adiantum.c | 124 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()
|
D | rsa-pkcs1pad.c | 162 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()
|
D | xts.c | 37 struct scatterlist sg[2]; member 171 rctx->tail = scatterwalk_ffwd(rctx->sg, req->dst, in xts_cts_final()
|
D | algif_skcipher.c | 108 areq->first_rsgl.sgl.sg, len, ctx->iv); in _skcipher_recvmsg()
|
D | testmgr.c | 661 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() 1171 static inline const void *sg_data(struct scatterlist *sg) in sg_data() argument 1173 return page_address(sg_page(sg)) + sg->offset; in sg_data()
|