Nostrduino
Loading...
Searching...
No Matches
Data Structures | Macros | Functions
NostrAES.h File Reference
#include <stdint.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  AES_ctx
 

Macros

#define CBC   1
 
#define ECB   1
 
#define CTR   1
 
#define AES256   1
 
#define AES_BLOCKLEN   16
 
#define AES_KEYLEN   32
 
#define AES_keyExpSize   240
 

Functions

void AES_init_ctx (struct AES_ctx *ctx, const uint8_t *key)
 
void AES_init_ctx_iv (struct AES_ctx *ctx, const uint8_t *key, const uint8_t *iv)
 
void AES_ctx_set_iv (struct AES_ctx *ctx, const uint8_t *iv)
 
void AES_ECB_encrypt (const struct AES_ctx *ctx, uint8_t *buf)
 
void AES_ECB_decrypt (const struct AES_ctx *ctx, uint8_t *buf)
 
void AES_CBC_encrypt_buffer (struct AES_ctx *ctx, uint8_t *buf, size_t length)
 
void AES_CBC_decrypt_buffer (struct AES_ctx *ctx, uint8_t *buf, size_t length)
 
void AES_CTR_xcrypt_buffer (struct AES_ctx *ctx, uint8_t *buf, size_t length)
 

Macro Definition Documentation

◆ AES256

#define AES256   1

◆ AES_BLOCKLEN

#define AES_BLOCKLEN   16

◆ AES_keyExpSize

#define AES_keyExpSize   240

◆ AES_KEYLEN

#define AES_KEYLEN   32

◆ CBC

#define CBC   1

◆ CTR

#define CTR   1

◆ ECB

#define ECB   1

Function Documentation

◆ AES_CBC_decrypt_buffer()

void AES_CBC_decrypt_buffer ( struct AES_ctx ctx,
uint8_t *  buf,
size_t  length 
)

◆ AES_CBC_encrypt_buffer()

void AES_CBC_encrypt_buffer ( struct AES_ctx ctx,
uint8_t *  buf,
size_t  length 
)

◆ AES_CTR_xcrypt_buffer()

void AES_CTR_xcrypt_buffer ( struct AES_ctx ctx,
uint8_t *  buf,
size_t  length 
)

◆ AES_ctx_set_iv()

void AES_ctx_set_iv ( struct AES_ctx ctx,
const uint8_t *  iv 
)

◆ AES_ECB_decrypt()

void AES_ECB_decrypt ( const struct AES_ctx ctx,
uint8_t *  buf 
)

◆ AES_ECB_encrypt()

void AES_ECB_encrypt ( const struct AES_ctx ctx,
uint8_t *  buf 
)

◆ AES_init_ctx()

void AES_init_ctx ( struct AES_ctx ctx,
const uint8_t *  key 
)

◆ AES_init_ctx_iv()

void AES_init_ctx_iv ( struct AES_ctx ctx,
const uint8_t *  key,
const uint8_t *  iv 
)