hi Janos, Thanks for your reply!
Due to application vendor restrictions, I need to use the public key to decrypt data encrypted with the private key from the server.
I use 'mbedtls_rsa_check_privkey' to check whether it is a private key and decide to decrypt with private key or public key, which can temporarily solve this problem.
But there is a problem that I cannot use the public key to encrypt when I have the private key.
So do you have any good suggestions for supporting both encryption and decryption with private key and public key?
Thanks again and looking forward to your reply!
Best regards, makejian