To allow a small C++ application to update itself at clients connected over the internet, I am in need of a mechanism that validates the download based on a public key. Algorithms such as DSA or RSA seem to be able to do this nicely.
However, looking at well-known available libraries for this (Crypto++, LibTomCrypt) they all end up making my binary > 500k larger, while it seems to me such logic can be implemented in a couple of k. Are there any libraries that implement RSA/DSA hash verification in a, say, <20k footprint?
Since I found no libraries that fitted my specific need, I whipped up my own library for this: http://github.com/paiq/dsa_verify. The current implementation has a ~50k footprint of program memory, mainly due to the included bignum math lib, but future versions may be stripped even more.
Do you really need ciphers ? Generally, to validate a download, you can use a hash function like MD5 or SHA. Maybe you can find a small library using these.
Either way, you can try the openssl library. However the .a on my machine is about 400K and 250K stripped.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With