Roy Howard, 100, worked as an electrical engineer but only learned in the 1970s the circuits he tested were used in the first computer which cracked Nazi codes.
The centenarian was sworn to secrecy in 1939, and worked on some classified projects throughout the war.
But years later, he developed a keen interest in the work of codebreakers such as Alan Turing and the work done at Bletchley Park.
The codebreakers’ efforts were instrumental in helping British troops defeat the Nazis as it allowed them to anticipate German plans for attacks against the allies.
While reading a book about their exploits, Roy happened to recognise a circuit he had worked on which was used in Colossus, the first programmed computer.
Colossus was a computer developed by British codebreakers between 1943 and 1945 to help in the cryptanalysis of the Lorenz code.
Later in the 1960s, Roy worked with legendary engineer Tommy Flowers - who designed and built the Colossus machine - but he had not disclosed any information about the project.
He said he never knew what the circuits he tested while working for Post Office Telecommunications were for, but was proud to learn of his role in winning the war.
Roy, who lived in Leeds until retirement when the couple moved to Pocklington, said: “It was not until more than 30 years after the end of World War II before I found out about some of the work I was involved in within this period.
“When information about the work at Bletchley Park began to be published.
“I was very interested to recognise an electrical circuit that I recalled being asked to build under great secrecy.
“I now realise that it was to be for the deciphering of encrypted German military teleprinter signals using the analysis provided by what has become known as Colossus.
“I am very proud of what I did. I know it played a vital part.”
In 1939, Roy had just finished his basic engineering training and had completed a two-year course before he began working in a lab near St Paul’s Cathedral in London
He would work there for all six years of the war.
Roy was employed to test electrical equipment by carrying out point-to-point checks to examine whether it was all working correctly.
He said that some of their work was marked ‘secret’ and they were told never to talk or write about their work unless they were specifically commanded to do so.
Great grandad-of-eight Roy said: “We were young guys and we kept the secrets to ourselves for a long time.
“But we thought of it as a job we had to do. That’s it.”
The Colossus was not the only machine that Roy worked on that was instrumental in winning the war.
He recalled working for several weeks at RAF Kidbrooke in south-east London, where he worked on the communication parts of Ground Control Interception (GCI) units - highly secret radar equipment used for detecting low-flying aircrafts.
In the 1960s Roy was surprised to discover that his wife, Muriel, 98, was partially responsible for loading ships with RAF equipment such as GCI as she worked with the Air Ministry.
The pair married in August 1943, having met in London at the beginning of the war as they attended the same church.
She was an amateur actress in a play and he was doing electrical work for the amateur dramatic society, he recalled.
He added: “We just clicked like the Duke of Edinburgh and the Queen.”
They were both working in central London throughout the blitz of 1940, which he described as the ‘most frightening period’ as the city was set ablaze.
He said: “There was sadness in the loss of workmates to bombing, injuries to persons we knew, but we were the fortunate ones who lived through it all
“We just had to survive. That’s all you can think about.”
After the war, Roy continued to work in post office telecommunications in the UK and he was seconded to work in the Netherlands - where he worked for SHAPE (Supreme Headquarters of Allied Powers in Europe).
He celebrated his 100th birthday last month and enjoyed cake and drinks with his entire family - most of whom attended via video call.
He said: “In my life people have been so kind to me.
“I’m very thankful, and I’m overwhelmed quite honestly.
“I’m still very emotional. It’s not me who got to 100, it’s the people around me who got me here.”