This is somewhat preliminary but I got to this point: [1] (`always use BouncyCastle in KeyGenUtils`)
Found some (old) posts about memory leaks with dynamic providers[2][3][4]. In [2] it's mentioned a statical method to install providers. I'm still running test against those commits [1] and the previous one [5]. Best regards, [1]: https://github.com/freenet/fred/commit/abad64d133ed9a674d5f666f48db178a85652b9e [2]: http://www.bouncycastle.org/wiki/display/JA1/Provider+Installation [3]: http://disq.us/p/198y23e [4]: http://bouncy-castle.1462172.n4.nabble.com/Re-memory-leak-td4655694.html [5]: https://github.com/freenet/fred/commit/8988466283ee43f8ac35c308d4af3fc59172472f