Using BouncyCastle BigInteger

Bye 3k lines of code