Home
last modified time | relevance | path

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

/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.cpp426 Unique_RSA rsa(EVP_PKEY_get1_RSA(actual.get())); in TEST_P() local
427 ASSERT_FALSE(rsa.get() == NULL) in TEST_P()
430 ASSERT_EQ(static_cast<unsigned long>(RSA_F4), BN_get_word(rsa.get()->e)) in TEST_P()
433 ASSERT_EQ((GetParam() + 7) / 8, static_cast<uint32_t>(RSA_size(rsa.get()))) in TEST_P()
/hardware/interfaces/keymaster/3.0/vts/functional/
Dkeymaster_hidl_hal_test.cpp2649 RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get())); in TEST_F() local
2651 size_t modulus_len = BN_num_bytes(rsa->n); in TEST_F()
2654 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_F()
2666 BN_sub(rsa->n, rsa->n, BN_value_one()); in TEST_F()
2667 modulus_len = BN_num_bytes(rsa->n); in TEST_F()
2669 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_F()
/hardware/interfaces/keymaster/4.0/vts/functional/
Dkeymaster_hidl_hal_test.cpp2412 RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get())); in TEST_F() local
2414 size_t modulus_len = BN_num_bytes(rsa->n); in TEST_F()
2417 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_F()
2429 BN_sub(rsa->n, rsa->n, BN_value_one()); in TEST_F()
2430 modulus_len = BN_num_bytes(rsa->n); in TEST_F()
2432 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_F()