Years back History channel or some such channel ran a documentary including an old Aussie bloke who said he they had broken the
IJN code, got warning of the attack a couple days in advance and he’d passed the warning on to the Yanks at Manila IIRC. I’d had it saved on VHS but managed to lose it.
The diplomatic code was broken thru a series of burglaries. The IJN cipher wad never officially broken until Coral Sea - Midway. That it was broken before Pearl is unproven historically-speaking. The fact that Enigma has been totally de-classified suggests that we know all there is to know.