Lines Matching refs:rsa_key
97 rsa_key rsa_key; in rsa_mod_exp_hw() local
103 rsa_key.algo = CRYPTO_RSA4096; in rsa_mod_exp_hw()
108 rsa_key.algo = CRYPTO_RSA2048; in rsa_mod_exp_hw()
110 rsa_key.n = malloc(key_len); in rsa_mod_exp_hw()
111 rsa_key.e = malloc(key_len); in rsa_mod_exp_hw()
112 rsa_key.c = malloc(key_len); in rsa_mod_exp_hw()
113 if (!rsa_key.n || !rsa_key.e || !rsa_key.c) in rsa_mod_exp_hw()
116 rsa_convert_big_endian(rsa_key.n, (uint32_t *)prop->modulus, in rsa_mod_exp_hw()
118 rsa_convert_big_endian(rsa_key.e, (uint32_t *)prop->public_exponent_BN, in rsa_mod_exp_hw()
121 rsa_convert_big_endian(rsa_key.c, (uint32_t *)prop->factor_c, in rsa_mod_exp_hw()
124 rsa_convert_big_endian(rsa_key.c, (uint32_t *)prop->factor_np, in rsa_mod_exp_hw()
132 memcpy(rsa_key_data, rsa_key.n, key_len); in rsa_mod_exp_hw()
133 memcpy(rsa_key_data + key_len, rsa_key.e, key_len); in rsa_mod_exp_hw()
134 memcpy(rsa_key_data + 2 * key_len, rsa_key.c, key_len); in rsa_mod_exp_hw()
145 dev = crypto_get_device(rsa_key.algo); in rsa_mod_exp_hw()
151 ret = crypto_rsa_verify(dev, &rsa_key, (u8 *)sig_reverse, buf); in rsa_mod_exp_hw()
160 free(rsa_key.n); in rsa_mod_exp_hw()
161 free(rsa_key.e); in rsa_mod_exp_hw()
162 free(rsa_key.c); in rsa_mod_exp_hw()
612 char *rsa_key; in rsa_burn_key_hash() local
671 rsa_key = calloc(key_len * 3, sizeof(char)); in rsa_burn_key_hash()
672 if (!rsa_key) in rsa_burn_key_hash()
675 n = rsa_key; in rsa_burn_key_hash()
676 e = rsa_key + CONFIG_RSA_N_SIZE; in rsa_burn_key_hash()
677 c = rsa_key + CONFIG_RSA_N_SIZE + CONFIG_RSA_E_SIZE; in rsa_burn_key_hash()
691 ret = calculate_hash(rsa_key, CONFIG_RSA_N_SIZE + CONFIG_RSA_E_SIZE + CONFIG_RSA_C_SIZE, in rsa_burn_key_hash()
769 free(rsa_key); in rsa_burn_key_hash()