/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->curve_id, sizeof(params->curve_id)); in crypto_ecdh_encode_key() 50 ptr = ecdh_pack_data(ptr, ¶ms->key_size, sizeof(params->key_size)); in crypto_ecdh_encode_key() 51 ecdh_pack_data(ptr, params->key, params->key_size); in crypto_ecdh_encode_key() 58 struct ecdh *params) in crypto_ecdh_decode_key() argument 73 ptr = ecdh_unpack_data(¶ms->curve_id, ptr, sizeof(params->curve_id)); in crypto_ecdh_decode_key() 74 ptr = ecdh_unpack_data(¶ms->key_size, ptr, sizeof(params->key_size)); in crypto_ecdh_decode_key() [all …]
|
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 | 39 struct ecdh params; in ecdh_set_secret() local 42 if (crypto_ecdh_decode_key(buf, len, ¶ms) < 0 || in ecdh_set_secret() 43 params.key_size > sizeof(ctx->private_key)) in ecdh_set_secret() 46 ndigits = ecdh_supported_curve(params.curve_id); in ecdh_set_secret() 50 ctx->curve_id = params.curve_id; in ecdh_set_secret() 53 if (!params.key || !params.key_size) in ecdh_set_secret() 57 memcpy(ctx->private_key, params.key, params.key_size); in ecdh_set_secret() 60 ctx->private_key, params.key_size) < 0) { in ecdh_set_secret() 61 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 581 .params = /* OID_gostCPSignA */ 607 .params = /* OID_gostCPSignB */ 633 .params = /* OID_gostCPSignC */ 663 .params = /* OID_gostTC26Sign512A */ 698 .params = /* OID_gostTC26Sign512B */
|
D | testmgr.c | 3966 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 | public_key.c | 46 kfree(key->params); in public_key_free() 105 static int software_key_query(const struct kernel_pkey_params *params, in software_key_query() argument 109 struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_query() 114 ret = software_key_determine_akcipher(params->encoding, in software_key_query() 115 params->hash_algo, in software_key_query() 133 memcpy(ptr, pkey->params, pkey->paramlen); in software_key_query() 166 static int software_key_eds_op(struct kernel_pkey_params *params, in software_key_eds_op() argument 169 const struct public_key *pkey = params->key->payload.data[asym_crypto]; in software_key_eds_op() 180 ret = software_key_determine_akcipher(params->encoding, in software_key_eds_op() 181 params->hash_algo, in software_key_eds_op() [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 | asymmetric_type.c | 538 int asymmetric_key_eds_op(struct kernel_pkey_params *params, in asymmetric_key_eds_op() argument 542 struct key *key = params->key; in asymmetric_key_eds_op() 556 ret = subtype->eds_op(params, in, out); in asymmetric_key_eds_op() 562 static int asymmetric_key_verify_signature(struct kernel_pkey_params *params, in asymmetric_key_verify_signature() argument 566 .s_size = params->in2_len, in asymmetric_key_verify_signature() 567 .digest_size = params->in_len, in asymmetric_key_verify_signature() 568 .encoding = params->encoding, in asymmetric_key_verify_signature() 569 .hash_algo = params->hash_algo, in asymmetric_key_verify_signature() 574 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() 449 ctx->params = value - hdrlen; in x509_note_params()
|