ChaCha20 implementation for encryption

Add an implementation in 8051 assembler for the generation of a
ChaCha20 keystream and an encryption function using the keystream
in C.

A test function using the example from RFC7539 is provided in
chacha20_test.

Keys, nonce, and block counter and the pointers to the input plaintext,
its length and the output pointer are provided via a struct chacha20,
which also holds the working state of the ChaCha20 algorithm
This commit is contained in:
logicog committed 2026-10-05 09:27:52 +02:00
1 parent 36a064d03d
commit 7621045de1
5 files changed
+581 -2

No files matched your search

+1
View File
@@ -28,6 +28,7 @@
#include "httpd/page_impl.h"
#include "boot.h"
#include "sfp.h"
#include "crypto/chacha.h"
extern __code const struct machine machine;
extern __xdata uint32_t flash_size;