add dlog and primitive root