BUCHAREST (Reuters) - Someone in Romania thought he’d made a fair amount of money when he sold an old typewriter for 100 euros at a flea market. He was wrong. 
 
 The “typewriter” was, in fact, a German Wehrmacht Enigma I, a World War Two cipher machine, and the collector who bought it put it up for sale at the Bucharest auction house Artmark with a starting price of 9,000 euros ($10,300) (www.artmark.ro). On Tuesday, Artmark sold it to an online bidder for 45,000 euros. 
 
 “The collector bought it from a flea market. He’s a cryptography professor and ... he knew very well what he was buying,” Cristian Gavrila, the collectible consignment manager at Artmark, told Reuters. 
 
 Romania was an ally of Nazi Germany until 1944, when it switched sides to the allies. Historians say it may host many other cryptographic machines not yet discovered. 
 
 Last month, Christie's New York Books set a world auction record of $547,500 with its sale of a "four-rotor Enigma cipher machine, 1944," to an online bidder. (here 
 
 The Enigma was used to encode and decode messages sent by the various branches of the Nazi military, but the British mathematician Alan Turing and his team at Britain’s wartime codebreaking center, Bletchley Park, cracked the codes. By some estimates, their work shortened the war by two years. ||||| (CNN) A rare Enigma machine used by Nazi Germany during World War II was sold at auction Tuesday for 45,000 euros ($51,500). 
 
 The collector who put the machine up for sale at the Artmark auction house in Bucharest, Romania, had spotted it at a flea market in the city and bought it for just 100 euros ($114). 
 
 Vitally important to Nazi war efforts, the Enigma machine was used by the German military to encrypt messages into a form they believed was unbreakable. 
 
 But the code was cracked by a team of cryptologists at Bletchley Park in southern England -- a breakthrough widely credited with having shortened the war by at least two years. 
 
 The instrument sold Tuesday -- to an unnamed online bidder -- was made in Germany in 1941 and is in almost perfect condition, Vlad Georgescu, relationship manager at Artmark, told CNN. 
 
 Enigma machines were used by the German military during World War II to encrypt messages. ||||| For codebreakers with the allied forces, it was more important a discovery than the Enigma machine, offering encryption for the Nazi command that, when cracked, would hasten the end of the second world war and lead to huge breakthroughs in modern computing. 
 
 
 
 Less than 80 years later, for a thrifty woman in Essex, the “telegram machine�? was little more than a dusty old gadget languishing in the garden shed. 
 
 But after an eagle-eyed volunteer with the National Museum of Computing (NMC) spotted an ad on eBay this week, the extremely rare, military-issue Lorenz teleprinter has been saved and provides the latest piece in international efforts to rebuild Hitler’s complete encoding device. 
 
 After finding the component on the online auction site, and receiving a long-term loan of the Lorenz SZ42 cipher machine from the Norwegian Armed Forces Museum in Oslo, the NMC is now looking for the final parts to restore the encoder to working order. 
 
 Rare Nazi Enigma machine sold at auction for world record $365,000 Read more 
 
 “To do that we have to replace some missing components, in particular the drive motor – and it’s the drive motor that’s our next quest,�? said John Whetter, a volunteer engineer with the NMC. 
 
 Whetter and his colleagues are calling for people across the country to search their sheds and attics for the device, which looks like a small rugby ball with spindles poking out of either end. 
 
 It was just such a coincidence that led to the museum getting its hands on their Lorenz teleprinter, after they spotted it for sale. “I think it was described as a telegram machine, but we recognised it as a Lorenz teleprinter,�? Whetter said. 
 
 They rang the seller and drove to down to Essex to take a look for themselves. “The person took us down the garden to the shed and in the shed was the Lorenz teleprinter in its original carrying case,�? Whetter said. They snapped it up for £9.50. 
 
 But the true value of their purchase was yet to become clear. It was only after cleaning the machine at Bletchley Park, where the museum is based, that they found it was a genuine military issue teleprinter, complete with swastika detailing and even a special key for the runic Waffen-SS insignia. 
 
 Together with the cipher machine from Norway, the teleprinter almost completes the museum’s set of encryption, interception and decryption equipment, which will allow them to tell from beginning to end the tale of how the allies broke Germany’s secret codes. 
 
 Having heard the story of the teleprinter’s discovery on the BBC on Sunday, two former pupils of a school in Finchley, north London, have raised hopes of finding the drive motor. One said he would never forget seeing one on a cabinet in the the headmaster’s office while he was being caned. 
 
 Another said there had been a Lorenz machine in the head’s classroom. The NMC is chasing down the leads. 
 
 More complex than the famous Enigma code, the Lorenz cipher could be broken only thanks to the mathematician Bill Tutte, who deduced the architecture of a Lorenz machine without ever having seen one. 
 
 Solving the problem also led to the creation of Colossus, the world’s first programmable computer, which Tommy Flowers, a Post Office engineer, invented to work out the wheel positions on the Lorenz encryption machine and reduce the time taken to decrypt messages from weeks to hours. 
 
 The decoding of the top-secret Lorenz messages is credited with shortening the war and saving countless lives. “It was the highest possible level of security used by the German high command,�? Whetter said. 
 
 It was thanks to the breakthroughs by Tutte and Flowers that allied commanders could be certain Hitler’s high command had bought their bluff that the D-Day invasion force would be landing at Calais, rather than on the beaches of Normandy. 
 
 The museum is hoping to recreate the encryption and decryption process at a special event on Friday.
– It was a world-class stroke of good luck. An antique "typewriter" snapped up by an eagle-eyed expert in Romania for about $114 at a flea market turned out to be a rare Nazi Enigma cipher machine, CNN reports. The German Wehrmacht Enigma I sold for $51,500 to an anonymous bidder at an auction in Bucharest on Tuesday. During World War II, the German military used the machine to encrypt and decrypt sensitive messages. Depicted in the 2014 movie Imitation Game, dogged English cryptologists at Bletchley Park cracked the code, which the Germans believed unbreakable. Their work was said to have shortened the war by two years. The collector who spotted the rare machine was a cryptography professor who "knew very well what he was buying," Cristian Gavrila of Artmark auction house tells Reuters. Alas, the flea market seller, who thought it an ordinary old typewriter, did not. Romania was an ally of the Nazis until 1944, and historians believe there may be more Enigmas lying undiscovered in attics there. Thousands of machines were produced but very few have come up for sale, per CNN. But the latest sale isn't the biggest by far: A 1944 Enigma machine sold at Christie's New York last month for a record $547,500. Before that, an Enigma machine featured in the 2001 Kate Winslet film Enigma sold in London for $208,137. (Adolf Hitler's purported red phone sold for $243,000.)