Home
last modified time | relevance | path

Searched refs:params (Results 1 – 14 of 14) sorted by relevance

/crypto/
Ddh_helper.c40 int crypto_dh_encode_key(char *buf, unsigned int len, const struct dh *params) in crypto_dh_encode_key() argument
53 ptr = dh_pack_data(ptr, end, &params->key_size, in crypto_dh_encode_key()
54 sizeof(params->key_size)); in crypto_dh_encode_key()
55 ptr = dh_pack_data(ptr, end, &params->p_size, sizeof(params->p_size)); in crypto_dh_encode_key()
56 ptr = dh_pack_data(ptr, end, &params->q_size, sizeof(params->q_size)); in crypto_dh_encode_key()
57 ptr = dh_pack_data(ptr, end, &params->g_size, sizeof(params->g_size)); in crypto_dh_encode_key()
58 ptr = dh_pack_data(ptr, end, params->key, params->key_size); in crypto_dh_encode_key()
59 ptr = dh_pack_data(ptr, end, params->p, params->p_size); in crypto_dh_encode_key()
60 ptr = dh_pack_data(ptr, end, params->q, params->q_size); in crypto_dh_encode_key()
61 ptr = dh_pack_data(ptr, end, params->g, params->g_size); in crypto_dh_encode_key()
[all …]
Decdh_helper.c27 unsigned int crypto_ecdh_key_len(const struct ecdh *params) in crypto_ecdh_key_len() argument
29 return ECDH_KPP_SECRET_MIN_SIZE + params->key_size; in crypto_ecdh_key_len()
34 const struct ecdh *params) in crypto_ecdh_encode_key() argument
45 if (len != crypto_ecdh_key_len(params)) in crypto_ecdh_encode_key()
49 ptr = ecdh_pack_data(ptr, &params->key_size, sizeof(params->key_size)); in crypto_ecdh_encode_key()
50 ecdh_pack_data(ptr, params->key, params->key_size); in crypto_ecdh_encode_key()
57 struct ecdh *params) in crypto_ecdh_decode_key() argument
72 ptr = ecdh_unpack_data(&params->key_size, ptr, sizeof(params->key_size)); in crypto_ecdh_decode_key()
73 if (secret.len != crypto_ecdh_key_len(params)) in crypto_ecdh_decode_key()
79 params->key = (void *)ptr; in crypto_ecdh_decode_key()
Ddh.c53 static int dh_set_params(struct dh_ctx *ctx, struct dh *params) in dh_set_params() argument
55 if (dh_check_params_length(params->p_size << 3)) in dh_set_params()
58 ctx->p = mpi_read_raw_data(params->p, params->p_size); in dh_set_params()
62 if (params->q && params->q_size) { in dh_set_params()
63 ctx->q = mpi_read_raw_data(params->q, params->q_size); in dh_set_params()
68 ctx->g = mpi_read_raw_data(params->g, params->g_size); in dh_set_params()
79 struct dh params; in dh_set_secret() local
84 if (crypto_dh_decode_key(buf, len, &params) < 0) in dh_set_secret()
87 if (dh_set_params(ctx, &params) < 0) in dh_set_secret()
90 ctx->xa = mpi_read_raw_data(params.key, params.key_size); in dh_set_secret()
Decdh.c30 struct ecdh params; in ecdh_set_secret() local
32 if (crypto_ecdh_decode_key(buf, len, &params) < 0 || in ecdh_set_secret()
33 params.key_size > sizeof(u64) * ctx->ndigits) in ecdh_set_secret()
36 if (!params.key || !params.key_size) in ecdh_set_secret()
40 memcpy(ctx->private_key, params.key, params.key_size); in ecdh_set_secret()
43 ctx->private_key, params.key_size) < 0) { in ecdh_set_secret()
44 memzero_explicit(ctx->private_key, params.key_size); in ecdh_set_secret()
Dzstd.c35 const ZSTD_parameters params = zstd_params(); in zstd_comp_init() local
36 const size_t wksp_size = ZSTD_CCtxWorkspaceBound(params.cParams); in zstd_comp_init()
155 const ZSTD_parameters params = zstd_params(); in __zstd_compress() local
157 out_len = ZSTD_compressCCtx(zctx->cctx, dst, *dlen, src, slen, params); in __zstd_compress()
Decrdsa.c197 u8 *params; in ecrdsa_set_pub_key() local
205 params = ecrdsa_unpack_u32(&paramlen, in ecrdsa_set_pub_key()
221 err = asn1_ber_decoder(&ecrdsa_params_decoder, ctx, params, paramlen); in ecrdsa_set_pub_key()
Dtestmgr.h151 const unsigned char *params; member
580 .params =
604 .params =
628 .params =
652 .params =
677 .params =
708 .params =
734 .params =
760 .params =
786 .params =
[all …]
Dtestmgr.c3948 memcpy(ptr, vecs->params, vecs->param_len); in test_akcipher_one()
/crypto/asymmetric_keys/
Dsignature.c42 int query_asymmetric_key(const struct kernel_pkey_params *params, in query_asymmetric_key() argument
46 struct key *key = params->key; in query_asymmetric_key()
60 ret = subtype->query(params, info); in query_asymmetric_key()
80 int encrypt_blob(struct kernel_pkey_params *params, in encrypt_blob() argument
83 params->op = kernel_pkey_encrypt; in encrypt_blob()
84 return asymmetric_key_eds_op(params, data, enc); in encrypt_blob()
101 int decrypt_blob(struct kernel_pkey_params *params, in decrypt_blob() argument
104 params->op = kernel_pkey_decrypt; in decrypt_blob()
105 return asymmetric_key_eds_op(params, enc, data); in decrypt_blob()
122 int create_signature(struct kernel_pkey_params *params, in create_signature() argument
[all …]
Dasym_tpm.c392 static int tpm_key_query(const struct kernel_pkey_params *params, in tpm_key_query() argument
395 struct tpm_key *tk = params->key->payload.data[asym_crypto]; in tpm_key_query()
404 ret = determine_akcipher(params->encoding, params->hash_algo, alg_name); in tpm_key_query()
444 struct kernel_pkey_params *params, in tpm_key_encrypt() argument
458 ret = determine_akcipher(params->encoding, params->hash_algo, alg_name); in tpm_key_encrypt()
478 sg_init_one(&in_sg, in, params->in_len); in tpm_key_encrypt()
479 sg_init_one(&out_sg, out, params->out_len); in tpm_key_encrypt()
480 akcipher_request_set_crypt(req, &in_sg, &out_sg, params->in_len, in tpm_key_encrypt()
481 params->out_len); in tpm_key_encrypt()
504 struct kernel_pkey_params *params, in tpm_key_decrypt() argument
[all …]
Dpublic_key.c47 kfree(key->params); in public_key_free()
151 static int software_key_query(const struct kernel_pkey_params *params, in software_key_query() argument
155 struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_query()
160 ret = software_key_determine_akcipher(pkey, params->encoding, in software_key_query()
161 params->hash_algo, alg_name); in software_key_query()
178 memcpy(ptr, pkey->params, pkey->paramlen); in software_key_query()
231 static int software_key_eds_op(struct kernel_pkey_params *params, in software_key_eds_op() argument
234 const struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_eds_op()
245 ret = software_key_determine_akcipher(pkey, params->encoding, in software_key_eds_op()
246 params->hash_algo, alg_name); in software_key_eds_op()
[all …]
Dasymmetric_type.c540 int asymmetric_key_eds_op(struct kernel_pkey_params *params, in asymmetric_key_eds_op() argument
544 struct key *key = params->key; in asymmetric_key_eds_op()
558 ret = subtype->eds_op(params, in, out); in asymmetric_key_eds_op()
564 static int asymmetric_key_verify_signature(struct kernel_pkey_params *params, in asymmetric_key_verify_signature() argument
568 .s_size = params->in2_len, in asymmetric_key_verify_signature()
569 .digest_size = params->in_len, in asymmetric_key_verify_signature()
570 .encoding = params->encoding, in asymmetric_key_verify_signature()
571 .hash_algo = params->hash_algo, in asymmetric_key_verify_signature()
576 return verify_signature(params->key, &sig); in asymmetric_key_verify_signature()
Dasymmetric_keys.h16 extern int asymmetric_key_eds_op(struct kernel_pkey_params *params,
Dx509_cert_parser.c25 const void *params; /* Key parameters */ member
111 cert->pub->params = kmemdup(ctx->params, ctx->params_size, GFP_KERNEL); in x509_cert_parse()
112 if (!cert->pub->params) in x509_cert_parse()
475 ctx->params = value - hdrlen; in x509_note_params()
500 if (parse_OID(ctx->params, ctx->params_size, &oid) != 0) in x509_extract_key_data()