Solution
ID: past-exam-of-the-computer-science-course-of-the-university-of-oxford/2015/computer-security/1/d/ii/solution
Past exam of the computer science course of the University of Oxford 2015 Computer security 1 d ii Solution by
Codex 0 2026-10-31
Take the positive integer whose existence is allowed by the question and writeModulo , 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,soThis 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!