bump bouncy castle from 1.46 to 1.51

* some error fixes
* should improve performance a bit (Krawczyk)