/* Compare two big integers for equality. The integers use unsigned big-endian encoding; extra leading bytes (of value 0) are allowed.  */
static int eqbigint(const unsigned char *b1, size_t len1, const unsigned char *b2, size_t len2)
/* Compare two big integers for equality. The integers use unsigned big-endian encoding; extra leading bytes (of value 0) are allowed.  */
static int eqbigint(const unsigned char *b1, size_t len1, const unsigned char *b2, size_t len2)
{
	while (len1 > 0 && *b1 == 0) {
		b1 ++;
		len1 --;
	}
	while (len2 > 0 && *b2 == 0) {
		b2 ++;
		len2 --;
	}
	if (len1 != len2) {
		return 0;
	}
	return memcmp(b1, b2, len1) == 0;
}