mirror of
https://github.com/meshtastic/firmware.git
synced 2026-01-27 04:02:05 +00:00
Put a bit of order in the src directory, group and name things appropriately
This commit is contained in:
23
src/platform/nrf52/aes-256/tiny-aes.h
Normal file
23
src/platform/nrf52/aes-256/tiny-aes.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#ifndef _TINY_AES_H_
|
||||
#define _TINY_AES_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define AES_BLOCKLEN 16 // Block length in bytes - AES is 128b block only
|
||||
// #define AES_KEYLEN 32
|
||||
#define AES_keyExpSize 240
|
||||
|
||||
struct AES_ctx
|
||||
{
|
||||
uint8_t RoundKey[AES_keyExpSize];
|
||||
uint8_t Iv[AES_BLOCKLEN];
|
||||
};
|
||||
|
||||
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_CTR_xcrypt_buffer(struct AES_ctx* ctx, uint8_t* buf, size_t length);
|
||||
|
||||
#endif // _TINY_AES_H_
|
||||
Reference in New Issue
Block a user