Abstract. We study the complexity of the isomorphism and automorphism problems for finite rings. We show that both integer factorization and graph isomorphism reduce to the problem of counting automorphisms of a ring. This counting problem is shown to be in the functional version of the complexity class AM coAM and hence is not NP-complete unless the polynomial hierarchy collapses. As a "positive" result we show that deciding whether a given ring has a non-trivial automorphism can be done in deterministic polynomial time. Finding such an automorphism is, however, shown to be randomly equivalent to integer factorization. Keywords. Ring, isomorphism, automorphism, polynomial hierarchy, graph isomorphism, integer factorization. Subject classification. Computer Science, Algebra.