/crypto/ |
D | dh_helper.c | 40 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, ¶ms->key_size, in crypto_dh_encode_key() 54 sizeof(params->key_size)); in crypto_dh_encode_key() 55 ptr = dh_pack_data(ptr, end, ¶ms->p_size, sizeof(params->p_size)); in crypto_dh_encode_key() 56 ptr = dh_pack_data(ptr, end, ¶ms->q_size, sizeof(params->q_size)); in crypto_dh_encode_key() 57 ptr = dh_pack_data(ptr, end, ¶ms->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 …]
|
D | ecdh_helper.c | 27 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, ¶ms->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(¶ms->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()
|
D | dh.c | 53 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, ¶ms) < 0) in dh_set_secret() 87 if (dh_set_params(ctx, ¶ms) < 0) in dh_set_secret() 90 ctx->xa = mpi_read_raw_data(params.key, params.key_size); in dh_set_secret()
|
D | ecdh.c | 30 struct ecdh params; in ecdh_set_secret() local 32 if (crypto_ecdh_decode_key(buf, len, ¶ms) < 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()
|
D | zstd.c | 35 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()
|
D | ecrdsa.c | 197 u8 *params; in ecrdsa_set_pub_key() local 205 params = ecrdsa_unpack_u32(¶mlen, in ecrdsa_set_pub_key() 221 err = asn1_ber_decoder(&ecrdsa_params_decoder, ctx, params, paramlen); in ecrdsa_set_pub_key()
|
D | testmgr.h | 151 const unsigned char *params; member 580 .params = 604 .params = 628 .params = 652 .params = 677 .params = 708 .params = 734 .params = 760 .params = 786 .params = [all …]
|
D | testmgr.c | 3948 memcpy(ptr, vecs->params, vecs->param_len); in test_akcipher_one()
|
/crypto/asymmetric_keys/ |
D | signature.c | 42 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 …]
|
D | asym_tpm.c | 392 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 …]
|
D | public_key.c | 47 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 …]
|
D | asymmetric_type.c | 540 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()
|
D | asymmetric_keys.h | 16 extern int asymmetric_key_eds_op(struct kernel_pkey_params *params,
|
D | x509_cert_parser.c | 25 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()
|