On the basis of cryptanalysis he helped to break both the Enigma machine and the Lorenz SZ 40\/42 ( a teletype cipher attachment codenamed `` Tunny '' by the British ) , and was , for a time , head of Hut 8 , the section responsible for reading German naval signals .
Building on cryptanalysis work carried out in Poland by Marian Rejewski , Jerzy RÃ Å 1\/4 ycki and Henryk Zygalski from Cipher Bureau before the war , he contributed several insights into breaking both the Enigma machine and the Lorenz SZ 40\/42 ( a Teleprinter ( Teletype ) cipher attachment codenamed Tunny by the British ) , and was , for a time , head of Hut 8 , the section responsible for reading German naval signals .