mbedtls_rsa_public() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...

mbedtls_rsa_public() function

This function performs an RSA public key operation.

Syntax

int mbedtls_rsa_public( mbedtls_rsa_context *ctx,     const unsigned char *input,     unsigned char *output );

Arguments

ctx

The initialized RSA context to use.

input

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.

References

LocationText
rsa.h:533
int mbedtls_rsa_public( mbedtls_rsa_context *ctx,