dhm.h | dhm.h | |||
---|---|---|---|---|
skipping to change at line 39 | skipping to change at line 39 | |||
#include "bignum.h" | #include "bignum.h" | |||
/* | /* | |||
* DHM Error codes | * DHM Error codes | |||
*/ | */ | |||
#define POLARSSL_ERR_DHM_BAD_INPUT_DATA -0x3080 /**< Ba d input parameters to function. */ | #define POLARSSL_ERR_DHM_BAD_INPUT_DATA -0x3080 /**< Ba d input parameters to function. */ | |||
#define POLARSSL_ERR_DHM_READ_PARAMS_FAILED -0x3100 /**< Re ading of the DHM parameters failed. */ | #define POLARSSL_ERR_DHM_READ_PARAMS_FAILED -0x3100 /**< Re ading of the DHM parameters failed. */ | |||
#define POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED -0x3180 /**< Ma king of the DHM parameters failed. */ | #define POLARSSL_ERR_DHM_MAKE_PARAMS_FAILED -0x3180 /**< Ma king of the DHM parameters failed. */ | |||
#define POLARSSL_ERR_DHM_READ_PUBLIC_FAILED -0x3200 /**< Re ading of the public values failed. */ | #define POLARSSL_ERR_DHM_READ_PUBLIC_FAILED -0x3200 /**< Re ading of the public values failed. */ | |||
#define POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Ma keing of the public value failed. */ | #define POLARSSL_ERR_DHM_MAKE_PUBLIC_FAILED -0x3280 /**< Ma king of the public value failed. */ | |||
#define POLARSSL_ERR_DHM_CALC_SECRET_FAILED -0x3300 /**< Ca lculation of the DHM secret failed. */ | #define POLARSSL_ERR_DHM_CALC_SECRET_FAILED -0x3300 /**< Ca lculation of the DHM secret failed. */ | |||
/** | /** | |||
* \brief DHM context structure | * \brief DHM context structure | |||
*/ | */ | |||
typedef struct | typedef struct | |||
{ | { | |||
size_t len; /*!< size(P) in chars */ | size_t len; /*!< size(P) in chars */ | |||
mpi P; /*!< prime modulus */ | mpi P; /*!< prime modulus */ | |||
mpi G; /*!< generator */ | mpi G; /*!< generator */ | |||
skipping to change at line 112 | skipping to change at line 112 | |||
* | * | |||
* \return 0 if successful, or an POLARSSL_ERR_DHM_XXX error code | * \return 0 if successful, or an POLARSSL_ERR_DHM_XXX error code | |||
*/ | */ | |||
int dhm_read_public( dhm_context *ctx, | int dhm_read_public( dhm_context *ctx, | |||
const unsigned char *input, size_t ilen ); | const unsigned char *input, size_t ilen ); | |||
/** | /** | |||
* \brief Create own private value X and export G^X | * \brief Create own private value X and export G^X | |||
* | * | |||
* \param ctx DHM context | * \param ctx DHM context | |||
* \param x_size private value size in bits | * \param x_size private value size in bytes | |||
* \param output destination buffer | * \param output destination buffer | |||
* \param olen must be equal to ctx->P.len | * \param olen must be equal to ctx->P.len | |||
* \param f_rng RNG function | * \param f_rng RNG function | |||
* \param p_rng RNG parameter | * \param p_rng RNG parameter | |||
* | * | |||
* \return 0 if successful, or an POLARSSL_ERR_DHM_XXX error code | * \return 0 if successful, or an POLARSSL_ERR_DHM_XXX error code | |||
*/ | */ | |||
int dhm_make_public( dhm_context *ctx, int x_size, | int dhm_make_public( dhm_context *ctx, int x_size, | |||
unsigned char *output, size_t olen, | unsigned char *output, size_t olen, | |||
int (*f_rng)(void *, unsigned char *, size_t), | int (*f_rng)(void *, unsigned char *, size_t), | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
version.h | version.h | |||
---|---|---|---|---|
skipping to change at line 42 | skipping to change at line 42 | |||
#define POLARSSL_VERSION_H | #define POLARSSL_VERSION_H | |||
#include "config.h" | #include "config.h" | |||
/** | /** | |||
* The version number x.y.z is split into three parts. | * The version number x.y.z is split into three parts. | |||
* Major, Minor, Patchlevel | * Major, Minor, Patchlevel | |||
*/ | */ | |||
#define POLARSSL_VERSION_MAJOR 1 | #define POLARSSL_VERSION_MAJOR 1 | |||
#define POLARSSL_VERSION_MINOR 1 | #define POLARSSL_VERSION_MINOR 1 | |||
#define POLARSSL_VERSION_PATCH 1 | #define POLARSSL_VERSION_PATCH 2 | |||
/** | /** | |||
* The single version number has the following structure: | * The single version number has the following structure: | |||
* MMNNPP00 | * MMNNPP00 | |||
* Major version | Minor version | Patch version | * Major version | Minor version | Patch version | |||
*/ | */ | |||
#define POLARSSL_VERSION_NUMBER 0x01010100 | #define POLARSSL_VERSION_NUMBER 0x01010200 | |||
#define POLARSSL_VERSION_STRING "1.1.1" | #define POLARSSL_VERSION_STRING "1.1.2" | |||
#define POLARSSL_VERSION_STRING_FULL "PolarSSL 1.1.1" | #define POLARSSL_VERSION_STRING_FULL "PolarSSL 1.1.2" | |||
#if defined(POLARSSL_VERSION_C) | #if defined(POLARSSL_VERSION_C) | |||
/** | /** | |||
* Get the version number. | * Get the version number. | |||
* | * | |||
* \return The constructed version number in the format | * \return The constructed version number in the format | |||
* MMNNPP00 (Major, Minor, Patch). | * MMNNPP00 (Major, Minor, Patch). | |||
*/ | */ | |||
unsigned int version_get_number( void ); | unsigned int version_get_number( void ); | |||
End of changes. 2 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added | |||