mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-10-12 18:44:56 +03:00
pk/rsa: move RSA parse/write private/public key functions to rsa module
These functions are meant to be used internally, so their prototype declaration is kept into rsa_internal.h. Signed-off-by: Valerio Setti <valerio.setti@nordicsemi.no>
This commit is contained in:
@@ -16,6 +16,49 @@
|
||||
|
||||
#include "mbedtls/rsa.h"
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param rsa
|
||||
* \param key
|
||||
* \param keylen
|
||||
* \return int
|
||||
*/
|
||||
int mbedtls_rsa_key_parse(mbedtls_rsa_context *rsa, const unsigned char *key, size_t keylen);
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param rsa
|
||||
* \param p
|
||||
* \param end
|
||||
* \return int
|
||||
*/
|
||||
int mbedtls_rsa_pubkey_parse(mbedtls_rsa_context *rsa, unsigned char **p,
|
||||
const unsigned char *end);
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param p
|
||||
* \param start
|
||||
* \param rsa
|
||||
* \return int
|
||||
*/
|
||||
int mbedtls_rsa_key_write(const mbedtls_rsa_context *rsa, unsigned char *start,
|
||||
unsigned char **p);
|
||||
|
||||
/**
|
||||
* \brief
|
||||
*
|
||||
* \param p
|
||||
* \param start
|
||||
* \param rsa
|
||||
* \return int
|
||||
*/
|
||||
int mbedtls_rsa_pubkey_write(const mbedtls_rsa_context *rsa, unsigned char *start,
|
||||
unsigned char **p);
|
||||
|
||||
#if defined(MBEDTLS_PKCS1_V21)
|
||||
/**
|
||||
* \brief This function is analogue to \c mbedtls_rsa_rsassa_pss_sign().
|
||||
|
Reference in New Issue
Block a user