Elon Musk, Stephen Hawking, and others have been warning about the harm runaway artificial intelligence could do to humanity in the future. But another technology may pose a more imminent threat: quantum computing.

Quantum computers are straight out of science fiction. Take the “traveling salesman problem,” where a salesperson has to visit a specific set of cities, each only once, and return to the first city by the most efficient route possible. As the number of cities increases, the problem becomes exponentially complex. It would take a laptop computer 1,000 years to compute the most efficient route between 22 cities, for example. A quantum computer could do this within minutes, possibly seconds.

Unlike classic computers, in which information is represented in 0s and 1s, quantum computers rely on particles called quantum bits, or qubits. These can hold a value of 0 or 1 or both values at the same time — a superposition denoted as “0+1.” They solve problems by laying out all of the possibilities simultaneously and measuring the results. It’s equivalent to opening a combination lock by trying every possible number and sequence simultaneously.

Albert Einstein was so skeptical about entanglement, one of the other principles of quantum mechanics, that he called it “spooky action at a distance” and said it was not possible. “God does not play dice with the universe,” he argued. But, as Hawkings later wrote, God may have “a few tricks up his sleeve.”

Crazy as it may seem, IBM, Google, Microsoft, and Intel say they are getting close to making quantum computers work. IBM is already offering early versions of quantum computing as a cloud service to select clients. There is a global race between technology companies, defense contractors, universities, and governments to build advanced versions that hold the promise of solving some of the greatest mysteries of the universe — and enable the cracking open of practically every secured database in the world.

Modern-day security systems are protected with a standard encryption algorithm called RSA (named after Ron Rivest, Adi Shamir, and Leonard Adleman, the inventors). It works by finding prime factors of very large numbers, a puzzle that needs to be solved. It is easy to reduce a small number such as 15 to its prime factors (3 x 5), but factorizing numbers with a few hundred digits is extremely hard and could take days or months using conventional computers. But some quantum computers are working on these calculations too, according to IEEE Spectrum. Quantum computers could one day effectively provide a skeleton key to confidential communications, bank accounts, and password databases.

Imagine the strategic disadvantage nations would find have if their rivals were the first to build these. Those possessing the technology would be able to open every nation’s digital locks.

We don’t know how much progress governments have made, but in May 2016, IBM surprised the world with an announcement that it was making available a 5-qubit quantum computer on which researchers could run algorithms and experiments. It envisioned that quantum processors of 50 to 100 qubits would be possible in the next decade. The simultaneous computing capacity of a quantum computer increases exponentially with the number of qubits available to it, so a 50-qubit computer would exceed the capability of the top supercomputers in the world, giving it what researchers call “quantum supremacy.”

IBM delivered another surprise 18 months later with an announcement that it was upgrading the publicly available processor to 20 qubits — and it had succeeded in building an operational prototype of a 50-qubit processor, which would give it quantum supremacy. If IBM gets this one working reliably and doubles the number of qubits even once more, the resultant computing speed will increase, giving the company — and any other players with similar capacity — incredible powers.

A lot of good will come from this — better weather forecasting, financial analysis, logistical planning, the search for Earth-like planets, and drug discovery. But it could also open up a Pandora’s box for security. I don’t know of any company or government prepared for it; all should build defenses, though. They need to upgrade all computer systems that use RSA encryption — just like they upgraded them for the Y2K bug.

Security researcher Anish Mohammed told me there is substantial progress in the development of algorithms that are “quantum safe.” One promising field is matrix multiplication, which takes advantage of the techniques that allow quantum computers to analyze so much information. Another effort involves developing code-based signature schemes. Code-based signatures do not rely on factorizing as the common public key cryptography systems do but rely instead on extremely difficult problems in coding theory.

So technical solutions are at hand. But the big challenge will be transitioning today’s systems to a “post-quantum” world. The Y2K bug took years to remediate and created fear and havoc in the technology sector. For that, though, we knew what the deadline was. Here, there is no telling whether it will take five years or 10, whether companies will announce a more advanced milestone just 18 months from now, or a government has already reached the target. In the worst case, the winner may remain silent and harvest all the information available.

Vivek Wadhwa is Distinguished Fellow at Carnegie Mellon University Engineering at Silicon Valley. His most recent book, The Driver in the Driverless Car: How Our Technology Choices Will Create the Future discusses the choices we must make to build a great future.