Home
last modified time | relevance | path

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

123

/crypto/
Dmichael_mic.c62 static int michael_update(struct shash_desc *desc, const u8 *data, in michael_update() argument
72 memcpy(&mctx->pending[mctx->pending_len], data, flen); in michael_update()
74 data += flen; in michael_update()
86 src = (const __le32 *)data; in michael_update()
106 u8 *data = mctx->pending; in michael_final() local
115 mctx->l ^= data[0] | 0x5a00; in michael_final()
118 mctx->l ^= data[0] | (data[1] << 8) | 0x5a0000; in michael_final()
121 mctx->l ^= data[0] | (data[1] << 8) | (data[2] << 16) | in michael_final()
141 const __le32 *data = (const __le32 *)key; in michael_setkey() local
148 mctx->l = le32_to_cpu(data[0]); in michael_setkey()
[all …]
Dblowfish_common.c355 u32 data[2], temp; in blowfish_setkey() local
377 data[0] = 0x00000000; in blowfish_setkey()
378 data[1] = 0x00000000; in blowfish_setkey()
381 encrypt_block((struct bf_ctx *)ctx, data, data); in blowfish_setkey()
383 P[i] = data[0]; in blowfish_setkey()
384 P[i + 1] = data[1]; in blowfish_setkey()
389 encrypt_block((struct bf_ctx *)ctx, data, data); in blowfish_setkey()
391 S[count] = data[0]; in blowfish_setkey()
392 S[count + 1] = data[1]; in blowfish_setkey()
Dshash.c75 static int shash_update_unaligned(struct shash_desc *desc, const u8 *data, in shash_update_unaligned() argument
82 ((unsigned long)data & alignmask); in shash_update_unaligned()
91 memcpy(buf, data, unaligned_len); in shash_update_unaligned()
96 shash->update(desc, data + unaligned_len, len - unaligned_len); in shash_update_unaligned()
99 int crypto_shash_update(struct shash_desc *desc, const u8 *data, in crypto_shash_update() argument
106 if ((unsigned long)data & alignmask) in crypto_shash_update()
107 return shash_update_unaligned(desc, data, len); in crypto_shash_update()
109 return shash->update(desc, data, len); in crypto_shash_update()
148 static int shash_finup_unaligned(struct shash_desc *desc, const u8 *data, in shash_finup_unaligned() argument
151 return crypto_shash_update(desc, data, len) ?: in shash_finup_unaligned()
[all …]
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 *crcp, const u8 *data, unsigned int len, in __chksum_finup() argument
71 *(__u16 *)out = crc_t10dif_generic(*crcp, data, len); in __chksum_finup()
75 static int chksum_finup(struct shash_desc *desc, const u8 *data, in chksum_finup() argument
80 return __chksum_finup(&ctx->crc, data, len, out); in chksum_finup()
83 static int chksum_digest(struct shash_desc *desc, const u8 *data, in chksum_digest() argument
88 return __chksum_finup(&ctx->crc, data, length, out); in chksum_digest()
Dalgboss.c33 struct crypto_attr_type data; member
40 struct crypto_attr_alg data; member
44 struct crypto_attr_u32 data; member
62 static int cryptomgr_probe(void *data) in cryptomgr_probe() argument
64 struct cryptomgr_param *param = data; in cryptomgr_probe()
154 memcpy(param->attrs[i].alg.data.name, name, len); in cryptomgr_schedule_probe()
159 param->attrs[i].nu32.data.num = in cryptomgr_schedule_probe()
183 param->type.data.type = larval->alg.cra_flags & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe()
184 param->type.data.mask = larval->mask & ~CRYPTO_ALG_TESTED; in cryptomgr_schedule_probe()
211 static int cryptomgr_test(void *data) in cryptomgr_test() argument
[all …]
Dcrc32.c86 static int crc32_update(struct shash_desc *desc, const u8 *data, in crc32_update() argument
91 *crcp = __crc32_le(*crcp, data, len); in crc32_update()
96 static int __crc32_finup(u32 *crcp, const u8 *data, unsigned int len, in __crc32_finup() argument
99 *(__le32 *)out = cpu_to_le32(__crc32_le(*crcp, data, len)); in __crc32_finup()
103 static int crc32_finup(struct shash_desc *desc, const u8 *data, in crc32_finup() argument
106 return __crc32_finup(shash_desc_ctx(desc), data, len, out); in crc32_finup()
117 static int crc32_digest(struct shash_desc *desc, const u8 *data, in crc32_digest() argument
120 return __crc32_finup(crypto_shash_ctx(desc->tfm), data, len, in crc32_digest()
Dcrc32c_generic.c89 static int chksum_update(struct shash_desc *desc, const u8 *data, in chksum_update() argument
94 ctx->crc = __crc32c_le(ctx->crc, data, length); in chksum_update()
106 static int __chksum_finup(u32 *crcp, const u8 *data, unsigned int len, u8 *out) in __chksum_finup() argument
108 *(__le32 *)out = ~cpu_to_le32(__crc32c_le(*crcp, data, len)); in __chksum_finup()
112 static int chksum_finup(struct shash_desc *desc, const u8 *data, in chksum_finup() argument
117 return __chksum_finup(&ctx->crc, data, len, out); in chksum_finup()
120 static int chksum_digest(struct shash_desc *desc, const u8 *data, in chksum_digest() argument
125 return __chksum_finup(&mctx->key, data, length, out); in chksum_digest()
Dmd5.c63 static int md5_update(struct shash_desc *desc, const u8 *data, unsigned int len) in md5_update() argument
72 data, len); in md5_update()
77 data, avail); in md5_update()
80 data += avail; in md5_update()
84 memcpy(mctx->block, data, sizeof(mctx->block)); in md5_update()
86 data += sizeof(mctx->block); in md5_update()
90 memcpy(mctx->block, data, len); in md5_update()
Dseqiv.c52 struct skcipher_givcrypt_request *req = base->data; in seqiv_complete()
78 struct aead_givcrypt_request *req = base->data; in seqiv_aead_complete()
104 void *data; in seqiv_givencrypt() local
112 data = req->creq.base.data; in seqiv_givencrypt()
126 data = req; in seqiv_givencrypt()
130 data); in seqiv_givencrypt()
150 void *data; in seqiv_aead_givencrypt() local
158 data = areq->base.data; in seqiv_aead_givencrypt()
172 data = req; in seqiv_aead_givencrypt()
175 aead_request_set_callback(subreq, areq->base.flags, compl, data); in seqiv_aead_givencrypt()
Dahash.c32 void *data; member
52 walk->data = kmap(walk->pg); in hash_walk_next()
54 walk->data = kmap_atomic(walk->pg); in hash_walk_next()
55 walk->data += offset; in hash_walk_next()
89 walk->data -= walk->offset; in crypto_hash_walk_done()
93 walk->data += walk->offset; in crypto_hash_walk_done()
105 kunmap_atomic(walk->data); in crypto_hash_walk_done()
272 priv->data = req->base.data; in ahash_save_req()
283 req->base.data = req; in ahash_save_req()
301 priv->complete, priv->data); in ahash_restore_req()
[all …]
Dgcm.c95 struct crypto_gcm_setkey_result *result = req->data; in crypto_gcm_setkey_done()
118 } *data; in crypto_gcm_setkey() local
132 data = kzalloc(sizeof(*data) + crypto_ablkcipher_reqsize(ctr), in crypto_gcm_setkey()
134 if (!data) in crypto_gcm_setkey()
137 init_completion(&data->result.completion); in crypto_gcm_setkey()
138 sg_init_one(data->sg, &data->hash, sizeof(data->hash)); in crypto_gcm_setkey()
139 ablkcipher_request_set_tfm(&data->req, ctr); in crypto_gcm_setkey()
140 ablkcipher_request_set_callback(&data->req, CRYPTO_TFM_REQ_MAY_SLEEP | in crypto_gcm_setkey()
143 &data->result); in crypto_gcm_setkey()
144 ablkcipher_request_set_crypt(&data->req, data->sg, data->sg, in crypto_gcm_setkey()
[all …]
Ddrbg.c338 struct drbg_string data; in drbg_ctr_bcc() local
341 drbg_string_fill(&data, out, drbg_blocklen(drbg)); in drbg_ctr_bcc()
355 ret = drbg_kcapi_sym(drbg, key, out, &data); in drbg_ctr_bcc()
367 ret = drbg_kcapi_sym(drbg, key, out, &data); in drbg_ctr_bcc()
619 struct drbg_string data; in drbg_ctr_generate() local
633 drbg_string_fill(&data, drbg->V, drbg_blocklen(drbg)); in drbg_ctr_generate()
637 ret = drbg_kcapi_sym(drbg, drbg->C, drbg->scratchpad, &data); in drbg_ctr_generate()
745 struct drbg_string data; in drbg_hmac_generate() local
755 drbg_string_fill(&data, drbg->V, drbg_statelen(drbg)); in drbg_hmac_generate()
756 list_add_tail(&data.list, &datalist); in drbg_hmac_generate()
[all …]
Dsha1_generic.c39 int crypto_sha1_update(struct shash_desc *desc, const u8 *data, in crypto_sha1_update() argument
49 src = data; in crypto_sha1_update()
56 memcpy(sctx->buffer + partial, data, in crypto_sha1_update()
64 src = data + done; in crypto_sha1_update()
Deseqiv.c54 struct skcipher_givcrypt_request *req = base->data; in eseqiv_complete()
72 void *data; in eseqiv_givencrypt() local
90 data = req->creq.base.data; in eseqiv_givencrypt()
105 data = req; in eseqiv_givencrypt()
109 data); in eseqiv_givencrypt()
Dmd4.c169 static int md4_update(struct shash_desc *desc, const u8 *data, unsigned int len) in md4_update() argument
178 data, len); in md4_update()
183 data, avail); in md4_update()
186 data += avail; in md4_update()
190 memcpy(mctx->block, data, sizeof(mctx->block)); in md4_update()
192 data += sizeof(mctx->block); in md4_update()
196 memcpy(mctx->block, data, len); in md4_update()
Dccm.c60 __be32 data; in set_msg_len() local
70 data = cpu_to_be32(msglen); in set_msg_len()
71 memcpy(block - csize, (u8 *)&data + 4 - csize, csize); in set_msg_len()
164 static void compute_mac(struct crypto_cipher *tfm, u8 *data, int n, in compute_mac() argument
177 memcpy(idata + pctx->ilen, data, getlen); in compute_mac()
181 data += getlen; in compute_mac()
187 crypto_xor(odata, data, bs); in compute_mac()
191 data += bs; in compute_mac()
198 memcpy(idata + pctx->ilen, data, datalen); in compute_mac()
283 struct aead_request *req = areq->data; in crypto_ccm_encrypt_done()
[all …]
Dauthencesn.c99 struct aead_request *req = areq->data; in authenc_esn_geniv_ahash_update_done()
139 struct aead_request *req = areq->data; in authenc_esn_geniv_ahash_update_done2()
170 struct aead_request *req = areq->data; in authenc_esn_geniv_ahash_done()
194 struct aead_request *req = areq->data; in authenc_esn_verify_ahash_update_done()
239 req->base.complete, req->base.data); in authenc_esn_verify_ahash_update_done()
255 struct aead_request *req = areq->data; in authenc_esn_verify_ahash_update_done2()
288 req->base.complete, req->base.data); in authenc_esn_verify_ahash_update_done2()
305 struct aead_request *req = areq->data; in authenc_esn_verify_ahash_done()
328 req->base.complete, req->base.data); in authenc_esn_verify_ahash_done()
455 struct aead_request *areq = req->data; in crypto_authenc_esn_encrypt_done()
[all …]
/crypto/async_tx/
Draid6test.c35 static struct page *data[NDISKS+3]; variable
52 prandom_bytes(page_address(data[i]), PAGE_SIZE); in makedata()
53 dataptrs[i] = data[i]; in makedata()
142 erra = memcmp(page_address(data[i]), page_address(recovi), PAGE_SIZE); in test_disks()
143 errb = memcmp(page_address(data[j]), page_address(recovj), PAGE_SIZE); in test_disks()
149 dataptrs[i] = data[i]; in test_disks()
150 dataptrs[j] = data[j]; in test_disks()
163 recovi = data[disks]; in test()
164 recovj = data[disks+1]; in test()
165 spare = data[disks+2]; in test()
[all …]
/crypto/asymmetric_keys/
Dx509_cert_parser.c25 unsigned long data; /* Start of data */ member
62 struct x509_certificate *x509_cert_parse(const void *data, size_t datalen) in x509_cert_parse() argument
81 ctx->data = (unsigned long)data; in x509_cert_parse()
84 ret = asn1_ber_decoder(&x509_decoder, ctx, data, datalen); in x509_cert_parse()
132 (unsigned long)value - ctx->data, buffer); in x509_note_OID()
148 hdrlen, tag, (unsigned long)value - ctx->data, vlen); in x509_note_tbs_certificate()
254 ctx->cn_offset = (unsigned long)value - ctx->data; in x509_extract_name_segment()
258 ctx->o_offset = (unsigned long)value - ctx->data; in x509_extract_name_segment()
262 ctx->email_offset = (unsigned long)value - ctx->data; in x509_extract_name_segment()
278 const void *name, *data = (const void *)ctx->data; in x509_fabricate_name() local
[all …]
Dpkcs7_key_type.c27 const void *data, *saved_prep_data; in pkcs7_preparse() local
34 saved_prep_data = prep->data; in pkcs7_preparse()
52 ret = pkcs7_get_content_data(pkcs7, &data, &datalen, false); in pkcs7_preparse()
56 prep->data = data; in pkcs7_preparse()
59 prep->data = saved_prep_data; in pkcs7_preparse()
Dpkcs7_parser.c28 unsigned long data; /* Start of data */ member
86 struct pkcs7_message *pkcs7_parse_message(const void *data, size_t datalen) in pkcs7_parse_message() argument
102 ctx->data = (unsigned long)data; in pkcs7_parse_message()
107 ret = asn1_ber_decoder(&pkcs7_decoder, ctx, data, datalen); in pkcs7_parse_message()
149 if (!pkcs7->data) in pkcs7_get_content_data()
153 *_data = pkcs7->data - wrapper; in pkcs7_get_content_data()
174 (unsigned long)value - ctx->data, buffer); in pkcs7_note_OID()
240 tag, (unsigned long)ctx - ctx->data); in pkcs7_extract_cert()
261 pr_debug("- fingerprint %*phN\n", x509->id->len, x509->id->data); in pkcs7_extract_cert()
298 ctx->msg->data = value; in pkcs7_note_data()
Dasymmetric_type.c47 memcpy(kid->data, val_1, len_1); in asymmetric_key_generate_id()
48 memcpy(kid->data + len_1, val_2, len_2); in asymmetric_key_generate_id()
64 return memcmp(kid1->data, kid2->data, kid1->len) == 0; in asymmetric_key_id_same()
80 return memcmp(kid1->data + (kid1->len - kid2->len), in asymmetric_key_id_partial()
81 kid2->data, kid2->len) == 0; in asymmetric_key_id_partial()
113 return hex2bin(match_id->data, id, hexlen); in __asymmetric_key_hex_to_key_id()
248 p = kid->data; in asymmetric_key_describe()
330 subtype->destroy(key->payload.data); in asymmetric_key_destroy()
Dpkcs7_verify.c64 ret = crypto_shash_finup(desc, pkcs7->data, pkcs7->data_len, digest); in pkcs7_digest()
162 sinfo->signing_cert_id->len, sinfo->signing_cert_id->data); in pkcs7_find_key()
192 x509->authority->len, x509->authority->data); in pkcs7_verify_sig_chain()
219 x509->authority->len, x509->authority->data); in pkcs7_verify_sig_chain()
224 p->index, p->skid->len, p->skid->data); in pkcs7_verify_sig_chain()
342 n, x509->authority->len, x509->authority->data); in pkcs7_verify()
Dx509_public_key.c33 unsigned char data[10]; member
46 if (hexlen == 0 || hexlen > sizeof(cakey.data)) { in ca_keys_setup()
95 p = bin2hex(p, kid->data, kid->len); in x509_request_asymmetric_key()
238 ret = x509_check_signature(key->payload.data, cert); in x509_validate_trust()
256 cert = x509_cert_parse(prep->data, prep->datalen); in x509_key_preparse()
DKconfig5 This option provides support for a key type that holds the data for
37 data and provides the ability to instantiate a crypto key from a
47 signature data and provides the ability to verify the signature.

123