Check out @markurban.bsky.social ‘s excellent ‘The Man who Broke Napoleon’s Codes’ about George Scovell, Wellington’s code-breaker in the Peninsula. He goes into a lot of (fascinating) detail about how the French used ciphers and the British, with lots of help from Spanish Guerillas, cracked them.