mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
mbedtls: make style
This commit is contained in:
parent
6324e2e746
commit
b1d6eaf2f7
177 changed files with 37224 additions and 41821 deletions
|
@ -71,8 +71,7 @@ typedef enum {
|
|||
* convetion from the Thread v1.0 spec. Correspondance is indicated in the
|
||||
* description as a pair C: client name, S: server name
|
||||
*/
|
||||
typedef struct mbedtls_ecjpake_context
|
||||
{
|
||||
typedef struct mbedtls_ecjpake_context {
|
||||
const mbedtls_md_info_t *md_info; /**< Hash to use */
|
||||
mbedtls_ecp_group grp; /**< Elliptic curve */
|
||||
mbedtls_ecjpake_role role; /**< Are we client or server? */
|
||||
|
@ -100,7 +99,7 @@ typedef struct mbedtls_ecjpake_context
|
|||
* \param ctx The ECJPAKE context to initialize.
|
||||
* This must not be \c NULL.
|
||||
*/
|
||||
void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx );
|
||||
void mbedtls_ecjpake_init(mbedtls_ecjpake_context *ctx);
|
||||
|
||||
/**
|
||||
* \brief Set up an ECJPAKE context for use.
|
||||
|
@ -123,12 +122,12 @@ void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx );
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx,
|
||||
mbedtls_ecjpake_role role,
|
||||
mbedtls_md_type_t hash,
|
||||
mbedtls_ecp_group_id curve,
|
||||
const unsigned char *secret,
|
||||
size_t len );
|
||||
int mbedtls_ecjpake_setup(mbedtls_ecjpake_context *ctx,
|
||||
mbedtls_ecjpake_role role,
|
||||
mbedtls_md_type_t hash,
|
||||
mbedtls_ecp_group_id curve,
|
||||
const unsigned char *secret,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* \brief Check if an ECJPAKE context is ready for use.
|
||||
|
@ -139,7 +138,7 @@ int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx,
|
|||
* \return \c 0 if the context is ready for use.
|
||||
* \return #MBEDTLS_ERR_ECP_BAD_INPUT_DATA otherwise.
|
||||
*/
|
||||
int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx );
|
||||
int mbedtls_ecjpake_check(const mbedtls_ecjpake_context *ctx);
|
||||
|
||||
/**
|
||||
* \brief Generate and write the first round message
|
||||
|
@ -160,10 +159,10 @@ int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx );
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx,
|
||||
unsigned char *buf, size_t len, size_t *olen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng );
|
||||
int mbedtls_ecjpake_write_round_one(mbedtls_ecjpake_context *ctx,
|
||||
unsigned char *buf, size_t len, size_t *olen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng);
|
||||
|
||||
/**
|
||||
* \brief Read and process the first round message
|
||||
|
@ -179,9 +178,9 @@ int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx,
|
||||
const unsigned char *buf,
|
||||
size_t len );
|
||||
int mbedtls_ecjpake_read_round_one(mbedtls_ecjpake_context *ctx,
|
||||
const unsigned char *buf,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* \brief Generate and write the second round message
|
||||
|
@ -201,10 +200,10 @@ int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx,
|
||||
unsigned char *buf, size_t len, size_t *olen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng );
|
||||
int mbedtls_ecjpake_write_round_two(mbedtls_ecjpake_context *ctx,
|
||||
unsigned char *buf, size_t len, size_t *olen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng);
|
||||
|
||||
/**
|
||||
* \brief Read and process the second round message
|
||||
|
@ -219,9 +218,9 @@ int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx,
|
||||
const unsigned char *buf,
|
||||
size_t len );
|
||||
int mbedtls_ecjpake_read_round_two(mbedtls_ecjpake_context *ctx,
|
||||
const unsigned char *buf,
|
||||
size_t len);
|
||||
|
||||
/**
|
||||
* \brief Derive the shared secret
|
||||
|
@ -241,10 +240,10 @@ int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx,
|
|||
* \return \c 0 if successful.
|
||||
* \return A negative error code on failure.
|
||||
*/
|
||||
int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx,
|
||||
unsigned char *buf, size_t len, size_t *olen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng );
|
||||
int mbedtls_ecjpake_derive_secret(mbedtls_ecjpake_context *ctx,
|
||||
unsigned char *buf, size_t len, size_t *olen,
|
||||
int (*f_rng)(void *, unsigned char *, size_t),
|
||||
void *p_rng);
|
||||
|
||||
/**
|
||||
* \brief This clears an ECJPAKE context and frees any
|
||||
|
@ -254,7 +253,7 @@ int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx,
|
|||
* in which case this function does nothing. If it is not
|
||||
* \c NULL, it must point to an initialized ECJPAKE context.
|
||||
*/
|
||||
void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx );
|
||||
void mbedtls_ecjpake_free(mbedtls_ecjpake_context *ctx);
|
||||
|
||||
#if defined(MBEDTLS_SELF_TEST)
|
||||
|
||||
|
@ -263,7 +262,7 @@ void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx );
|
|||
*
|
||||
* \return 0 if successful, or 1 if a test failed
|
||||
*/
|
||||
int mbedtls_ecjpake_self_test( int verbose );
|
||||
int mbedtls_ecjpake_self_test(int verbose);
|
||||
|
||||
#endif /* MBEDTLS_SELF_TEST */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue