mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-01-03 21:25:31 +01:00
Add ChaCha20 to the Cipher module
This commit is contained in:
parent
34b822ce7b
commit
bd92062269
8 changed files with 231 additions and 4 deletions
|
|
@ -121,7 +121,7 @@ int mbedtls_chacha20_starts( mbedtls_chacha20_context* ctx,
|
|||
* output pointers are NULL.
|
||||
* Otherwise, 0 is returned to indicate success.
|
||||
*/
|
||||
int mbedtls_chacha20_process( mbedtls_chacha20_context *ctx,
|
||||
int mbedtls_chacha20_update( mbedtls_chacha20_context *ctx,
|
||||
size_t size,
|
||||
const unsigned char *input,
|
||||
unsigned char *output );
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ typedef enum {
|
|||
MBEDTLS_CIPHER_ID_CAMELLIA, /**< The Camellia cipher. */
|
||||
MBEDTLS_CIPHER_ID_BLOWFISH, /**< The Blowfish cipher. */
|
||||
MBEDTLS_CIPHER_ID_ARC4, /**< The RC4 cipher. */
|
||||
MBEDTLS_CIPHER_ID_CHACHA20, /**< The Chacha20 cipher. */
|
||||
} mbedtls_cipher_id_t;
|
||||
|
||||
/**
|
||||
|
|
@ -145,6 +146,7 @@ typedef enum {
|
|||
MBEDTLS_CIPHER_CAMELLIA_128_CCM, /**< Camellia cipher with 128-bit CCM mode. */
|
||||
MBEDTLS_CIPHER_CAMELLIA_192_CCM, /**< Camellia cipher with 192-bit CCM mode. */
|
||||
MBEDTLS_CIPHER_CAMELLIA_256_CCM, /**< Camellia cipher with 256-bit CCM mode. */
|
||||
MBEDTLS_CIPHER_CHACHA20, /**< Chacha20 stream cipher. */
|
||||
} mbedtls_cipher_type_t;
|
||||
|
||||
/** Supported cipher modes. */
|
||||
|
|
@ -190,7 +192,7 @@ enum {
|
|||
/** Maximum length of any IV, in Bytes. */
|
||||
#define MBEDTLS_MAX_IV_LENGTH 16
|
||||
/** Maximum block size of any cipher, in Bytes. */
|
||||
#define MBEDTLS_MAX_BLOCK_LENGTH 16
|
||||
#define MBEDTLS_MAX_BLOCK_LENGTH 64
|
||||
|
||||
/**
|
||||
* Base cipher information (opaque struct).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue