Adding TODO note to Ed25519

This commit is contained in:
2026-08-21 10:18:50 +09:00
parent 1de3608c9b
commit b95ba8a88f
@@ -31,6 +31,20 @@ import swiss.qpq.gajumaru.core.tools.CryptoUtils;
// Uses exquisitely annoying Radix-2^25.5 field arithmetic. Never do this if you can avoid it.
// Verified against the canonical Erlang ec_utils (see test/README.md for how).
// TODO: Craig 2026-08-21
// I don't like the allocation of Scratch and Ge all over the place.
// If someone were to apply this library to a high-throughput system, with many threads
// signing stuff willy-nilly, then intense GC pressure could result simply because of
// all the dead (and zeroed) Scratch and Ge space left littered throughout the dead heap
// awaiting GC. What I want to do instead is provide a separate call path that allows the
// current mechanism to work as well as a slightly lower-level call path where the caller
// can provide a pre-allocated space by reference so if a high-throughput system is using
// lots of worker threads and really pressuring the system, the caller can pre-allocate the
// needed GC and Scratch space themselves once per thread.
//
// This should be pretty easy.
// I just don't want to look at this module for at least a few days.
public final class Ed25519 {
// Precomputed limbs for Ed25519 constants (Radix 2^25.5)