On cyclic MDS codes of length q over GF(q)

It is shown that a cyclic code C of length q over GF (q) is the maximum distance separable if and only if either 1) q is a prime, in which case C is equivalent, up to a coordinate permutation, to an extended Reed-Solomon code, or 2) C is a trivial code of dimension k \in \{1, q - 1, q \} . Hence there exists a nontrivial cyclic extended Reed-Solomon code of length q over GF (q) if and only if q is a prime.