ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
Loading...
Searching...
No Matches
curve25519.h File Reference

Curve25519 field arithmetic + X25519 (RFC 7748) for the curve25519-sha256 KEX. More...

#include "protocore_config.h"

Go to the source code of this file.

Detailed Description

Curve25519 field arithmetic + X25519 (RFC 7748) for the curve25519-sha256 KEX.

Field elements are GF(2^255 - 19) in a portable radix-2^16 representation (sixteen int64 limbs), so no 128-bit integer type is needed - important because 32-bit xtensa (ESP32) gcc has no __int128. The same field arithmetic backs Ed25519 (protocore_ed25519), so the field ops are exported here. Correctness is pinned to the RFC 7748 ยง5.2 test vectors (test_ed25519).

Two surfaces, and they are not the same kind of thing: the field ops below are shared internals that Ed25519 links against directly, and X25519 is the namespace this module exports.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file curve25519.h.