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.cpp392 bssl::UniquePtr<RSA> rsa(EVP_PKEY_get1_RSA(actual.get())); in TEST_P() local
393 ASSERT_FALSE(rsa.get() == NULL) in TEST_P()
396 ASSERT_EQ(static_cast<unsigned long>(RSA_F4), BN_get_word(rsa.get()->e)) in TEST_P()
399 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.cpp2618 RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get())); in TEST_P() local
2620 size_t modulus_len = BN_num_bytes(rsa->n); in TEST_P()
2623 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_P()
2635 BN_sub(rsa->n, rsa->n, BN_value_one()); in TEST_P()
2636 modulus_len = BN_num_bytes(rsa->n); in TEST_P()
2638 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_P()
/hardware/interfaces/keymaster/4.0/vts/functional/
Dkeymaster_hidl_hal_test.cpp2325 RSA_Ptr rsa(EVP_PKEY_get1_RSA(pkey.get())); in TEST_P() local
2327 size_t modulus_len = BN_num_bytes(rsa->n); in TEST_P()
2330 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_P()
2342 BN_sub(rsa->n, rsa->n, BN_value_one()); in TEST_P()
2343 modulus_len = BN_num_bytes(rsa->n); in TEST_P()
2345 BN_bn2bin(rsa->n, modulus_buf.get()); in TEST_P()