The Lorenz SZ42 - known as Hitler's "unbreakable" cipher machine - is on loan to the National Museum of Computing at Bletchley Park.
Staff launched an appeal for help to recreate the vital component to allow visitors to see it in working order.
Messages from Lorenz were routinely intercepted during World War Two.
The machine was used by German forces in Norway and seized by the Norwegian secret services after the war.
It has been given to the UK on long-term loan by the Norwegian Armed Forces Museum.
It is thought about 200 were in operation during the war, but only four still exist.
The model has a number of inner components missing - including an all-important working motor.
Now, a team of engineers from the Government Communications Centre (HMGCC) has stepped in to recreate the motor using 3D printing technology.
The museum's John Whetter, who helped secure the loan of the Lorenz SZ42, said: "The HMGCC team will take three-dimensional images of an existing Lorenz motor and then reconstruct it using 3D printing techniques.
"Externally, the motor will be almost indistinguishable from an original."
The motor will allow staff to demonstrate how Bletchley Park was able to intercept German commands using the British codebreaking machine, Colossus.
The groundbreaking intelligence work carried out at Bletchley Park during World War Two was credited with bringing forward the end of the conflict.
A HMGCC spokesman said: "The wartime work at Bletchley Park, including breaking the Lorenz cipher, was instrumental in the birth of modern computing and the development of what we now call cyber security."

Officers seized the Maserati GranCabrio - a basic model of which can cost up to £100,000 new - on King's Road in Kingston on suspicion of it having no insurance.
The Met said the car was impounded and the owner would be summoned to court.
If found guilty the owner, who has not been named, faces a minimum £300 fine and six points on their licence
A Kingston Police spokesman said the driver was pulled over because officers thought the car seemed very expensive for a learner to be driving.
In March, a "gold fleet" including a Lamborghini Aventador, a Mercedes G63 6x6 and a Bentley Flying Spur were all spotted in Knightsbridge with parking tickets on their windscreens.

Simon, 29, joined the Wildcats from Catalans Dragons, and has played nine times in Super League this year.
Coach Chris Chester told BBC Radio Leeds: "It's massive and I'm really pleased that he has put pen to paper.
"He has been a stand-out player for us over the last few weeks and it's a real statement of intent from the club."

The 20-year-old has made seven senior appearances for Rovers so far in his career.
Born in Wales, he has previously had loan spells at non-league sides Taunton Town and Bath City.
One of five players offered a new deal by boss Darrell Clarke at the end of the season, Broom is the second to sign on so far, after defender James Clarke.
A team of engineers will use 3D printing technology to reconstruct the missing motor of a rare wartime German code machine.
[NEXT_CONCEPT]
A gold supercar with L-plates was seized by police in west London, leaving its driver by the roadside.
[NEXT_CONCEPT]
Wakefield Trinity Wildcats prop Mickael Simon has signed a one-year contract extension, keeping him at the club until the end of the 2017 season.
[NEXT_CONCEPT]
Bristol Rovers midfielder Ryan Broom has signed an extended contract with the League One club.