Commit b9e4e2c9 authored by Paul Bakker's avatar Paul Bakker
Browse files

Fix formatting: fix some 'easy' > 80 length lines

parent 9af723ce
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief AES block cipher * \brief AES block cipher
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -82,7 +82,8 @@ aes_context; ...@@ -82,7 +82,8 @@ aes_context;
* *
* \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH * \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH
*/ */
int aes_setkey_enc( aes_context *ctx, const unsigned char *key, unsigned int keysize ); int aes_setkey_enc( aes_context *ctx, const unsigned char *key,
unsigned int keysize );
/** /**
* \brief AES key schedule (decryption) * \brief AES key schedule (decryption)
...@@ -93,7 +94,8 @@ int aes_setkey_enc( aes_context *ctx, const unsigned char *key, unsigned int key ...@@ -93,7 +94,8 @@ int aes_setkey_enc( aes_context *ctx, const unsigned char *key, unsigned int key
* *
* \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH * \return 0 if successful, or POLARSSL_ERR_AES_INVALID_KEY_LENGTH
*/ */
int aes_setkey_dec( aes_context *ctx, const unsigned char *key, unsigned int keysize ); int aes_setkey_dec( aes_context *ctx, const unsigned char *key,
unsigned int keysize );
/** /**
* \brief AES-ECB block encryption/decryption * \brief AES-ECB block encryption/decryption
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief The ARCFOUR stream cipher * \brief The ARCFOUR stream cipher
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -61,7 +61,8 @@ arc4_context; ...@@ -61,7 +61,8 @@ arc4_context;
* \param key the secret key * \param key the secret key
* \param keylen length of the key, in bytes * \param keylen length of the key, in bytes
*/ */
void arc4_setup( arc4_context *ctx, const unsigned char *key, unsigned int keylen ); void arc4_setup( arc4_context *ctx, const unsigned char *key,
unsigned int keylen );
/** /**
* \brief ARC4 cipher function * \brief ARC4 cipher function
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief ASN.1 buffer writing functionality * \brief ASN.1 buffer writing functionality
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -29,7 +29,8 @@ ...@@ -29,7 +29,8 @@
#include "asn1.h" #include "asn1.h"
#define ASN1_CHK_ADD(g, f) do { if( ( ret = f ) < 0 ) return( ret ); else g += ret; } while( 0 ) #define ASN1_CHK_ADD(g, f) do { if( ( ret = f ) < 0 ) return( ret ); else \
g += ret; } while( 0 )
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -57,7 +58,8 @@ int asn1_write_len( unsigned char **p, unsigned char *start, size_t len ); ...@@ -57,7 +58,8 @@ int asn1_write_len( unsigned char **p, unsigned char *start, size_t len );
* *
* \return the length written or a negative error code * \return the length written or a negative error code
*/ */
int asn1_write_tag( unsigned char **p, unsigned char *start, unsigned char tag ); int asn1_write_tag( unsigned char **p, unsigned char *start,
unsigned char tag );
/** /**
* \brief Write raw buffer data * \brief Write raw buffer data
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief Multi-precision integer library * \brief Multi-precision integer library
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -652,8 +652,8 @@ int mpi_mod_int( t_uint *r, const mpi *A, t_sint b ); ...@@ -652,8 +652,8 @@ int mpi_mod_int( t_uint *r, const mpi *A, t_sint b );
* *
* \return 0 if successful, * \return 0 if successful,
* POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed, * POLARSSL_ERR_MPI_MALLOC_FAILED if memory allocation failed,
* POLARSSL_ERR_MPI_BAD_INPUT_DATA if N is negative or even or if * POLARSSL_ERR_MPI_BAD_INPUT_DATA if N is negative or even or
* E is negative * if E is negative
* *
* \note _RR is used to avoid re-computing R*R mod N across * \note _RR is used to avoid re-computing R*R mod N across
* multiple calls, which speeds up things a bit. It can * multiple calls, which speeds up things a bit. It can
...@@ -721,7 +721,8 @@ int mpi_is_prime( mpi *X, ...@@ -721,7 +721,8 @@ int mpi_is_prime( mpi *X,
* \brief Prime number generation * \brief Prime number generation
* *
* \param X Destination MPI * \param X Destination MPI
* \param nbits Required size of X in bits ( 3 <= nbits <= POLARSSL_MPI_MAX_BITS ) * \param nbits Required size of X in bits
* ( 3 <= nbits <= POLARSSL_MPI_MAX_BITS )
* \param dh_flag If 1, then (X-1)/2 will be prime too * \param dh_flag If 1, then (X-1)/2 will be prime too
* \param f_rng RNG function * \param f_rng RNG function
* \param p_rng RNG parameter * \param p_rng RNG parameter
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief Blowfish block cipher * \brief Blowfish block cipher
* *
* Copyright (C) 2012-2013, Brainspark B.V. * Copyright (C) 2012-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -46,7 +46,7 @@ typedef UINT32 uint32_t; ...@@ -46,7 +46,7 @@ typedef UINT32 uint32_t;
#define BLOWFISH_DECRYPT 0 #define BLOWFISH_DECRYPT 0
#define BLOWFISH_MAX_KEY 448 #define BLOWFISH_MAX_KEY 448
#define BLOWFISH_MIN_KEY 32 #define BLOWFISH_MIN_KEY 32
#define BLOWFISH_ROUNDS 16 /* when increasing this value, make sure to extend the initialisation vectors */ #define BLOWFISH_ROUNDS 16 /**< Rounds to use. When increasing this value, make sure to extend the initialisation vectors */
#define BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */ #define BLOWFISH_BLOCKSIZE 8 /* Blowfish uses 64 bit blocks */
#define POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH -0x0016 /**< Invalid key length. */ #define POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH -0x0016 /**< Invalid key length. */
...@@ -79,7 +79,8 @@ blowfish_context; ...@@ -79,7 +79,8 @@ blowfish_context;
* *
* \return 0 if successful, or POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH * \return 0 if successful, or POLARSSL_ERR_BLOWFISH_INVALID_KEY_LENGTH
*/ */
int blowfish_setkey( blowfish_context *ctx, const unsigned char *key, unsigned int keysize ); int blowfish_setkey( blowfish_context *ctx, const unsigned char *key,
unsigned int keysize );
/** /**
* \brief Blowfish-ECB block encryption/decryption * \brief Blowfish-ECB block encryption/decryption
...@@ -109,7 +110,8 @@ int blowfish_crypt_ecb( blowfish_context *ctx, ...@@ -109,7 +110,8 @@ int blowfish_crypt_ecb( blowfish_context *ctx,
* \param input buffer holding the input data * \param input buffer holding the input data
* \param output buffer holding the output data * \param output buffer holding the output data
* *
* \return 0 if successful, or POLARSSL_ERR_BLOWFISH_INVALID_INPUT_LENGTH * \return 0 if successful, or
* POLARSSL_ERR_BLOWFISH_INVALID_INPUT_LENGTH
*/ */
int blowfish_crypt_cbc( blowfish_context *ctx, int blowfish_crypt_cbc( blowfish_context *ctx,
int mode, int mode,
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief Camellia block cipher * \brief Camellia block cipher
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -75,7 +75,8 @@ camellia_context; ...@@ -75,7 +75,8 @@ camellia_context;
* *
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH * \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH
*/ */
int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, unsigned int keysize ); int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key,
unsigned int keysize );
/** /**
* \brief CAMELLIA key schedule (decryption) * \brief CAMELLIA key schedule (decryption)
...@@ -86,7 +87,8 @@ int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, unsign ...@@ -86,7 +87,8 @@ int camellia_setkey_enc( camellia_context *ctx, const unsigned char *key, unsign
* *
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH * \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_KEY_LENGTH
*/ */
int camellia_setkey_dec( camellia_context *ctx, const unsigned char *key, unsigned int keysize ); int camellia_setkey_dec( camellia_context *ctx, const unsigned char *key,
unsigned int keysize );
/** /**
* \brief CAMELLIA-ECB block encryption/decryption * \brief CAMELLIA-ECB block encryption/decryption
...@@ -116,7 +118,8 @@ int camellia_crypt_ecb( camellia_context *ctx, ...@@ -116,7 +118,8 @@ int camellia_crypt_ecb( camellia_context *ctx,
* \param input buffer holding the input data * \param input buffer holding the input data
* \param output buffer holding the output data * \param output buffer holding the output data
* *
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH * \return 0 if successful, or
* POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
*/ */
int camellia_crypt_cbc( camellia_context *ctx, int camellia_crypt_cbc( camellia_context *ctx,
int mode, int mode,
...@@ -142,7 +145,8 @@ int camellia_crypt_cbc( camellia_context *ctx, ...@@ -142,7 +145,8 @@ int camellia_crypt_cbc( camellia_context *ctx,
* \param input buffer holding the input data * \param input buffer holding the input data
* \param output buffer holding the output data * \param output buffer holding the output data
* *
* \return 0 if successful, or POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH * \return 0 if successful, or
* POLARSSL_ERR_CAMELLIA_INVALID_INPUT_LENGTH
*/ */
int camellia_crypt_cfb128( camellia_context *ctx, int camellia_crypt_cfb128( camellia_context *ctx,
int mode, int mode,
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* \author Adriaan de Jong <dejong@fox-it.com> * \author Adriaan de Jong <dejong@fox-it.com>
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -173,29 +173,34 @@ typedef struct { ...@@ -173,29 +173,34 @@ typedef struct {
/** Encrypt using ECB */ /** Encrypt using ECB */
int (*ecb_func)( void *ctx, operation_t mode, int (*ecb_func)( void *ctx, operation_t mode,
const unsigned char *input, unsigned char *output ); const unsigned char *input, unsigned char *output );
/** Encrypt using CBC */ /** Encrypt using CBC */
int (*cbc_func)( void *ctx, operation_t mode, size_t length, unsigned char *iv, int (*cbc_func)( void *ctx, operation_t mode, size_t length,
const unsigned char *input, unsigned char *output ); unsigned char *iv, const unsigned char *input,
unsigned char *output );
/** Encrypt using CFB (Full length) */ /** Encrypt using CFB (Full length) */
int (*cfb_func)( void *ctx, operation_t mode, size_t length, size_t *iv_off, int (*cfb_func)( void *ctx, operation_t mode, size_t length, size_t *iv_off,
unsigned char *iv, const unsigned char *input, unsigned char *output ); unsigned char *iv, const unsigned char *input,
unsigned char *output );
/** Encrypt using CTR */ /** Encrypt using CTR */
int (*ctr_func)( void *ctx, size_t length, size_t *nc_off, unsigned char *nonce_counter, int (*ctr_func)( void *ctx, size_t length, size_t *nc_off,
unsigned char *stream_block, const unsigned char *input, unsigned char *output ); unsigned char *nonce_counter, unsigned char *stream_block,
const unsigned char *input, unsigned char *output );
/** Encrypt using STREAM */ /** Encrypt using STREAM */
int (*stream_func)( void *ctx, size_t length, int (*stream_func)( void *ctx, size_t length,
const unsigned char *input, unsigned char *output ); const unsigned char *input, unsigned char *output );
/** Set key for encryption purposes */ /** Set key for encryption purposes */
int (*setkey_enc_func)( void *ctx, const unsigned char *key, unsigned int key_length); int (*setkey_enc_func)( void *ctx, const unsigned char *key,
unsigned int key_length );
/** Set key for decryption purposes */ /** Set key for decryption purposes */
int (*setkey_dec_func)( void *ctx, const unsigned char *key, unsigned int key_length); int (*setkey_dec_func)( void *ctx, const unsigned char *key,
unsigned int key_length);
/** Allocate a new context */ /** Allocate a new context */
void * (*ctx_alloc_func)( void ); void * (*ctx_alloc_func)( void );
...@@ -323,9 +328,9 @@ const cipher_info_t *cipher_info_from_values( const cipher_id_t cipher_id, ...@@ -323,9 +328,9 @@ const cipher_info_t *cipher_info_from_values( const cipher_id_t cipher_id,
* \param ctx context to initialise. May not be NULL. * \param ctx context to initialise. May not be NULL.
* \param cipher_info cipher to use. * \param cipher_info cipher to use.
* *
* \return \c 0 on success, * \return 0 on success,
* \c POLARSSL_ERR_CIPHER_BAD_INPUT_DATA on parameter failure, * POLARSSL_ERR_CIPHER_BAD_INPUT_DATA on parameter failure,
* \c POLARSSL_ERR_CIPHER_ALLOC_FAILED if allocation of the * POLARSSL_ERR_CIPHER_ALLOC_FAILED if allocation of the
* cipher-specific context failed. * cipher-specific context failed.
*/ */
int cipher_init_ctx( cipher_context_t *ctx, const cipher_info_t *cipher_info ); int cipher_init_ctx( cipher_context_t *ctx, const cipher_info_t *cipher_info );
...@@ -474,8 +479,8 @@ static inline operation_t cipher_get_operation( const cipher_context_t *ctx ) ...@@ -474,8 +479,8 @@ static inline operation_t cipher_get_operation( const cipher_context_t *ctx )
* parameter verification fails or a cipher specific * parameter verification fails or a cipher specific
* error code. * error code.
*/ */
int cipher_setkey( cipher_context_t *ctx, const unsigned char *key, int key_length, int cipher_setkey( cipher_context_t *ctx, const unsigned char *key,
const operation_t operation ); int key_length, const operation_t operation );
#if defined(POLARSSL_CIPHER_MODE_WITH_PADDING) #if defined(POLARSSL_CIPHER_MODE_WITH_PADDING)
/** /**
...@@ -568,8 +573,8 @@ int cipher_update_ad( cipher_context_t *ctx, ...@@ -568,8 +573,8 @@ int cipher_update_ad( cipher_context_t *ctx,
* function, except the last one before cipher_finish(), * function, except the last one before cipher_finish(),
* must have ilen a multiple of the block size. * must have ilen a multiple of the block size.
*/ */
int cipher_update( cipher_context_t *ctx, const unsigned char *input, size_t ilen, int cipher_update( cipher_context_t *ctx, const unsigned char *input,
unsigned char *output, size_t *olen ); size_t ilen, unsigned char *output, size_t *olen );
/** /**
* \brief Generic cipher finalisation function. If data still * \brief Generic cipher finalisation function. If data still
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief CTR_DRBG based on AES-256 (NIST SP 800-90) * \brief CTR_DRBG based on AES-256 (NIST SP 800-90)
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -91,8 +91,9 @@ typedef struct ...@@ -91,8 +91,9 @@ typedef struct
unsigned char counter[16]; /*!< counter (V) */ unsigned char counter[16]; /*!< counter (V) */
int reseed_counter; /*!< reseed counter */ int reseed_counter; /*!< reseed counter */
int prediction_resistance; /*!< enable prediction resistance (Automatic int prediction_resistance; /*!< enable prediction resistance (Automatic
reseed before every random generation) */ reseed before every random generation) */
size_t entropy_len; /*!< amount of entropy grabbed on each (re)seed */ size_t entropy_len; /*!< amount of entropy grabbed on each
(re)seed */
int reseed_interval; /*!< reseed interval */ int reseed_interval; /*!< reseed interval */
aes_context aes_ctx; /*!< AES context */ aes_context aes_ctx; /*!< AES context */
...@@ -255,7 +256,9 @@ int ctr_drbg_update_seed_file( ctr_drbg_context *ctx, const char *path ); ...@@ -255,7 +256,9 @@ int ctr_drbg_update_seed_file( ctr_drbg_context *ctx, const char *path );
int ctr_drbg_self_test( int verbose ); int ctr_drbg_self_test( int verbose );
/* Internal functions (do not call directly) */ /* Internal functions (do not call directly) */
int ctr_drbg_init_entropy_len( ctr_drbg_context *, int (*)(void *, unsigned char *, size_t), void *, const unsigned char *, size_t, size_t ); int ctr_drbg_init_entropy_len( ctr_drbg_context *,
int (*)(void *, unsigned char *, size_t), void *,
const unsigned char *, size_t, size_t );
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief DES block cipher * \brief DES block cipher
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -136,7 +136,8 @@ int des_setkey_dec( des_context *ctx, const unsigned char key[DES_KEY_SIZE] ); ...@@ -136,7 +136,8 @@ int des_setkey_dec( des_context *ctx, const unsigned char key[DES_KEY_SIZE] );
* *
* \return 0 * \return 0
*/ */
int des3_set2key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 2] ); int des3_set2key_enc( des3_context *ctx,
const unsigned char key[DES_KEY_SIZE * 2] );
/** /**
* \brief Triple-DES key schedule (112-bit, decryption) * \brief Triple-DES key schedule (112-bit, decryption)
...@@ -146,7 +147,8 @@ int des3_set2key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * ...@@ -146,7 +147,8 @@ int des3_set2key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE *
* *
* \return 0 * \return 0
*/ */
int des3_set2key_dec( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 2] ); int des3_set2key_dec( des3_context *ctx,
const unsigned char key[DES_KEY_SIZE * 2] );
/** /**
* \brief Triple-DES key schedule (168-bit, encryption) * \brief Triple-DES key schedule (168-bit, encryption)
...@@ -156,7 +158,8 @@ int des3_set2key_dec( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * ...@@ -156,7 +158,8 @@ int des3_set2key_dec( des3_context *ctx, const unsigned char key[DES_KEY_SIZE *
* *
* \return 0 * \return 0
*/ */
int des3_set3key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 3] ); int des3_set3key_enc( des3_context *ctx,
const unsigned char key[DES_KEY_SIZE * 3] );
/** /**
* \brief Triple-DES key schedule (168-bit, decryption) * \brief Triple-DES key schedule (168-bit, decryption)
...@@ -166,7 +169,8 @@ int des3_set3key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * ...@@ -166,7 +169,8 @@ int des3_set3key_enc( des3_context *ctx, const unsigned char key[DES_KEY_SIZE *
* *
* \return 0 * \return 0
*/ */
int des3_set3key_dec( des3_context *ctx, const unsigned char key[DES_KEY_SIZE * 3] ); int des3_set3key_dec( des3_context *ctx,
const unsigned char key[DES_KEY_SIZE * 3] );
/** /**
* \brief DES-ECB block encryption/decryption * \brief DES-ECB block encryption/decryption
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* \brief Entropy accumulator implementation * \brief Entropy accumulator implementation
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -177,7 +177,8 @@ int entropy_add_source( entropy_context *ctx, ...@@ -177,7 +177,8 @@ int entropy_add_source( entropy_context *ctx,
int entropy_gather( entropy_context *ctx ); int entropy_gather( entropy_context *ctx );
/** /**
* \brief Retrieve entropy from the accumulator (Max ENTROPY_BLOCK_SIZE) * \brief Retrieve entropy from the accumulator
* (Maximum length: ENTROPY_BLOCK_SIZE)
* (Thread-safe if POLARSSL_THREADING_C is enabled) * (Thread-safe if POLARSSL_THREADING_C is enabled)
* *
* \param data Entropy context * \param data Entropy context
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
* *
* \author Adriaan de Jong <dejong@fox-it.com> * \author Adriaan de Jong <dejong@fox-it.com>
* *
* Copyright (C) 2006-2013, Brainspark B.V. * Copyright (C) 2006-2014, Brainspark B.V.
* *
* This file is part of PolarSSL (http://www.polarssl.org) * This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org> * Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
...@@ -92,16 +92,18 @@ typedef struct { ...@@ -92,16 +92,18 @@ typedef struct {
/** Generic digest function */ /** Generic digest function */
void (*digest_func)( const unsigned char *input, size_t ilen, void (*digest_func)( const unsigned char *input, size_t ilen,
unsigned char *output ); unsigned char *output );
/** Generic file digest function */ /** Generic file digest function */
int (*file_func)( const char *path, unsigned char *output ); int (*file_func)( const char *path, unsigned char *output );
/** HMAC Initialisation function */ /** HMAC Initialisation function */
void (*hmac_starts_func)( void *ctx, const unsigned char *key, size_t keylen ); void (*hmac_starts_func)( void *ctx, const unsigned char *key,
size_t keylen );
/** HMAC update function */ /** HMAC update function */
void (*hmac_update_func)( void *ctx, const unsigned char *input, size_t ilen ); void (*hmac_update_func)( void *ctx, const unsigned char *input,
size_t ilen );
/** HMAC finalisation function */ /** HMAC finalisation function */
void (*hmac_finish_func)( void *ctx, unsigned char *output); void (*hmac_finish_func)( void *ctx, unsigned char *output);
...@@ -111,8 +113,8 @@ typedef struct { ...@@ -111,8 +113,8 @@ typedef struct {
/** Generic HMAC function */ /** Generic HMAC function */
void (*hmac_func)( const unsigned char *key, size_t keylen, void (*hmac_func)( const unsigned char *key, size_t keylen,
const unsigned char *input, size_t ilen, const unsigned char *input, size_t ilen,
unsigned char *output ); unsigned char *output );
/** Allocate a new context */ /** Allocate a new context */
void * (*ctx_alloc_func)( void ); void * (*ctx_alloc_func)( void );
...@@ -171,8 +173,8 @@ const md_info_t *md_info_from_string( const char *md_name ); ...@@ -171,8 +173,8 @@ const md_info_t *md_info_from_string( const char *md_name );