24 #ifndef MBEDTLS_BLOWFISH_H 25 #define MBEDTLS_BLOWFISH_H 27 #if !defined(MBEDTLS_CONFIG_FILE) 30 #include MBEDTLS_CONFIG_FILE 38 #define MBEDTLS_BLOWFISH_ENCRYPT 1 39 #define MBEDTLS_BLOWFISH_DECRYPT 0 40 #define MBEDTLS_BLOWFISH_MAX_KEY_BITS 448 41 #define MBEDTLS_BLOWFISH_MIN_KEY_BITS 32 42 #define MBEDTLS_BLOWFISH_ROUNDS 16 43 #define MBEDTLS_BLOWFISH_BLOCKSIZE 8 45 #if !defined(MBEDTLS_DEPRECATED_REMOVED) 46 #define MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH MBEDTLS_DEPRECATED_NUMERIC_CONSTANT( -0x0016 ) 48 #define MBEDTLS_ERR_BLOWFISH_BAD_INPUT_DATA -0x0016 50 #define MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH -0x0018 54 #define MBEDTLS_ERR_BLOWFISH_HW_ACCEL_FAILED -0x0017 60 #if !defined(MBEDTLS_BLOWFISH_ALT) 75 #include "blowfish_alt.h" 109 unsigned int keybits );
132 #if defined(MBEDTLS_CIPHER_MODE_CBC) 165 const unsigned char *input,
166 unsigned char *output );
169 #if defined(MBEDTLS_CIPHER_MODE_CFB) 206 const unsigned char *input,
207 unsigned char *output );
210 #if defined(MBEDTLS_CIPHER_MODE_CTR) 279 const unsigned char *input,
280 unsigned char *output );
#define MBEDTLS_BLOWFISH_BLOCKSIZE
Definition: blowfish.h:43
Configuration options (set of defines)
struct mbedtls_blowfish_context mbedtls_blowfish_context
Blowfish context structure.
Blowfish context structure.
Definition: blowfish.h:67
void mbedtls_blowfish_init(mbedtls_blowfish_context *ctx)
Initialize a Blowfish context.
int mbedtls_blowfish_crypt_ecb(mbedtls_blowfish_context *ctx, int mode, const unsigned char input[MBEDTLS_BLOWFISH_BLOCKSIZE], unsigned char output[MBEDTLS_BLOWFISH_BLOCKSIZE])
Perform a Blowfish-ECB block encryption/decryption operation.
uint32_t S[4][256]
Definition: blowfish.h:70
int mbedtls_blowfish_setkey(mbedtls_blowfish_context *ctx, const unsigned char *key, unsigned int keybits)
Perform a Blowfish key schedule operation.
#define MBEDTLS_BLOWFISH_ROUNDS
Definition: blowfish.h:42
uint32_t P[MBEDTLS_BLOWFISH_ROUNDS+2]
Definition: blowfish.h:69
void mbedtls_blowfish_free(mbedtls_blowfish_context *ctx)
Clear a Blowfish context.