Lines Matching refs:rsa_key

87 	rsa_key rsa_key;  in rsa_mod_exp_hw()  local
93 rsa_key.algo = CRYPTO_RSA4096; in rsa_mod_exp_hw()
98 rsa_key.algo = CRYPTO_RSA2048; in rsa_mod_exp_hw()
100 rsa_key.n = malloc(key_len); in rsa_mod_exp_hw()
101 rsa_key.e = malloc(key_len); in rsa_mod_exp_hw()
102 rsa_key.c = malloc(key_len); in rsa_mod_exp_hw()
103 if (!rsa_key.n || !rsa_key.e || !rsa_key.c) in rsa_mod_exp_hw()
106 rsa_convert_big_endian(rsa_key.n, (uint32_t *)prop->modulus, in rsa_mod_exp_hw()
108 rsa_convert_big_endian(rsa_key.e, (uint32_t *)prop->public_exponent_BN, in rsa_mod_exp_hw()
111 rsa_convert_big_endian(rsa_key.c, (uint32_t *)prop->factor_c, in rsa_mod_exp_hw()
114 rsa_convert_big_endian(rsa_key.c, (uint32_t *)prop->factor_np, in rsa_mod_exp_hw()
122 memcpy(rsa_key_data, rsa_key.n, key_len); in rsa_mod_exp_hw()
123 memcpy(rsa_key_data + key_len, rsa_key.e, key_len); in rsa_mod_exp_hw()
124 memcpy(rsa_key_data + 2 * key_len, rsa_key.c, key_len); in rsa_mod_exp_hw()
135 dev = crypto_get_device(rsa_key.algo); in rsa_mod_exp_hw()
141 ret = crypto_rsa_verify(dev, &rsa_key, (u8 *)sig_reverse, buf); in rsa_mod_exp_hw()
150 free(rsa_key.n); in rsa_mod_exp_hw()
151 free(rsa_key.e); in rsa_mod_exp_hw()
152 free(rsa_key.c); in rsa_mod_exp_hw()
602 char *rsa_key; in rsa_burn_key_hash() local
654 rsa_key = calloc(key_len * 3, sizeof(char)); in rsa_burn_key_hash()
655 if (!rsa_key) in rsa_burn_key_hash()
658 n = rsa_key; in rsa_burn_key_hash()
659 e = rsa_key + CONFIG_RSA_N_SIZE; in rsa_burn_key_hash()
660 c = rsa_key + CONFIG_RSA_N_SIZE + CONFIG_RSA_E_SIZE; in rsa_burn_key_hash()
673 ret = calculate_hash(rsa_key, CONFIG_RSA_N_SIZE + CONFIG_RSA_E_SIZE + CONFIG_RSA_C_SIZE, in rsa_burn_key_hash()
719 free(rsa_key); in rsa_burn_key_hash()