# What is the difference between $\in$ and $\in_{\small R}$?

I have a simple question about basic math. When I read different papers bout ABE, I see different methods to choose a random exponent.

What is the difference between the following options?

1. Choose a random exponent $$\,a \in \mathbb Z_p$$.

2. Choose a random exponent $$\,a \in_{\small R} \mathbb Z_p$$.

3. Choose a random exponent $$\,a \in \mathbb Z^*_p$$.

4. Choose a random exponent $$\,a \in_{\small R} \mathbb Z^*_p$$.

• Where do you see these? Some authors may write $\in_R$ to mean ‘randomly chosen from’, while others use $\xleftarrow\$$for that, but it's not a widely used standard notation, so it's hard to say without context. Most authors will define what they mean because it's not standard. (That said,$\mathbb Z_p^*$pretty much always means the set of units in the ring$\mathbb Z/p\mathbb Z$of integers modulo$p$, i.e. nonzero elements coprime with$p$, so it might be used without definition even though sometimes$\mathbb Z_p$means the$p$-adic integers in other contexts.) – Squeamish Ossifrage Dec 1 '19 at 0:29 • In reference ieeexplore.ieee.org/document/7448433?denied= I found that authors used β ∈ Zp, however in sciencedirect.com/science/article/pii/S0898122112001198, they used α ∈R Z∗p. – tesoke Dec 1 '19 at 1:22 • In your second paper, on p. 1312, §2.1 ‘Notation’, it says: In this paper,$x \in_R S$denotes the operation of picking an element$x$at random and uniformly from a finite set$S$. – Squeamish Ossifrage Dec 1 '19 at 1:44 • If$p$is prime and large enough, the difference between picking$x$uniformly at random from$\mathbb Z_p$vs.$\mathbb Z_p^*$is essentially immaterial because the probability of picking$0$is negligible. – Squeamish Ossifrage Dec 1 '19 at 1:46 • There is also$\underleftarrow{R}\$ for picking uniformly. – kelalaka Dec 1 '19 at 8:15

As the comments pointed out $$a\in_{R} M$$ means picking a sample $$a$$ uniformly from some set $$M$$. If a non-uniform distribution is implied, this will be stated.
In case you are also asking about it, $$\mathbb{Z}_p^\ast$$ is the multiplicative group (nonzero elements) of the integers modulo $$p.$$ In general $$\mathbb{Z}_n^\ast=\{k: k \in \mathbb{Z}_n, \gcd(k,n)=1\}$$ is the multiplicative group over the integers modulo $$n,$$ made up of exactly the integers $$k$$ such that $$\gcd(k,n)=1,$$ and there are $$\varphi(n)$$ of them. Of course $$\varphi(p)=p-1.$$