|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
Poly1305 one-time authenticator (D. J. Bernstein; RFC 8439 Section 2.5). More...
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Macros | |
| #define | SSH_POLY1305_KEY_LEN 32 |
| #define | SSH_POLY1305_TAG_LEN 16 |
Functions | |
| void | ssh_poly1305 (uint8_t tag[SSH_POLY1305_TAG_LEN], const uint8_t *msg, size_t len, const uint8_t key[SSH_POLY1305_KEY_LEN]) |
Compute the 16-byte Poly1305 tag over msg under the 32-byte one-time key. | |
Poly1305 one-time authenticator (D. J. Bernstein; RFC 8439 Section 2.5).
A one-time MAC over a message under a 32-byte key (r || s). Used by the chach.nosp@m.a20-.nosp@m.poly1.nosp@m.305@.nosp@m.opens.nosp@m.sh.c.nosp@m.om cipher, where the key is the first 32 bytes of the ChaCha20 block-0 keystream for the packet. 130-bit modular arithmetic in 5 x 26-bit limbs (poly1305-donna layout). Pure, no heap; the caller must use each key exactly once.
Definition in file ssh_poly1305.h.
| #define SSH_POLY1305_KEY_LEN 32 |
Definition at line 23 of file ssh_poly1305.h.
| #define SSH_POLY1305_TAG_LEN 16 |
Definition at line 24 of file ssh_poly1305.h.
| void ssh_poly1305 | ( | uint8_t | tag[SSH_POLY1305_TAG_LEN], |
| const uint8_t * | msg, | ||
| size_t | len, | ||
| const uint8_t | key[SSH_POLY1305_KEY_LEN] | ||
| ) |
Compute the 16-byte Poly1305 tag over msg under the 32-byte one-time key.
Definition at line 81 of file ssh_poly1305.cpp.
Referenced by ssh_chachapoly_decrypt(), and ssh_chachapoly_encrypt().