Merged BigInteger changes to SecretPoly