pkipolarssl

PolarSSL PKI encrypt/sign


I need to encrypt data with asymmetric key. Not sure whether PolarSSL (v1.2) has common API for this. The key in certificate can be RSA or DHM (or EC) and I expect to have universal API like "init/encrypt/decrypt/free" without separate calls to rsa_encrypt, dh_encrypt, etc.


Solution

  • There is no common API for the 1.2 branch. There is also no elliptic curve support in the 1.2 branch. The 1.2 branch has been in maintenance mode for quite a while now.

    For a generic layer with PolarSSL / mbed TLS you should switch to a recent version.

    Just for clarification: Although DHM has to do with asymmetric encryption, it is a key exchange method, not an encryption algorithm. There is not really a thing as a DHM key in a certificate.