mbedtls_rsa_public() function
This function performs an RSA public key operation.
Arguments
ctx
The initialized RSA context to use.
The input buffer. This must be a readable buffer of length \c ctx->len Bytes. For example, \c 256 Bytes for an 2048-bit RSA modulus.
output
The output buffer. This must be a writable buffer of length \c ctx->len Bytes. For example, \c 256 Bytes for an 2048-bit RSA modulus.
Return value
\c 0 on success. An \c MBEDTLS_ERR_RSA_XXX error code on failure.
Notes
This function does not handle message padding. Make sure to set \p input[0] = 0 or ensure that input is smaller than \p N.