More functions for implementing bigint, enough to start implementing diffie_hellman.