Do boring crypto: https://cr.yp.to/talks/2015.10.05/slides-djb-20151005-a4.pdf
Boring crypto means minimal state, minimal code (and therefore easy to audit), a minimal set of algorithms with new algorithms and encodings and such being added only when absolutely necessary, etc. Crypto "flexibility" means edge case bugs and lots of code where bugs can hide.
There is in general an exponential relationship between LOC and complexity and bugs. In crypto and security code this is really bad.