The reality is somewhere in between of course, although I did always wonder why it took so long for the engineers' roles to be understood. The truth was quite slow to arrive, and not until the 70s did the British government allow publication of Bletchley Park's breaking of the Enigma codes, for many reasons, my favorite of which is the fact that the Brits had sold the rotor machines to their former colonies throughout the world and hoped to continue to read all their diplomatic traffic. The secret business is a set of wheels within wheels, and there is great fascination in the work of statisticians deciding which bits of intelligence to follow and which to ignore, which will show the enemy too much knowledge of our knowledge and which can be safely hidden, possibly in other obfuscating and pointless missions, and who will be allowed to be killed by enemy attack, and who will be saved.
Outside of the rarified air of Bletchley Park there were also other, lower tech operations, some chronicled in the fascinating book Between Silk and Cyanide by Leo Marks, who tells stories of encryptions in the field, used by operatives behind enemy lines, some using bits of one-time pad sewed into bits of silk parachute material, others using memorized poems, the most famous of which is his own romance The Life That I Have, perhaps made more poignant by the context, where Nazi handlers may have beaten this poem and others like it from those they captured, turning them as agents to work against the land and people they loved:
The life that I haveIs all that I haveAnd the life that I haveIs yoursThe love that I haveOf the life that I haveIs yours and yours and yours.A sleep I shall haveA rest I shall haveYet death will be but a pauseFor the peace of my yearsIn the long green grassWill be yours and yours and yours.