use bn_is_zero and bn_is_equal where possible