Signatures works for small p and q. Need change for BigInteger in some
places instead of int.