The Western Allies, in World War II, ran the most successful intelligence effort in history. They did well against the Japanese, frequently making partial decrypts of JN-25, the main fleet code, along with lots of useful traffic analysis, etc. They did better still against the Germans: most of the regime’s operational orders were sent using the Enigma coding machine, and by 1942 the Allies were routinely decoding three-rotor Enigma messages, used by the German Army and the Luftwaffe, the same day. They not only knew which cards the Germans were holding – they usually knew what the Germans were thinking about those cards.
The modern consensus is that breaking Enigma shortened the war by at least a year.
Although a number of highly-placed people knew the story, some because they had been personally involved during WWII, the successful decryption of Enigma was kept secret until 1974, when F. W. Winterbotham published The Ultra Secret.
Most historians didn’t know about it. Without that information, the course of World War II can’t really have made sense. Why didn’t anyone notice?