3

I want to know whether it's possible that there would exist $1\lt k\lt\phi(n)$ s.t. $a^{\phi(n)}\equiv 1\pmod n$, for a given $a$ and $n$? I need to prove/disprove it. I need some hints. (For title I meant minimum mod n.)

OK, seems it may be too easy for my question but may I also ask that how to find the minimum even if I know that $(a,n)=1$? i.e. I have to know the $k$ s.t. $a^k\equiv 1\pmod n,$ given $(a,n)=1$.

kale
  • 3
  • 3
Kindred
  • 229

3 Answers3

3

$\phi(7)=6$ but $2^3\equiv 1$(mod$7$).

Edit: As I know there is no general algorithm to find the least integer $k$ such that $a^k\equiv 1$(mod$n$). Though a fact that can help is that this $k$ must divide $\phi(n)$. Even more than that, this $k$ divides every integer $m$ such that $a^m\equiv 1$(mod $m$). You can try to prove it, that's a pretty easy exercise. So for example, given that we know that $\phi(7)=6$ we know that the minimum cannot be $4$ or $5$. It must be an integer which divides $6$. So that gives us less options which makes it a bit easier.

Mark
  • 39,605
  • 1
    Well, in the example I gave you it is pretty fast. When it comes to big numbers it is obviously a very hard task. Even to find $\phi(n)$ is very hard in general. – Mark Jan 07 '19 at 19:06
  • that RSA is secure because $\phi(n)$ is hard to find right? I just haven't connected these ideas... – Kindred Jan 07 '19 at 19:07
  • 1
    Yes, exactly. And to find $\phi(n)$ is hard because you need to find the prime factorization of $n$. And if the primes which are dividing $n$ are very big then the factorization might take years even for today's best computers. (maybe it might change in the future). So RSA is pretty safe. – Mark Jan 07 '19 at 19:12
  • Very grateful for your kindness and detailed explanation. – Kindred Jan 07 '19 at 19:15
  • You're welcome. – Mark Jan 07 '19 at 19:17
  • Of course there is a general algorithm to find $k$ since it is the result of a finite computation. There is in fact a simple formula for it (not much different from the formula for $\phi$). It’s commonly known as the Carmichael lambda function. – Erick Wong Jan 07 '19 at 20:12
  • Alright, I never heard of that formula before. But looks like it is not so easy to use in general, just like the formula for $\phi$. Still good to know. – Mark Jan 07 '19 at 20:18
  • For a given $a$, Bill Dubuque's comment on the OP should be very helpful. – Erick Wong Jan 17 '19 at 01:32
3

Hint 1:

If $a^{\phi(n)}\equiv 1 \pmod n$ and $\phi(n)$ is composite and $k|\phi(n)$ then Let $b = a^k$.

Then $b^{\frac {\phi(n)}k} = (a^k)^{\frac {\phi(n)}k}=a^{\phi(n)} \equiv 1 \pmod n$.

Hint 2:

$(-1)^2 \equiv 1 \pmod n$. So if $\phi(n) \ne 2$....

Hint 3:

$a^3 \equiv 1 \pmod {a^3 -1}$. Can you find any $a^3 -1$ so that $\phi(a^3 -1) > 3$?

=====

Euler's Theorem was never actually meant to be a way of finding the order of an element, least not directly. The fact that $a^{\phi(n)} \equiv 1 \pmod n$ for $a$ relatively prime to $n$ in no way means that $\phi(n)$ is the smallest order that such is true. In general, it rarely is!

Indeed, as $(a^k)^{\frac {\phi(n)}k}=a^k$ and $\phi(n)$ is never prime for $\phi(n) > 2$ for every element where $\phi(n)$ is the smallest power there are $a^k; k|\phi(n)$ where it isnt.

One useful tidbit. If $a^k\equiv 1 \pmod n$ then $k|\phi(n)$. That is useful for finding an order.

fleablood
  • 124,253
2

Hint:

$$\frac{10^3-1}{37}=27$$

ajotatxe
  • 65,084