Solution

ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/computer-security/1/d/ii/solution

Take the positive integer whose existence is allowed by the question and write
Modulo , if then directly. Otherwise Fermat's little theorem applies, since is a multiple of . Hence . The same two-case argument works modulo . By the Chinese remainder theorem,
so
This also covers a ciphertext that is not coprime to ; applying Euler's theorem without checking that hypothesis would miss this detail. Equivalently, repeated application of a permutation on a finite set eventually returns to the starting point, although the arithmetic argument gives the requested sufficient exponent.

New to topics? Read the docs here!