Born of Swedish parents in Adshikent, Azerbaijan, Hagelin attended Lundsberg boarding school and later studied mechanical engineering at the Royal Institute of Technology in Stockholm, graduating in 1914. He gained experience in engineering through work in Sweden and the United States.
His father Karl Wilhelm Hagelin worked for Nobel in Baku, but the family returned to Sweden after the Russian revolution. Karl Wilhelm was an investor in Arvid Gerhard Damm's company Aktiebolaget Cryptograph, established to sell rotor machines built using Damm's 1919 patent. Boris Hagelin was placed in the firm to represent the family investment. In 1925, Hagelin took over the firm, later reorganising it as Aktiebolaget Cryptoteknik in 1932. His machines competed with Scherbius' Enigma machines, but sold rather better.
At the beginning of World War II, Hagelin moved from Sweden to Switzerland, all the way across Germany and through Berlin to Genoa, carrying the design documents for the company's latest machine, and re-established his company there (it still operates as Crypto AG in Zug). That design was small, cheap and moderately secure, and he convinced the US military to adopt it. Many tens of thousands of them were made, and Hagelin became quite wealthy as a result. Hagelin fraudulently sold compromised machines to a variety of customers. Historian David Kahn has suggested that Hagelin was the only cypher-machine maker who ever became a millionaire.
- U.S. Patent 1,846,105 (B-21)
- U.S. Patent 2,089,603 (C-35)
- U.S. Patent 2,247,170
- U.S. Patent 2,802,047
- U.S. Patent 2,851,794 (CD-57)
- U.S. Patent 3,083,263
- U.S. Patent 3,485,948
- Bengt Beckman. Codebreakers: Arne Beurling and the Swedish crypto program during World War II. Translated by Kjell-Ove Widman. Providence, RI: American Mathematical Society, c2002.
- "How NSA and GCHQ spied on the Cold War world - BBC News". Bbc.com. Retrieved 12 March 2020.
- Greg Miller (11 February 2020). "How the CIA used Crypto AG encryption devices to spy on countries for decades". Washington Post. Retrieved 12 March 2020.
- Boris CW Hagelin, The Story of the Hagelin Cryptos, Cryptologia, 18(3), July 1994, pp 204–242.