aido/picocoin — pull request #1 by mpg (2014-06-24 08:59:59+00:00)
Title: Reducing PolarSSL config.h

Hey,

Here are two commits that reduce the footprint of PolarSSL in picocoin a bit more. The first one just disables some things that are apparently not needed (`make && make check` working fine without them, but I couldn't try the `chain-verf` test), and the second changes a bit of code to get rid of ctr_drbg: since you need hmac_drbg for deterministic ECDSA anyway, it seemed better not to use a second drbg in addition.

With PolarSSL 1.3.8 (out soon), you should also be able to disable `POLARSSL_X509_USE_C` and `POLARSSL_X509_CRT_PARSE_C`, which is currently not possible due to a missing dependency declaration in our test suite.

Also, I left `DES_C` and `MD5_C` since they were sometimes used for encrypted private keys in PEM format, but that's probably something you can get disable too unless you known you'll be using such keys. (I'm not even sure if private key are stored in the standard PEM formats in bitcoin: if you don't use `pk_parse_key()` to read them, it means they're not, and you can get rid of `DES_C` and `MD5_C` unless you know you need them for another reason.) (At least there is nothing in PEM format in the repo except for some PolarSSL test files, according to `grep -R --exclude-dir=.git --exclude-dir=polarssl -- '-----BEGIN' .`.)