Do the (g^B)^x0 lookups. Add discrete_log for convenience.