I am working on some finite fields over $Z_{p^{2}}$ and I want to compute multiplicative orders of all elements in this field. Off the top of my head, I'd say I should multiply each $p^{2}-1$ element with itself and compute modulus ${p^{2}}$ continuously till I get "1" as result. The order of that element is the number of multiplications. Is that a correct approach or not?
EDIT 1 - Suppose I want to compute multiplicative orders of all elements in $Z_{3^{2}}$:
$1 \rightarrow 1 $
$2 \rightarrow 1, 2, 4, 8, 7, 5, 1$
$3 \rightarrow 1, 3, 0$
$4 \rightarrow 1, 4, 7, 1$
$5 \rightarrow 1, 5, 7, 8, 4, 2, 1$
$6 \rightarrow 1, 6, 0$
$7 \rightarrow 1, 7, 4, 1$
$8 \rightarrow 1, 8, 1$
So, none of the elements in this field has the order equal to $p^2-1=8$. Does it mean that this field doesn't have any primitives or I am missing something?
Using your notation, the question you're asking makes sense if you are referring to the multiplicative group of invertible elements, namely $G=(\mathbb{Z}_{p^2})^*$. Then it is know since Gauss that a group of this kind is cyclic and it has order $|G|=\varphi(p^2)=p(p-1)$. In your example, the order is 6 and, in fact, you have generators (2 and 5).