If you're interested in old Venice: Ioanna Iordanou has a book "Venice's secret service: Organising intelligence in the renaissance".
Also a paper "The Professionalization of Cryptology in Sixteenth Century Venice".
Also a paper "The Professionalization of Cryptology in Sixteenth Century Venice".
This seems to be a pattern with naval powers (ancient Athens too), but not with colonial empires