Topic: Reduce Size of WolfCrypt - Using DH only

I am trying to implement the Diffie-Hellman key exchange on a TI microcontroller with WolfCrypt but I can't seem to get the size down to fit my MCU. I am currently compiling dh.c and it's dependencies (e.g integer.c, sha256.c e.t.c) into object files, archiving those objects and then attempting to use the archive in my application but the size of the integer object is preventing the application from fitting on my MCU.

All other object files are 2-8KB but the integer.o object is 66KB. I am trying to run this on an MCU with a total of 46KB and I also have other code totalling 20-30KB that needs to fit on there too. Are there any ways I can try to make the set of functions in integer.c smaller? The WolfSSL website says the library build size is 20-100KB, surely just using DH on it's own should enable me to be closer to 20KB than 100KB.


Re: Reduce Size of WolfCrypt - Using DH only

Hi CryptoGuy,

Could you send me the full list of source files you are compiling along with any settings you are using to further reduce code size (For example are you using NO_MD5, NO_SHA, ... etc)

Could you also tell us a little about the project you are working on and your goals for just using DH key exchange stand alone?

I can try to provide additional defines to reduce object size depending on what you are already using.

Warm Regards,