Was the tension with Japan so high already that they knew it was them and only them? Were the plane types and markings such common knowledge amongst the armed forces stationed there that they recognised who was attacking them? Or was it simply that Japan sent a declaration of war straight after it happened?
There were only very few other navies who could have pulled it off at the time, in addition to yes, the plane types and markings. More can be said if anyone else would like to address the question; for the meantime, I commend to your attention just this question, with answers from u/jschooltiger and u/QuickSpore.