cwist
Modern C web framework with libttak runtime
Loading...
Searching...
No Matches
evp.h File Reference

mbedTLS TLS backend: EVP subset (HMAC digest tags, AES-256-CBC). More...

#include <stddef.h>
Include dependency graph for evp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define EVP_MAX_MD_SIZE   64
 
#define EVP_sha256   cwist_mtls_EVP_sha256
 
#define EVP_aes_256_cbc   cwist_mtls_EVP_aes_256_cbc
 
#define EVP_CIPHER_CTX_new   cwist_mtls_EVP_CIPHER_CTX_new
 
#define EVP_CIPHER_CTX_free   cwist_mtls_EVP_CIPHER_CTX_free
 
#define EVP_EncryptInit_ex   cwist_mtls_EVP_EncryptInit_ex
 
#define EVP_EncryptUpdate   cwist_mtls_EVP_EncryptUpdate
 
#define EVP_EncryptFinal_ex   cwist_mtls_EVP_EncryptFinal_ex
 
#define EVP_DecryptInit_ex   cwist_mtls_EVP_DecryptInit_ex
 
#define EVP_DecryptUpdate   cwist_mtls_EVP_DecryptUpdate
 
#define EVP_DecryptFinal_ex   cwist_mtls_EVP_DecryptFinal_ex
 

Typedefs

typedef struct cwist_mtls_evp_md EVP_MD
 
typedef struct cwist_mtls_cipher EVP_CIPHER
 
typedef struct cwist_mtls_cipher_ctx EVP_CIPHER_CTX
 

Functions

const EVP_MD * cwist_mtls_EVP_sha256 (void)
 
const EVP_CIPHER * cwist_mtls_EVP_aes_256_cbc (void)
 
EVP_CIPHER_CTX * cwist_mtls_EVP_CIPHER_CTX_new (void)
 
void cwist_mtls_EVP_CIPHER_CTX_free (EVP_CIPHER_CTX *ctx)
 
int cwist_mtls_EVP_EncryptInit_ex (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine, const unsigned char *key, const unsigned char *iv)
 
int cwist_mtls_EVP_EncryptUpdate (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl)
 
int cwist_mtls_EVP_EncryptFinal_ex (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
 
int cwist_mtls_EVP_DecryptInit_ex (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, void *engine, const unsigned char *key, const unsigned char *iv)
 
int cwist_mtls_EVP_DecryptUpdate (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl)
 
int cwist_mtls_EVP_DecryptFinal_ex (EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
 

Detailed Description

mbedTLS TLS backend: EVP subset (HMAC digest tags, AES-256-CBC).

Part of the CWIST TLS backend seam; see shim/openssl/ssl.h for the design. Only what CWIST call sites use: EVP_sha256() as an HMAC digest selector and the AES-256-CBC cipher context API used by db_crypt and the (dormant under mbedTLS) session-ticket key callback.

Definition in file evp.h.

Macro Definition Documentation

◆ EVP_aes_256_cbc

#define EVP_aes_256_cbc   cwist_mtls_EVP_aes_256_cbc

Definition at line 26 of file evp.h.

◆ EVP_CIPHER_CTX_free

#define EVP_CIPHER_CTX_free   cwist_mtls_EVP_CIPHER_CTX_free

Definition at line 33 of file evp.h.

◆ EVP_CIPHER_CTX_new

#define EVP_CIPHER_CTX_new   cwist_mtls_EVP_CIPHER_CTX_new

Definition at line 32 of file evp.h.

◆ EVP_DecryptFinal_ex

#define EVP_DecryptFinal_ex   cwist_mtls_EVP_DecryptFinal_ex

Definition at line 39 of file evp.h.

◆ EVP_DecryptInit_ex

#define EVP_DecryptInit_ex   cwist_mtls_EVP_DecryptInit_ex

Definition at line 37 of file evp.h.

◆ EVP_DecryptUpdate

#define EVP_DecryptUpdate   cwist_mtls_EVP_DecryptUpdate

Definition at line 38 of file evp.h.

◆ EVP_EncryptFinal_ex

#define EVP_EncryptFinal_ex   cwist_mtls_EVP_EncryptFinal_ex

Definition at line 36 of file evp.h.

◆ EVP_EncryptInit_ex

#define EVP_EncryptInit_ex   cwist_mtls_EVP_EncryptInit_ex

Definition at line 34 of file evp.h.

◆ EVP_EncryptUpdate

#define EVP_EncryptUpdate   cwist_mtls_EVP_EncryptUpdate

Definition at line 35 of file evp.h.

◆ EVP_MAX_MD_SIZE

#define EVP_MAX_MD_SIZE   64

Definition at line 23 of file evp.h.

◆ EVP_sha256

#define EVP_sha256   cwist_mtls_EVP_sha256

Definition at line 25 of file evp.h.

Typedef Documentation

◆ EVP_CIPHER

typedef struct cwist_mtls_cipher EVP_CIPHER

Definition at line 20 of file evp.h.

◆ EVP_CIPHER_CTX

typedef struct cwist_mtls_cipher_ctx EVP_CIPHER_CTX

Definition at line 21 of file evp.h.

◆ EVP_MD

typedef struct cwist_mtls_evp_md EVP_MD

Definition at line 19 of file evp.h.

Function Documentation

◆ cwist_mtls_EVP_aes_256_cbc()

const EVP_CIPHER * cwist_mtls_EVP_aes_256_cbc ( void  )

Definition at line 240 of file backend_mbedtls.c.

◆ cwist_mtls_EVP_CIPHER_CTX_free()

void cwist_mtls_EVP_CIPHER_CTX_free ( EVP_CIPHER_CTX *  ctx)

Definition at line 255 of file backend_mbedtls.c.

References cap, and cwist_free().

◆ cwist_mtls_EVP_CIPHER_CTX_new()

EVP_CIPHER_CTX * cwist_mtls_EVP_CIPHER_CTX_new ( void  )

Definition at line 248 of file backend_mbedtls.c.

References cap, and cwist_malloc().

◆ cwist_mtls_EVP_DecryptFinal_ex()

int cwist_mtls_EVP_DecryptFinal_ex ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl 
)

Definition at line 314 of file backend_mbedtls.c.

References cap, and cwist_mtls_EVP_EncryptFinal_ex().

◆ cwist_mtls_EVP_DecryptInit_ex()

int cwist_mtls_EVP_DecryptInit_ex ( EVP_CIPHER_CTX *  ctx,
const EVP_CIPHER *  type,
void *  engine,
const unsigned char *  key,
const unsigned char *  iv 
)

Definition at line 286 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_EVP_DecryptUpdate()

int cwist_mtls_EVP_DecryptUpdate ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl,
const unsigned char *  in,
int  inl 
)

Definition at line 309 of file backend_mbedtls.c.

References cap, and cwist_mtls_EVP_EncryptUpdate().

◆ cwist_mtls_EVP_EncryptFinal_ex()

int cwist_mtls_EVP_EncryptFinal_ex ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl 
)

Definition at line 301 of file backend_mbedtls.c.

References cap.

Referenced by cwist_mtls_EVP_DecryptFinal_ex().

◆ cwist_mtls_EVP_EncryptInit_ex()

int cwist_mtls_EVP_EncryptInit_ex ( EVP_CIPHER_CTX *  ctx,
const EVP_CIPHER *  type,
void *  engine,
const unsigned char *  key,
const unsigned char *  iv 
)

Definition at line 280 of file backend_mbedtls.c.

References cap.

◆ cwist_mtls_EVP_EncryptUpdate()

int cwist_mtls_EVP_EncryptUpdate ( EVP_CIPHER_CTX *  ctx,
unsigned char *  out,
int *  outl,
const unsigned char *  in,
int  inl 
)

Definition at line 292 of file backend_mbedtls.c.

References cap.

Referenced by cwist_mtls_EVP_DecryptUpdate().

◆ cwist_mtls_EVP_sha256()

const EVP_MD * cwist_mtls_EVP_sha256 ( void  )

Definition at line 165 of file backend_mbedtls.c.