Home
last modified time | relevance | path

Searched refs:data (Results 1 – 25 of 65) sorted by relevance

123

/crypto/
Dstreebog_generic.c867 struct streebog_uint512 *data) in streebog_xlps() argument
882 data->qword[i] = cpu_to_le64(Ax[0][r0 & 0xFF]); in streebog_xlps()
883 data->qword[i] ^= cpu_to_le64(Ax[1][r1 & 0xFF]); in streebog_xlps()
884 data->qword[i] ^= cpu_to_le64(Ax[2][r2 & 0xFF]); in streebog_xlps()
885 data->qword[i] ^= cpu_to_le64(Ax[3][r3 & 0xFF]); in streebog_xlps()
886 data->qword[i] ^= cpu_to_le64(Ax[4][r4 & 0xFF]); in streebog_xlps()
887 data->qword[i] ^= cpu_to_le64(Ax[5][r5 & 0xFF]); in streebog_xlps()
888 data->qword[i] ^= cpu_to_le64(Ax[6][r6 & 0xFF]); in streebog_xlps()
889 data->qword[i] ^= cpu_to_le64(Ax[7][r7 & 0xFF]); in streebog_xlps()
902 struct streebog_uint512 *data) in streebog_round() argument
[all …]
Dmichael_mic.c59 static int michael_update(struct shash_desc *desc, const u8 *data, in michael_update() argument
68 memcpy((u8 *)&mctx->pending + mctx->pending_len, data, flen); in michael_update()
70 data += flen; in michael_update()
82 mctx->l ^= get_unaligned_le32(data); in michael_update()
84 data += 4; in michael_update()
90 memcpy(&mctx->pending, data, len); in michael_update()
100 u8 *data = (u8 *)&mctx->pending; in michael_final() local
108 mctx->l ^= data[0] | 0x5a00; in michael_final()
111 mctx->l ^= data[0] | (data[1] << 8) | 0x5a0000; in michael_final()
114 mctx->l ^= data[0] | (data[1] << 8) | (data[2] << 16) | in michael_final()
Dblowfish_common.c350 u32 data[2], temp; in blowfish_setkey() local
372 data[0] = 0x00000000; in blowfish_setkey()
373 data[1] = 0x00000000; in blowfish_setkey()
376 encrypt_block((struct bf_ctx *)ctx, data, data); in blowfish_setkey()
378 P[i] = data[0]; in blowfish_setkey()
379 P[i + 1] = data[1]; in blowfish_setkey()
384 encrypt_block((struct bf_ctx *)ctx, data, data); in blowfish_setkey()
386 S[count] = data[0]; in blowfish_setkey()
387 S[count + 1] = data[1]; in blowfish_setkey()
Dcrct10dif_generic.c51 static int chksum_update(struct shash_desc *desc, const u8 *data, in chksum_update() argument
56 ctx->crc = crc_t10dif_generic(ctx->crc, data, length); in chksum_update()
68 static int __chksum_finup(__u16 crc, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument
70 *(__u16 *)out = crc_t10dif_generic(crc, data, len); in __chksum_finup()
74 static int chksum_finup(struct shash_desc *desc, const u8 *data, in chksum_finup() argument
79 return __chksum_finup(ctx->crc, data, len, out); in chksum_finup()
82 static int chksum_digest(struct shash_desc *desc, const u8 *data, in chksum_digest() argument
85 return __chksum_finup(0, data, length, out); in chksum_digest()
Dshash.c91 static int shash_update_unaligned(struct shash_desc *desc, const u8 *data, in shash_update_unaligned() argument
98 ((unsigned long)data & alignmask); in shash_update_unaligned()
113 memcpy(buf, data, unaligned_len); in shash_update_unaligned()
118 shash->update(desc, data + unaligned_len, len - unaligned_len); in shash_update_unaligned()
121 int crypto_shash_update(struct shash_desc *desc, const u8 *data, in crypto_shash_update() argument
128 if ((unsigned long)data & alignmask) in crypto_shash_update()
129 return shash_update_unaligned(desc, data, len); in crypto_shash_update()
131 return shash->update(desc, data, len); in crypto_shash_update()
176 static int shash_finup_unaligned(struct shash_desc *desc, const u8 *data, in shash_finup_unaligned() argument
179 return crypto_shash_update(desc, data, len) ?: in shash_finup_unaligned()
[all …]
Dcrc32_generic.c57 static int crc32_update(struct shash_desc *desc, const u8 *data, in crc32_update() argument
62 *crcp = crc32_le(*crcp, data, len); in crc32_update()
67 static int __crc32_finup(u32 *crcp, const u8 *data, unsigned int len, in __crc32_finup() argument
70 put_unaligned_le32(crc32_le(*crcp, data, len), out); in __crc32_finup()
74 static int crc32_finup(struct shash_desc *desc, const u8 *data, in crc32_finup() argument
77 return __crc32_finup(shash_desc_ctx(desc), data, len, out); in crc32_finup()
88 static int crc32_digest(struct shash_desc *desc, const u8 *data, in crc32_digest() argument
91 return __crc32_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32_digest()
Dalgboss.c28 struct crypto_attr_type data; member
33 struct crypto_attr_alg data; member
50 static int cryptomgr_probe(void *data) in cryptomgr_probe() argument
52 struct cryptomgr_param *param = data; in cryptomgr_probe()
126 memcpy(param->attrs[i].data.name, name, len); in cryptomgr_schedule_probe()
148 param->type.data.type = larval->alg.cra_flags & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe()
149 param->type.data.mask = larval->mask & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe()
174 static int cryptomgr_test(void *data) in cryptomgr_test() argument
176 struct crypto_test_param *param = data; in cryptomgr_test()
222 void *data) in cryptomgr_notify() argument
[all …]
Dcrc32c_generic.c83 static int chksum_update(struct shash_desc *desc, const u8 *data, in chksum_update() argument
88 ctx->crc = __crc32c_le(ctx->crc, data, length); in chksum_update()
100 static int __chksum_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument
102 put_unaligned_le32(~__crc32c_le(*crcp, data, len), out); in __chksum_finup()
106 static int chksum_finup(struct shash_desc *desc, const u8 *data, in chksum_finup() argument
111 return __chksum_finup(&ctx->crc, data, len, out); in chksum_finup()
114 static int chksum_digest(struct shash_desc *desc, const u8 *data, in chksum_digest() argument
119 return __chksum_finup(&mctx->key, data, length, out); in chksum_digest()
Dadiantum.c127 } *data; in adiantum_setkey() local
141 data = kzalloc(sizeof(*data) + in adiantum_setkey()
143 if (!data) in adiantum_setkey()
145 data->iv[0] = 1; in adiantum_setkey()
146 sg_init_one(&data->sg, data->derived_keys, sizeof(data->derived_keys)); in adiantum_setkey()
147 crypto_init_wait(&data->wait); in adiantum_setkey()
148 skcipher_request_set_tfm(&data->req, tctx->streamcipher); in adiantum_setkey()
149 skcipher_request_set_callback(&data->req, CRYPTO_TFM_REQ_MAY_SLEEP | in adiantum_setkey()
151 crypto_req_done, &data->wait); in adiantum_setkey()
152 skcipher_request_set_crypt(&data->req, &data->sg, &data->sg, in adiantum_setkey()
[all …]
Dtcrypt.c142 struct crypto_wait *wait = req->base.data; in do_one_aead_op()
157 static int do_mult_aead_op(struct test_mb_aead_data *data, int enc, in do_mult_aead_op() argument
165 rc[i] = crypto_aead_encrypt(data[i].req); in do_mult_aead_op()
167 rc[i] = crypto_aead_decrypt(data[i].req); in do_mult_aead_op()
172 rc[i] = crypto_wait_req(rc[i], &data[i].wait); in do_mult_aead_op()
183 static int test_mb_aead_jiffies(struct test_mb_aead_data *data, int enc, in test_mb_aead_jiffies() argument
197 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_jiffies()
210 static int test_mb_aead_cycles(struct test_mb_aead_data *data, int enc, in test_mb_aead_cycles() argument
224 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_cycles()
234 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_cycles()
[all …]
Dseqiv.c42 struct aead_request *req = base->data; in seqiv_aead_encrypt_complete()
54 void *data; in seqiv_aead_encrypt() local
65 data = req->base.data; in seqiv_aead_encrypt()
92 data = req; in seqiv_aead_encrypt()
95 aead_request_set_callback(subreq, req->base.flags, compl, data); in seqiv_aead_encrypt()
115 void *data; in seqiv_aead_decrypt() local
124 data = req->base.data; in seqiv_aead_decrypt()
126 aead_request_set_callback(subreq, req->base.flags, compl, data); in seqiv_aead_decrypt()
Dgcm.c106 } *data; in crypto_gcm_setkey() local
116 data = kzalloc(sizeof(*data) + crypto_skcipher_reqsize(ctr), in crypto_gcm_setkey()
118 if (!data) in crypto_gcm_setkey()
121 crypto_init_wait(&data->wait); in crypto_gcm_setkey()
122 sg_init_one(data->sg, &data->hash, sizeof(data->hash)); in crypto_gcm_setkey()
123 skcipher_request_set_tfm(&data->req, ctr); in crypto_gcm_setkey()
124 skcipher_request_set_callback(&data->req, CRYPTO_TFM_REQ_MAY_SLEEP | in crypto_gcm_setkey()
127 &data->wait); in crypto_gcm_setkey()
128 skcipher_request_set_crypt(&data->req, data->sg, data->sg, in crypto_gcm_setkey()
129 sizeof(data->hash), data->iv); in crypto_gcm_setkey()
[all …]
Dsha1_generic.c42 int crypto_sha1_update(struct shash_desc *desc, const u8 *data, in crypto_sha1_update() argument
45 return sha1_base_do_update(desc, data, len, sha1_generic_block_fn); in crypto_sha1_update()
55 int crypto_sha1_finup(struct shash_desc *desc, const u8 *data, in crypto_sha1_finup() argument
58 sha1_base_do_update(desc, data, len, sha1_generic_block_fn); in crypto_sha1_finup()
Dahash.c29 void *data; member
48 walk->data = kmap_atomic(walk->pg); in hash_walk_next()
49 walk->data += offset; in hash_walk_next()
83 walk->data -= walk->offset; in crypto_hash_walk_done()
93 walk->data += walk->offset; in crypto_hash_walk_done()
98 kunmap_atomic(walk->data); in crypto_hash_walk_done()
239 priv->data = req->base.data; in ahash_save_req()
250 req->base.data = req; in ahash_save_req()
268 priv->complete, priv->data); in ahash_restore_req()
280 oreq.data = priv->data; in ahash_notify_einprogress()
[all …]
Dsha256_generic.c48 int crypto_sha256_update(struct shash_desc *desc, const u8 *data, in crypto_sha256_update() argument
51 sha256_update(shash_desc_ctx(desc), data, len); in crypto_sha256_update()
65 int crypto_sha256_finup(struct shash_desc *desc, const u8 *data, in crypto_sha256_finup() argument
68 sha256_update(shash_desc_ctx(desc), data, len); in crypto_sha256_finup()
Dxxhash_generic.c41 static int xxhash64_update(struct shash_desc *desc, const u8 *data, in xxhash64_update() argument
46 xxh64_update(&dctx->xxhstate, data, length); in xxhash64_update()
60 static int xxhash64_digest(struct shash_desc *desc, const u8 *data, in xxhash64_digest() argument
65 put_unaligned_le64(xxh64(data, length, tctx->seed), out); in xxhash64_digest()
/crypto/async_tx/
Draid6test.c23 static struct page *data[NDISKS+3]; variable
40 prandom_bytes(page_address(data[i]), PAGE_SIZE); in makedata()
41 dataptrs[i] = data[i]; in makedata()
139 erra = memcmp(page_address(data[i]), page_address(recovi), PAGE_SIZE); in test_disks()
140 errb = memcmp(page_address(data[j]), page_address(recovj), PAGE_SIZE); in test_disks()
146 dataptrs[i] = data[i]; in test_disks()
147 dataptrs[j] = data[j]; in test_disks()
160 recovi = data[disks]; in test()
161 recovj = data[disks+1]; in test()
162 spare = data[disks+2]; in test()
[all …]
/crypto/asymmetric_keys/
Dpkcs8_parser.c22 unsigned long data; /* Start of data */ member
45 (unsigned long)value - ctx->data, buffer); in pkcs8_note_OID()
97 static struct public_key *pkcs8_parse(const void *data, size_t datalen) in pkcs8_parse() argument
110 ctx.data = (unsigned long)data; in pkcs8_parse()
113 ret = asn1_ber_decoder(&pkcs8_decoder, &ctx, data, datalen); in pkcs8_parse()
140 pub = pkcs8_parse(prep->data, prep->datalen); in pkcs8_key_preparse()
149 prep->payload.data[asym_subtype] = &public_key_subtype; in pkcs8_key_preparse()
150 prep->payload.data[asym_key_ids] = NULL; in pkcs8_key_preparse()
151 prep->payload.data[asym_crypto] = pub; in pkcs8_key_preparse()
152 prep->payload.data[asym_auth] = NULL; in pkcs8_key_preparse()
Dasymmetric_type.c60 lookup = id_0->data; in find_asymmetric_key()
63 lookup = id_1->data; in find_asymmetric_key()
147 memcpy(kid->data, val_1, len_1); in asymmetric_key_generate_id()
148 memcpy(kid->data + len_1, val_2, len_2); in asymmetric_key_generate_id()
165 return memcmp(kid1->data, kid2->data, kid1->len) == 0; in asymmetric_key_id_same()
182 return memcmp(kid1->data + (kid1->len - kid2->len), in asymmetric_key_id_partial()
183 kid2->data, kid2->len) == 0; in asymmetric_key_id_partial()
215 return hex2bin(match_id->data, id, hexlen); in __asymmetric_key_hex_to_key_id()
350 p = kid->data; in asymmetric_key_describe()
419 struct asymmetric_key_subtype *subtype = prep->payload.data[asym_subtype]; in asymmetric_key_free_preparse()
[all …]
Dsignature.c55 !key->payload.data[0]) in query_asymmetric_key()
81 const void *data, void *enc) in encrypt_blob() argument
84 return asymmetric_key_eds_op(params, data, enc); in encrypt_blob()
102 const void *enc, void *data) in decrypt_blob() argument
105 return asymmetric_key_eds_op(params, enc, data); in decrypt_blob()
123 const void *data, void *enc) in create_signature() argument
126 return asymmetric_key_eds_op(params, data, enc); in create_signature()
149 !key->payload.data[0]) in verify_signature()
Dtpm_parser.c36 static struct tpm_key *tpm_parse(const void *data, size_t datalen) in tpm_parse() argument
44 ret = asn1_ber_decoder(&tpm_decoder, &ctx, data, datalen); in tpm_parse()
67 tk = tpm_parse(prep->data, prep->datalen); in tpm_key_preparse()
74 prep->payload.data[asym_subtype] = &asym_tpm_subtype; in tpm_key_preparse()
75 prep->payload.data[asym_key_ids] = NULL; in tpm_key_preparse()
76 prep->payload.data[asym_crypto] = tk; in tpm_key_preparse()
77 prep->payload.data[asym_auth] = NULL; in tpm_key_preparse()
Dpkcs7_key_type.c28 static int pkcs7_view_content(void *ctx, const void *data, size_t len, in pkcs7_view_content() argument
36 saved_prep_data = prep->data; in pkcs7_view_content()
38 prep->data = data; in pkcs7_view_content()
43 prep->data = saved_prep_data; in pkcs7_view_content()
61 prep->data, prep->datalen, in pkcs7_preparse()
Dx509_cert_parser.c21 unsigned long data; /* Start of data */ member
63 struct x509_certificate *x509_cert_parse(const void *data, size_t datalen) in x509_cert_parse() argument
85 ctx->data = (unsigned long)data; in x509_cert_parse()
88 ret = asn1_ber_decoder(&x509_decoder, ctx, data, datalen); in x509_cert_parse()
166 (unsigned long)value - ctx->data, buffer); in x509_note_OID()
182 hdrlen, tag, (unsigned long)value - ctx->data, vlen); in x509_note_tbs_certificate()
344 ctx->cn_offset = (unsigned long)value - ctx->data; in x509_extract_name_segment()
348 ctx->o_offset = (unsigned long)value - ctx->data; in x509_extract_name_segment()
352 ctx->email_offset = (unsigned long)value - ctx->data; in x509_extract_name_segment()
368 const void *name, *data = (const void *)ctx->data; in x509_fabricate_name() local
[all …]
Dpkcs7_verify.c62 ret = crypto_shash_digest(desc, pkcs7->data, pkcs7->data_len, in pkcs7_digest()
186 sinfo->sig->auth_ids[0]->len, sinfo->sig->auth_ids[0]->data); in pkcs7_find_key()
230 sig->auth_ids[0]->len, sig->auth_ids[0]->data); in pkcs7_verify_sig_chain()
233 sig->auth_ids[1]->len, sig->auth_ids[1]->data); in pkcs7_verify_sig_chain()
253 pr_debug("- want %*phN\n", auth->len, auth->data); in pkcs7_verify_sig_chain()
256 p->index, p->id->len, p->id->data); in pkcs7_verify_sig_chain()
262 pr_debug("- want %*phN\n", auth->len, auth->data); in pkcs7_verify_sig_chain()
267 p->index, p->skid->len, p->skid->data); in pkcs7_verify_sig_chain()
481 const void *data, size_t datalen) in pkcs7_supply_detached_data() argument
483 if (pkcs7->data) { in pkcs7_supply_detached_data()
[all …]
Dasym_tpm.c75 ret = trusted_tpm_send(tb->data, MAX_BUF_SIZE); in tpm_loadkey2()
81 ret = TSS_checkhmac1(tb->data, ordinal, nonceodd, keyauth, in tpm_loadkey2()
88 *newhandle = LOAD32(tb->data, TPM_DATA_OFFSET); in tpm_loadkey2()
101 return trusted_tpm_send(tb->data, MAX_BUF_SIZE); in tpm_flushspecific()
157 ret = trusted_tpm_send(tb->data, MAX_BUF_SIZE); in tpm_unbind()
163 datalen = LOAD32(tb->data, TPM_DATA_OFFSET); in tpm_unbind()
165 ret = TSS_checkhmac1(tb->data, ordinal, nonceodd, in tpm_unbind()
175 memcpy(out, tb->data + TPM_DATA_OFFSET + sizeof(uint32_t), in tpm_unbind()
240 ret = trusted_tpm_send(tb->data, MAX_BUF_SIZE); in tpm_sign()
246 datalen = LOAD32(tb->data, TPM_DATA_OFFSET); in tpm_sign()
[all …]

123