Home
last modified time | relevance | path

Searched refs:rsa (Results 1 – 3 of 3) sorted by relevance

/hardware/samsung_slsi/exynos5/libkeymaster/
Dkeymaster_mobicore.cpp168 Unique_RSA rsa(EVP_PKEY_get1_RSA(pkey.get())); in exynos_km_import_keypair() local
169 if (rsa.get() == NULL) { in exynos_km_import_keypair()
176 metadata.lenpubmod = BN_bn2bin(rsa->n, kbuf + key_len); in exynos_km_import_keypair()
189 metadata.lenpubexp = BN_bn2bin(rsa->e, kbuf + key_len); in exynos_km_import_keypair()
192 if ((rsa->p != NULL) && (rsa->q != NULL) && (rsa->dmp1 != NULL) && in exynos_km_import_keypair()
193 (rsa->dmq1 != NULL) && (rsa->iqmp != NULL)) in exynos_km_import_keypair()
196 metadata.rsacrtpriv.lenp = BN_bn2bin(rsa->p, kbuf + key_len); in exynos_km_import_keypair()
198 metadata.rsacrtpriv.lenq = BN_bn2bin(rsa->q, kbuf + key_len); in exynos_km_import_keypair()
200 metadata.rsacrtpriv.lendp = BN_bn2bin(rsa->dmp1, kbuf + key_len); in exynos_km_import_keypair()
202 metadata.rsacrtpriv.lendq = BN_bn2bin(rsa->dmq1, kbuf + key_len); in exynos_km_import_keypair()
[all …]
/hardware/qcom/keymaster/
Dkeymaster_qcom.cpp138 Unique_RSA rsa(RSA_new()); in qcom_km_get_keypair_public() local
139 if (rsa.get() == NULL) { in qcom_km_get_keypair_public()
144 rsa->n = BN_bin2bn(reinterpret_cast<const unsigned char*>(keyblob_ptr->modulus), in qcom_km_get_keypair_public()
146 if (rsa->n == NULL) { in qcom_km_get_keypair_public()
151 rsa->e = BN_bin2bn(reinterpret_cast<const unsigned char*>(&keyblob_ptr->public_exponent), in qcom_km_get_keypair_public()
153 if (rsa->e == NULL) { in qcom_km_get_keypair_public()
163 if (EVP_PKEY_assign_RSA(pkey.get(), rsa.get()) != 1) { in qcom_km_get_keypair_public()
167 OWNERSHIP_TRANSFERRED(rsa); in qcom_km_get_keypair_public()
/hardware/libhardware/tests/keymaster/
Dkeymaster_test.cpp427 Unique_RSA rsa(EVP_PKEY_get1_RSA(actual.get())); in TEST_P() local
428 ASSERT_FALSE(rsa.get() == NULL) in TEST_P()
431 ASSERT_EQ(static_cast<unsigned long>(RSA_F4), BN_get_word(rsa.get()->e)) in TEST_P()
434 ASSERT_EQ((GetParam() + 7) / 8, static_cast<uint32_t>(RSA_size(rsa.get()))) in TEST_P()