We analyze complex multiplication for Jacobians of curves of genus 3, as well as the resulting Shimura class groups and their subgroups corresponding to Galois conjugation over the reflex field. We combine our results with numerical methods to find CM fields for which there exist both hyperelliptic and non-hyperelliptic curves whose Jacobian have maximal complex multiplication. More precisely, we find all sextic CM fields in the LMFDB data base for which (heuristically) Jacobians of both types exist. There turn out to be 14 such fields among the 547,156 sextic CM fields that the LMFDB contains. This supports the conjecture that the list of CM fields of this kind is finite. We show some cryptographic applications on the hardness of the discrete logarithm problem for genus 3 hyperelliptic curves. This is joint work with Bogdan Dina and Jeroen Sijsling.