On Mon, Mar 10, 2014 at 9:28 AM, Nikos Mavrogiannopoulos n.mavrogiannopoulos@gmail.com wrote:
Hello, I have put in https://github.com/nmav/nettle-mini/tree/gmp-mini a version of nettle that has an additional configure option. The --enable-mini-gmp. This will compile libghoweed using mini-gmp thus allowing nettle to be used in space constrained systems. Note that using nettle with mini-gmp instead of gmp imposes a penalty of around 10x, and may leak more information due to side-channels (this should not be the case for RSA as blinding is performed in hogweed, but I haven't checked the other algorithms).
I've now have nettle-mini for both master and 2.7. The patches required for master are gmp-mini branch and for 2.7 in nettle-2.7-mini-gmp. What I haven't tried is combining nettle and hogweed in a single library when in mini mode. I believe the savings should be negligible in modern embedded systems, and will cause practical issues as it will be harder to determine which library to link with.
I'd appreciate if these go upstream as I've failed to add nettle to openwrt (and don't have to time to pursue that further), so I no longer plan to maintain these patches separately (and they will be easily break on makefile changes).
regards, Nikos