37#ifndef DETERMINISTICESPASYNCWEBSERVER_SSH_AES256CTR_H
38#define DETERMINISTICESPASYNCWEBSERVER_SSH_AES256CTR_H
50#include <mbedtls/aes.h>
void ssh_aes256ctr_init(SshAesCtrCtx *ctx, const uint8_t key[32], const uint8_t iv[16])
Initialize an AES-256-CTR context.
void ssh_aes256ctr_wipe(SshAesCtrCtx *ctx)
Zero the key schedule and all context fields.
void ssh_aes256ctr_crypt(SshAesCtrCtx *ctx, const uint8_t *in, uint8_t *out, size_t len)
Encrypt or decrypt len bytes in-place (or src→dst).
uint8_t counter[16]
Current CTR block (big-endian 128-bit counter).
uint8_t pos
Next byte position within keystream[].
mbedtls_aes_context _mbed
mbedtls context with pre-expanded key schedule.
uint8_t keystream[16]
Buffered keystream from last AES-ECB call.