If you have the equation $a^k\equiv 1\pmod m$ with only $m$ known, the smallest $k$ (that always works) is determined by the Carmichael function. How does that change when $a$ is also known? Is it possible to find the lowest possible $k$ without just trying all the numbers up to $m$?
And, additionally, is it possible to choose $a$ yourself, so that there's a smaller solution for $k$?
I'm sorry if this is easily findable on Google, I couldn't find anything myself, partly because I'm not quite sure what search terms to use.