# Proof that this is not a secure pseudorandom function?

$$p$$ is a large prime number. Consider the following function $$F:\mathbb Z^*_p \times \mathbb D\rightarrow\mathbb Z^*_p$$ where $$\mathbb D=2,....,p-1$$.

$$F_k(x)=x^k \bmod p$$

Proof that it's not a secure pseudorandom function.

What I‘ve tried:

I give a value to $$x_1$$ and obtain $$y_1$$, then I set $$x_2 =y_1+p$$. At the end $$y_1$$ is equal to $$y_2$$. Could this be right or is it totally wrong?

What you have tried does not work because $y_1=y_2$ does not hold in general when $x_2=y_1+p$ (further, adding $p$ is identity in $Z_p$ ).
You want to build a distinguisher for $F_k$. Arguably, $F_k(1)=1$ is enough for that, but you can build a more general distinguisher from $F_k(x_1\cdot x_2\bmod p)=F_k(x_1)\cdot F_k(x_2)\bmod p$.
{"ft_lang_label":"__label__en","ft_lang_prob":0.67075616,"math_prob":0.9999833,"size":386,"snap":"2021-31-2021-39","text_gpt3_token_len":139,"char_repetition_ratio":0.11518325,"word_repetition_ratio":0.0,"special_character_ratio":0.34715027,"punctuation_ratio":0.16304348,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":1.000008,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-09-26T09:29:35Z\",\"WARC-Record-ID\":\"<urn:uuid:974db006-4144-42c1-b690-87cfe3696a61>\",\"Content-Length\":\"165628\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:9f527b68-bda3-46ee-96eb-889c2ec3cbd2>\",\"WARC-Concurrent-To\":\"<urn:uuid:4f5c5d2a-b75c-4351-b0d8-7dcb4d12601d>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://crypto.stackexchange.com/questions/31979/proof-that-this-is-not-a-secure-pseudorandom-function\",\"WARC-Payload-Digest\":\"sha1:2JTHIIE2732JVBZ77GLMFKCWDSGAWPTO\",\"WARC-Block-Digest\":\"sha1:RDRLJBL2J2USY7ACDDFO3QXFF46LGNBK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-39/CC-MAIN-2021-39_segments_1631780057857.27_warc_CC-MAIN-20210926083818-20210926113818-00243.warc.gz\"}"}