Franz Lemmermeyer's paper  contains a very interesting account of the truth about how Kummer was led to the invention of his ideal numbers (the popular legend is far from reality). In particular he brings to the fore the key role played by Jacobi sums from Jacobi's lectures on cyclotomy and corrects the following myths:
(1) Kummer’s idea was brilliant and new; there were no traces of it in the number theoretical work of his predecessors: it appeared out of the blue and solved the “problem” of nonunique factorization in a way reminiscent of Alexander the Great’s solution of the Gordian knot.
(2) Kummer’s definition of an ideal prime is difficult to understand and not easy to use in practice.
Also he "tr[ies] to correct the historical picture of the development of Kummer’s ideal numbers by showing that the notion of ideal numbers used by Kummer is perfectly natural, and that it is based to a large degree on ideas put forth by Jacobi in his investigations in cyclotomy. Moreover, a theory of divisibility built on these ideas is hardly more complicated than Dedekind’s approach" and he concludes by "discuss[ing] the relevance of the notion of integral closure for Kummer’s work by looking carefully at the concept of singularity in number theory and algebraic geometry."
 Franz Lemmermeyer. Jacobi and Kummer's ideal numbers.
Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg v. 79, 2, 2009, 165-187.