[curves] curve25519-donna stack usage

Jason A. Donenfeld Jason at zx2c4.com
Wed Nov 9 10:00:20 PST 2016


Hey guys,

I use a curve25519-donna variant inside of WireGuard [1]. It runs in a
kthread in kernel space, which only has 8k of stack in total. Some
circuitous paths in the kernel into code actually amount to having
much less stack available. I could allocate curve25519 variables on
the heap instead, or try to do various other traditional programming
techniques to reduce usage. But before I put too much time into that,
I was wondering if anybody else has ran into this limitation with
-donna and if there are other common portable implementations of
curve25519 that use less stack while remaining performant, or if there
are various other tricks to reduce stack usage.

Regards,
Jason


[1] https://www.wireguard.io/


More information about the Curves mailing list