# What is the difference between, and security of $Z_p$ and $F_p$?

While reading some papers, I found that sometimes $Z_p$ was used but sometimes $F_p$ was used ($p$ is prime). Usually, the author will only use their subgroups like this: choose a big prime factor of $p-1$ , denote $q$, and set $G=\langle g \rangle$.

My questions are :

• Why do we only use the subgroup while $Z_p$ OR $F_p$? Or maybe we can choose a $p$ such that $p-1$ is prime and now if $Z_p^*$ or $F_p^*$ can be directly used?
• What's the difference of using $Z_p$ and $F_p$?
-

## migrated from cstheory.stackexchange.comDec 1 '13 at 19:41

This question came from our site for theoretical computer scientists and researchers in related fields.

When $p$ is prime, $\mathbb{F}^\times_p \approx \mathbb{Z}_{p-1}$. –  Yuval Filmus Oct 7 '13 at 5:30
I do not think this question fits here, it's just basic terminology. And also it's hard to answer as it is because it lacks context and the notation $Z_p$ is ambiguous. In the biggest generality, $\mathbf{Z}/n\mathbf{Z}$ is a ring. Authors sometimes use $\mathbf{Z}_n$ to denote the addition group of that ring. When $n$ is a prime $p$, then $\mathbf{Z}/p\mathbf{Z}$ is isomorphic to the finite field of size $p$, $\mathbf{F}_p$. And to make it more confusing, sometimes authors use $\mathbf{Z}_p$ to denote the multiplication group of $\mathbf{F}_p$. –  Sasho Nikolov Oct 7 '13 at 16:18
yes i want to migrate it to Cryptography beta but it still needs 9 flags remaining –  T.B Oct 7 '13 at 23:59
If $p$ is prime (and not 2 or 3), then $p-1$ is even and not equals to 2 and therefore cannot be prime. –  Maeher Dec 2 '13 at 8:11

You should read the Wikipedia article on finite fields. For each prime $p$ and for each $n >0$, there is a unique field of order $p^n$ (up to isomorphism). This field is usually denoted $F_{p^n}$. Now, for $n = 1$, the field $F_p$ can be identified with the set $\mathbf{Z}/p\mathbf{Z}$ of integers modulo $p$, which is also sometimes denoted $\mathbf{Z}_p$. However, the notation $\mathbf{Z}_p$ is also used in number theory to denote the ring of $p$-adic integers and this may create a potential confusion.
by your means , there is no difference between $Z_p$ and $F_p$ ? –  T.B Oct 7 '13 at 13:23
another question : why is the subgroup of $Z_p$ or $F_p$ used, for example in the cryptography protocols while itself ? –  T.B Oct 7 '13 at 13:36
If (and only if) $p$ is prime, then $\mathbb{Z}_p$ is isomorphic to $\mathbb{F}_p$. Most of the time $\mathbb{Z}_n$ is used if calculations are just done in $\mathbb{Z}$ modulo some integer $n$. Finite fields however, also exits with index $p^n$, which are not "just integers". Usually they are constructed as integer polynomials modulo a irreducible polynomial of degree $n$ (s.t. all elements of the field have a lower degree). The different notations only emphasize the underlying structure (and which attributes are important). –  tylo Dec 2 '13 at 13:13