Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
The mapping $\psi$ is not always injective as it may happen that $G$ has outer automorphisms which induce the identity permutation on the set of conjugacy classes. The smallest group where this happens has order 32 -- see e.g. here.
@LevBorisov Using quadratic reciprocity and the chinese remainder theorem, it should be straightforward to find a prime $p$ with given quadratic residues and -nonresidues (finding the smallest though may not be easy). In contrast, for primitive roots, I don't see how quadratic reciprocity would help much.