an introduction to quantum computing for security professionals … · an ncc group publication |...

19
An NCC Group Publication An Introduction to Quantum Computing for Security Professionals Author: Nick Dunn

Upload: others

Post on 19-Jun-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication

An Introduction to QuantumComputing for Security Professionals

Author:Nick Dunn

Page 2: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

Contents1 Introduction 3

2 Quantum Theory - A Very Brief Overview 4

3 Quantum Computing - An Overview 5

4 Architecture and Implementation 6

4.1 Qubits 7

4.2 Quantum Operations with Qubits 7

5 Hardware and Simulated Hardware 8

6 Programming Quantum Computers 9

6.1 Quantum Pseudocode 9

6.2 Getting started with Quantum Programming 10

6.2.1 Getting started with Quantum Development Kit 10

6.2.2 Google Quantum Playground 10

7 Uses of Quantum Computers 11

7.1 Cryptography 11

7.1.1 Grovers Algorithm 11

7.1.2 Shor’s Algorithm 11

7.1.3 Quantum Key Distribution 12

7.2 Financial 12

7.3 Biomedica 12

7.4 Machine Learning and Big Data 12

7.5 Optimization 12

8 Security in Quantum Computing 13

8.1 Simulated Quantum Hardware 14

8.2 Physical Quantum Hardware 15

8.3 Security and Quantum Key Exchange 15

9 Conclusions 16

10 References 17

Page 3: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

Quantum computing is still in its infancy but is expected to cause major changes to the technology landscape in coming years. Its ability to massively reduce the time taken for processes normally requiring large amounts of processing power is already causing concerns about the future of cryptography and the resistance of ciphers to cracking. In addition to its well-known cryptographic uses, quantum computing theoretically has applications in a number of areas, with the following areas being the subject of a large part of current research and debate:

• Financial

• Biomedical

• Machine learning

• Optimization

As we’ll discuss later, the areas where quantum computing offers improvements are those that could traditionally have been optimised using parallelisation.

Some unfamiliar, unusual or paradoxical concepts can be encountered in quantum theory. While reading the paper, it might be helpful to bear in mind a popular quotation, attributed to Richard Feynman:

“If you think that you understand quantum mechanics then you don’t understand quantum mechanics”

“If you think that you understand quantum mechanics then you don’t understand quantum mechanics” - Richard Feynman

1 Introduction

3

Page 4: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

In 1900, Maxwell Planck proposed a revolutionary new theory for the observed changes in electromagnetic radiation emitted from hot bodies. Classical physics provided no explanation of why light emitted from a glowing body changed from red to orange to blue as the body got hotter, or for Josiah Wedgewood’s observation that the colour changes occur at the same temperatures for all materials, regardless of their chemical composition. Planck eventually proposed a model whereby electromagnetic radiation, such as light, exists in discrete units, which he called quanta, in a similar manner to the way that matter is composed of discrete atoms. This represented a challenge to the generally held idea at the time, that light was formed of waves, and it would eventually lead to much more significant breaks with conventional thinking. Planck is often characterised as being quite conservative and this radical departure from the conventional belief that light, and other electromagnetic radiation, existed in the form of waves did not sit well with his existing ideas. To his consternation, it was arrived at as the only way for calculations to work correctly, despite his reluctance to abandon existing, accepted ideas. His reluctance to accept his own innovative idea gave birth to the phrase, often attributed to Planck, that new scientific ideas take hold when adherents to previous ideas die, not because people change their minds.

This new characterisation of electromagnetic radiation, as being made up of photons, rather than waves, led to further ramifications for classical physics when it became clear that the photons that were integral to Planck’s reluctantly derived theory did not behave in the entirely predictable manner that sits at the core of classical physics. In classical physics, the future state of any system can be predicted provided we have full

information about its present state. In contrast, quantum systems are inherently unpredictable. For a number of photons hitting a mirror or passing through a polariser, whether a photon passes through or is reflected is entirely down to chance. Two photons with exactly the same velocity (by default), the same mass (by default) and travelling along the same angle or path would not necessarily behave in exactly the same way when hitting the mirror, but have a random chance of behaving differently, possibly with one being reflected and the other passing through.

Quantum entanglement is an even stranger concept. It provides one of the aspects of quantum mechanics that seems alien to classical physics (and to common sense). For two entangled photons, whose properties are unknown, an observer may make a measurement of one of the photons. At that point, its state becomes known and both photons subsequently have the same state. The important points here are that the photons’ states are unknown and cannot be predicted before the measurement; both photons have exactly the same state instantaneously, once the measurement has happened, regardless of the physical distance between them. The simple, but counterintuitive, summary is that measurement of one entangled photon causes the state of both photons to become both known and to match each other.

It should also be made clear, that these quantum properties apply generally to subatomic particles. The above description has discussed the polarisation of photons, but could equally have applied to the spin of

electrons.

2 Quantum Theory - A Very Brief Overview

Before we discuss quantum computing, a short summary of quantum theory will be helpful. A deep understanding of quantum theory is not necessary in order to understand quantum computing, in the same way that understanding the fundamentals of electronics is not necessary in order to be a good computer programmer.

4

Page 5: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

Seminal papers in 1980 and 1981, Paul Benioff, Yuri Manin and Richard Feynman laid the foundations of quantum computing as a viable, but still theoretical, concept that was built upon by other researchers over subsequent years to form the basis of modern quantum computing. A particularly important paper, amongst these, was “Quantum theory, the Church-Turing principle and the universal quantum computer” by David Deutsch of Oxford University (1985) which resulted in a considerable increase in quantum computing research over the following years.

One of the fundamental principles discussed in these papers, and the real-world implementations which followed, was the concept of a machine’s data in an indeterminate state, a superposition of 0 and 1. The other principle features of quantum computing are entanglement, whereby two data items in an unknown state will have the same state after being measured and the use of a two-mode logic gate, XOR, rather than the wider range of logic gates used by a classical computer. These principles are discussed more fully below.

Popular stereotypes and media depictions of quantum computers depict them as being far faster, and exponentially more powerful, than classical computers. The reality is that they are only faster in certain areas, principally cryptography, database searches and certain types of optimisation and simulation. This speed, and the restricted range of applicable uses, is a result of the massive parallelism inherent in quantum computing systems. It’s also important to note that quantum computing does not represent any challenge to the Church-Turing thesis of computability. Existing models of quantum computing cannot achieve anything that a classical computer cannot, although they are able to carry out certain tasks much more efficiently and more quickly.

3 Quantum Computing - An Overview

The concept of quantum computing originated in a 1960 paper by Stephen Weisner [0], which was followed by Roman Stanislav Ingarden’s paper on “Quantum Information Theory” in 1976.

5

Page 6: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

4 Architecture and Implementation

Current implementations of quantum systems use a classical host system, which carries out the majority of business logic and flow-control processing, along with an associated quantum system that is invoked by the classical host for any quantum operations.

The diagram below [1] shows a high-level logical architecture for this model of quantum computing systems:

Microsoft provides this description [2] of such a system in its pages describing its Quantum Development Kit:

A natural model for quantum computation is to treat the quantum computer as a coprocessor, similar to that used for GPUs, FPGAs, and other adjunct processors. The primary control logic runs classical code on a classical “host” computer. When appropriate and necessary, the host program can invoke a subroutine that runs on the adjunct processor. When the subroutine completes, the host program gets access to the subroutine’s results.

This model means that mechanisms for flow control, input/output, looping, file-system access and other staple parts of classical programming are conceptually unchanged from more familiar types of system. The quantum layer of the model allows for the quantum operations involving superposition and entanglement, using the qubit to represent data.

6

Page 7: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

4.1 Qubits

The fundamental concept of quantum computing is the qubit, which is the basic unit of quantum information. Unlike a classical computing bit, has a state of 0, 1 or a coherent superposition of both values, simultaneously having the values 0 and 1 until it is measured and the value becomes known. This superposition allows a small number of qubits to rapidly crunch through vast numbers of potential outcomes, obtaining results much faster than a classical system[3][4].

4.2 Quantum Opetations with Qubits

A qubit’s ability to represent superposition and entanglement, allow it to perform quantum computing operations.

A qubit is able to represent a superposition of 1 and 0, holding both states simultaneously, prior to measurement of the state. This is representative of the quantum physics concept discussed earlier where the spin of an electron or polarisation of a photon cannot be predicted and is unknown prior to measurement. An array of qubits, all holding a superposition of 1 and 0 is able to undertake 2^n operations simultaneously, where n is the number of qubits used.

In a quantum context, entanglement describes the situation where photons, electrons, or qubits that have interacted in a certain way at some point in the past retain a type of connection. If the state of the particles is unknown, then after measurement of one particle, the other particle will have the same state. This transition in state is simultaneous, and allows qubits to ‘teleport’

information and to interact with each other over great distances.

Together, a qubit’s ability to utilise quantum superposition and entanglement allow greatly enhanced computing power for situations where parallelism offers a benefit. The benefits of speed and efficiency become apparent in any situation where massively parallel operations would improve computation speed. Where a register in a classical computer has one of two states (0 or 1), a qubit can have both states simultaneously, with an increase in the number of registers increasing the power exponentially (in the literal, mathematical sense of ‘exponential’, not the metaphorical sense used in regular conversation). For any operation in which there is a requirement to represent a number of states or iterations of data, a quantum computer is able to represent all states simultaneously, whereas a classical computer would need to iterate through them, representing each state individually.

7

Page 8: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

Existing qubit hardware, therefore, operates under environmental constraints, requiring carefully maintained temperatures and protection from electrical ‘noise’. As a result, the quantum hardware requires an environment that is isolated and controlled in a similar manner to other specialised electronic devices such as mainframes, but with even tighter levels of control and isolation required.

The D-Wave One, announced in May 2011, was the world’s first commercial quantum computer. It was superseded by the D-Wave Two and more recently by the D-Wave 2000Q, announced in January 2017. These are not general-purpose systems and are designed to solve optimisation tasks [5].

The IBM Q System One, the world’s first commercial circuit-based quantum computer, was unveiled in January 2019. This is available as a cloud service for commercial use [6][7].

There are also a number of simulated quantum computing environments available as an alternative to the true quantum hardware discussed above. These simulate quantum operations, using parallelisation to achieve the same results with conventional hardware. As previously discussed, quantum computing is intended to achieve what would otherwise require substantial classical resources and so these systems are limited in the number of qubits that they can simulate, but do allow a developer to develop, run and test quantum software.

The Q System One and the simulated systems are available as cloud implementations. This is currently a favored option, due to the significant resource requirements of the systems.

5 Hardware and Simulated Hardware

The necessity of not measuring, or affecting, the state of particles in an indeterminate state or entangled particles means that qubits must be kept in a situation where they cannot have their quantum state inadvertently modified.

8

Page 9: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

This allows a programmer to use the logical flow control, looping and decision making operations of a classical programming language, while being able to operate on both quantum data and classical data. These languages can be used on both the simulated quantum systems, discussed above, or on true quantum computers.

Some of the available languages [8] include:

Imperative languages:

• QCL – This has a similar syntax to C and allows the same program to contain classical and quantum operations

• Q|SI> - An extension of the While Language with additional quantum operations and data types

• Q language – An extension of C++ with additional classes to handle quantum operations

• qGCL – Defined by P. Zuliani in a PhD thesis, and based on Guarded Command Language created by Edsger Dijkstra

• QMASM – A specialised low-level language for quantum annealers such as the D-WaveFunctional languages:

• QFC and QPL – Two closely related languages, both originally designed and implemented by Peter Sellinger. In common with other languages listed here, they have conventional flow control methods but can handle both classical and quantum data

• QML – A Haskell-like langiage that can also

perform quantum operations

• LIQUi|> (pronounced liquid) – This is a quantum simulation extension to the F# languageMulti-Paradigm languages:

• Q# – A language similar to C#, but with additional data types and operations for qubits. It is part of the Visual Studio Quantum Development Kit

• Strawberry Fields – A full stack, open source language for photonic quantum computers

6.1 Quantum Pseudocode

Pseudocode for quantum systems has a number of differences from regular pseudocode which mainly cover the additional needs of representing operations and data types that are not present in classical systems [9].

6.2 Getting Started with Quantum Programming

It is possible to learn and experiment with quantum computing by choosing a free and accessible environment that allows application development and access to a simulated quantum computing environment. Two that are relatively mature, accessible and currently free are Microsoft’s Quantum Development Kit and Google Quantum Playground.

6 Programming Quantum Computers

A number of programming languages exist for quantum computing, providing additional data types and operations to deal with the special properties of qubits and their behaviours.

9

Page 10: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

6.2.1 Microsoft Quantum Development Kit

Microsoft’s Quantum Development Kit allows a developer to write and test quantum applications. It is an extension of Visual Studio and includes the Q# language along with packages to handle quantum data types and quantum simulators [10].

Microsoft’s Q# language has a very similar syntax to C#, but has additional data types and functions to handle qubits and their behaviour. This minimises any additional learning and cognitive load for a programmer already familiar with C#. In keeping with the model of a quantum layer and classical layer, Q# projects are made up a quantum component written in Q# and a classical component written in C#, with both languages and components co-existing in the same .NET project.

In addition, there are useful tutorials on the web and code samples on GitHub to help a user to get started [11][12]. These allow a developer to explore fundamental concepts such as superposition and entanglement with qubits. The Q# code to the right is an excerpt from one of the online tutorials [13] and is a demonstration of Bell State entanglement (a Bell State is the simplest representation of quantum entanglement for two qubits [14]).

The code below should give a clearer idea of how to use qubit data types and operations in Q# code. Note that this Q# code handles only the quantum operations and further C# code is needed for the classical flow control

operations (see the online tutorial for further details).

6.2.2 Google Quantum Playground

Google Quantum Playground [15] is currently free to use and allows a developer to experiment with simulated quantum hardware of up to 22 qubits, which is adequate for running Grover’s algorithm and Shor’s algorithm.

It has a scripting language that includes quantum data types, operations and gates. The website also includes a number of examples that can be used to run Shor’s algorithm and Grover’s algorithm.

namespace Quantum.Bell{ open Microsoft.Quantum.Intrinsic; open Microsoft.Quantum.Canon;

operation Set (desired: Result, q1: Qubit) : Unit { //Setthestateofthespecifiedqubit if (desired != M(q1)) { X(q1); } }

operation BellTest (count : Int, initial: Result) : (Int,Int, Int) { // Measure the state of a range of qubits and return the results mutable numOnes = 0; mutable agree = 0;

using ((q0, q1) = (Qubit(), Qubit())) {

// Iterate through the qubits for (test in 1..count) {

Set (initial, q0); Set (Zero, q1);

H(q0); CNOT(q0,q1); let res = M (q0);

if (M (q1) == res) { set agree += 1; }

// Count the number of ‘ones’ that were seen if (res == One) { set numOnes += 1; } } Set(Zero, q0); Set(Zero, q1); }

// Return number of times we saw a |0> and number of times we saw a |1> return (count-numOnes, numOnes, agree); }}

10

Page 11: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

The applications discussed below are proposed uses that are currently being researched or prepared for commercial use. At the time of writing, it is unclear how many of them will turn out to be practical or commercially viable.

7.1 Cryptography

Quantum computing has applications in two separate areas of cryptography. In cryptanalysis, it offers to revolutionise the cracking of conventional asymmetric ciphers (or at least the ones currently in use), while in the area of encryption, it is able to provide a method of secure key exchange for conventional symmetric ciphers.

The vulnerability of public-key, or asymmetric, cryptography to the quantum algorithms discussed below, is a consequence of currently used algorithms reliance upon the difficulty of factorisation of large numbers with current computing power. While all of the public-key ciphers used by current web browsers are vulnerable to attack by quantum algorithms, there are types of public-key cryptography algorithms that are not vulnerable but are yet to be implemented in commercial systems. This field is generally referred to as post-quantum cryptography and has become an area of increasing interest as the prospect of working, affordable quantum computers comes within reach [24].

In addition to secure communication, some blockchain implementations (including BitCoin) are dependent on elliptic curve cryptography, along with hashes such as SHA256 and RIPEMD-160. These are all vulnerable to quantum computing attacks using Shaw’s and Grover’s algorithms, and also at risk in the event that quantum

computing becomes more easily available [25].

7.1.1 Grovers Algorithm

Grover’s algorithm is described by Wikipedia [16] as follows:

Grover’s algorithm is a quantum algorithm that finds with high probability the unique input to a black box function that produces a particular output value, using just O(√N) evaluations of the function, where N is the size of the function’s domain. It was devised by Lov Grover in 1996.

Although it is often described as a database search algorithm, Grover’s algorithm can also be described as inverting a function. As a result, it has uses in a security context, due to its potential for reversing cryptographic hash functions.

7.1.2 Shor’s Algorithm

Shor’s algorithm is described by Wikipedia [17] as follows:

Shor’s algorithm is a quantum computer algorithm for integer factorization. Informally, it solves the following problem: Given an integer N, find its prime factors. It was invented in 1994 by the American mathematician Peter Shor.

Shor’s algorithm runs in polynomial time, O(log(N)). This has applications in cryptanalysis, since an absence of rapid factorisation for large numbers is the underpinning of the types of public key cryptography

7 Uses of Quantum Computers

As discussed earlier, there are a number of areas in which the massive parallelisation and the entanglement properties of qubits allow quantum computers to significantly outperform classical computers.

11

Page 12: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

currently used by all web browsers. Public key ciphers that are not vulnerable to these attacks do exist and it’s possible that these will supersede existing web browser ciphers as and when quantum cryptanalysis becomes more widespread and readily available.

7.1.3 Quantum Key Distribution

Quantum key distribution [18], popularly but inaccurately referred to as quantum cryptography, aims to securely generate a cryptographic key that can be exchanged without being compromised by a man in the middle attack. It relies on the random nature of the spin of a particle and the key aspect of quantum mechanics that measuring a quantum system also disturbs the quantum system. It is used only to distribute the key, not the message data, and this key is subsequently used in conjunction

with a conventional symmetric encryption algorithm.

7.2 Financial

Quantum computing has applications in complex financial modelling and risk management. The current hardware costs restricts the use to the technology to situations where there will be a substantial return, although the financial sector already spends considerable sums on computing power.

The work done so far with quantum computing in the financial sector so far has included research into research redefinition and modification of trading strategies, optimisation of portfolio management, asset pricing and risk analysis. The Nomura bank in Japan has begun work on the use of quantum systems in combination with machine learning in order to select optimised portfolios in order to maximise returns [22].

JPMorgan Chase and Barclays are members of IBM’s Q Connect, working towards a cloud computing quantum system and researching its uses [23]. Constantin Gonciulea, JPMorgan Chase’s senior engineer and quantum project lead, has discussed research into risk analysis in terms of both investment and information security, follows:

“Fund managers have to choose among an infinite number of investment combinations for their portfolios, based on the level of risk they want to take. Imagine if they had a computer that could detect potential risk – based on their appetite for risk – within seconds of the change taking place in a particular market.”

“JPMorgan Chase has thousands of employees who detect fraud as part of their job. The application of quantum computing to the assessment of potential

fraudulent payments… would be very beneficial for our merchant services clients.”

7.3 Biomedical

Simulation and modelling of molecular structures is a part of pharmaceutical development. Quantum computing has been applied to resource-intensive problems such as modelling protein folds [19] and has potential for creation of new pharmaceuticals.

7.4 Machine Learning and Big Data

The use of machine learning to classify items in large data sets and to recognise patterns in large data sets is currently held back by a lack of computing power, rather than a lack of data. Quantum computing is, at least theoretically, suited to the task and the area is currently a subject of research by academics and commercial organisations. Principal expected uses are in the areas of developing new pharmaceuticals and in the analysis of consumer behavior and financial markets [20].

7.5 Optimization

Quantum computing’s theoretical uses in the area of optimization are an example of its potential to solve currently intractable problems depending on having a quantum machine with enough qubits for each input. Such a machine would take a short time to produce an answer, compared to a classical machine.The class of problems of most interest in this area is known as bounded-error quantum polynomial time, and is the class of problems solvable by a quantum

computer in polynomial time [21].

12

Page 13: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

8 Security in Quantum Computing

When discussing system architecture and implementation earlier, quantum computer systems were described has having two distinct and equally necessary parts, the classical layer and the quantum layer.

The necessity of cooperation between the quantum layer and the classical layer means that the integrated system is vulnerable to many, or all, of the same attacks that would be used against a classical system.

In addition to some of the threats that a classical computing system would be exposed to, quantum computing systems are also exposed to an additional set of more specialised threats and, of course, the communication channels which exist between the two layers create the potential for further threats by increasing the complexity and, by extension, increasing the attack surface.This situation can be seen as analogous to IoT, medical device and machine learning systems, where the necessity of interoperability with traditional computing systems creates additional trust boundaries and presents the familiar attack surface associated with the desktop and server applications, alongside specialised threats particular to the interfaced system and the nature of its communication.

The diagram below shows a high-level logical architecture for a generic quantum computing system [1]:

13

Page 14: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

From the logical architecture above, we can construct a high-level data flow, for the purposes of threat modelling:

As discussed earlier, we can see from the architecture diagram, and the resulting data flow diagram, that this com-puting model involves a number of trust boundaries and several distinct systems affecting each other’s behaviours. As in any situation made up of separate distributed components, the security of APIs and their associated transport mechanisms is of key importance.

The classical systems, including APIs and communication channels, should be viewed as part of the attack surface and vulnerable to the following STRIDE threats:

1. Spoofing – Spoofing of input and output data from individual components and APIs2. Tampering – Modifying input and output from/to APIs and files3. Repudiation – Inadequate logging, carrying out acts without authorisation4. Information Disclosure – Access of files and APIs without authorisation, verbose error messages5. Denial of Service – Flooding of channels, modification of inputs to cause excessive resource consumption6. Elevation of Privilege – Impersonation of users on host system or through vulnerabilities in APIs, etc.Besides the STRIDE threats that affect the associated classical systems, there are some additional threats that are specific to quantum hardware and its implementations. These differ for true, physical quantum computers and for simulated quantum computers, and are discussed separately below.

8.1 Simulated Quantum Hardware

Simulated quantum hardware is, of course, software written to simulate a physical quantum computing system. An immediate concern is whether this software has been correctly, and safely, designed and coded. Software errors within the implementation could introduce various classical software vulnerabilities including, but not restricted to buffer overflows, memory leaks, poor file handling and unsafe encryption.

Simulated quantum systems are generally available as cloud services, a principal reason for their existence being the hardware demands of simulating quantum operations. As a result, the typical threats that we would see present across any generic cloud service such as insecure APIs, compromise of GPUs in the cloud, shared tenancy issues and compromised passwords.

As we discussed earlier, one of the advantages offered by quantum computers is their ability to carry out operations which would require a large scale of processing power and parallelisation if carried out by a classical computer. Current systems which simulate quantum computing on classical hardware require 16TB of memory to simulate 40 qubits. As a consequence, any attack which deliberately causes a system to create unnecessary qubits or to carry out excessive operations on qubits can have an asymmetric DoS effect.

14

Page 15: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

8.2 Physical Quantum Hardware

There are other threats specific to physical quantum hardware, that are absent from simulated quantum hardware. Environmental control is key to the correct and stable operation of a physical (i.e. non-simulated) quantum system. Attacks against the external controls that monitor and regulate the environment are conceivable, in a manner similar to the Stuxnet attack against Siemens devices used in Uranium refinement in 2010. An attacker could target these systems in order to cause the following scenarios:

1. Disrupting environment settings to cause incorrect functioning of qubits

2. Causing environment monitoring software to mis-report the state of the environment:

a. Report correct and stable settings when temperatures or other settings are actually incorrect

b. Report incorrect settings when temperature and environment is actually correct and stable

3. Cause rapid temperature or environment fluctuation to damage hardwareThe above attacks could be carried out in order to disrupt operations by causing correct answers to be classed as incorrect and vice versa. There is also potential for causing the target organisation to incur excessive costs by inducing repeated or excessive operations to be carried out by the hardware, by causing unnecessary maintenance or by causing physical damage to hardware.

8.3 Security and Quantum Key Exchange

Quantum key exchange presents its own security issues and like many secure channel implementations, it is dependent upon certain configurations and best practices being in place.

The following requirements are necessary to allow the secure functioning of quantum key distribution:

1. A separate method/channel to communicate the results, which needs to be secured in some way. Authenticated but not necessarily private/encrypted.

2. The polarisation settings used by both parties must be secret prior to, and during, the exchange.

3. The polarisation settings used by both parties must not be predictable. They don’t need to use the same

method to randomise their choices, but it does need to be genuinely random in a cryptographic sense.

4. A man-in-the-middle attack will either be successful or cause a DoS. The first is highly unlikely and the other becomes more unlikely the longer the key.

5. A DoS condition can arise from an unsuccessful interception attempt or from corruption or degradation of the signal sent over the fibre-optic link. This necessitates the availability of the following backup channels:

a. Multiple fibre-optic channels for resubmission of sets of photons.

b. A secure non-quantum channel to use in place of the non-functioning quantum channel.

6. The implementation must behave in a theoretically correct way. All the above is correct for quantum mechanics behaving as it’s meant to, and like many other things, a badly constructed implementation could behave in an unexpected manner (although this may sound like a get-out clause, the entire idea depends on photons behaving exactly as they should in theory).

An attacker would need to do the following, in order to successfully compromise the system. Some of these actions are much harder to achieve than others:

1. Intercept the fibre-optic channel.

2. Set the attacker’s polarising filter to match a filter at one end of the channel for each submission. The attacker would need to match the basis and the polarisation in any situation where both parties have the same settings (this is unlikely and becomes increasingly unlikely to the point of impossible as the number of submissions increases).

3. Intercept the non-quantum communication channel(s) and successfully read the associated data.

Based on the difficulty of achieving the above conditions, the method is an expensive but very effective collection of defences for key exchange, rather than a silver bullet or an absolute guarantee of security. The massive improbability of achieving item; (2) in the list above, makes a man-in-the-middle attack almost impossible to all intents and purposes, but it’s analogous to defence-in-depth or layered defence for a key exchange.

15

Page 16: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

9 ConclusionAlthough still in its early days, quantum computing offers the potential of major benefits in terms of solving certain types of problems significantly faster than conventional hardware. The principal disadvantages are the cost and resource usage, that some problems do not lend themselves to a quantum solution, and that many of the practical applications are currently theoretical. If the resources invested into quantum computing begin to bear fruit then we can expect to see wider adoption and considerable changes to the computing landscape in the future.

When bringing a new product to market, there is a risk that security becomes an afterthought, with features and functionality being prioritised. As with any new technology, there is an additional risk of new and unforeseen security issues in both the design and implementation. When designing and implementing these systems it is important to consider security from the outset and to ensure suitable security is in place for both the quantum system and the classical systems with which it interacts.

16

Page 17: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

10 References & further reading

[0] https://www.newscientist.com/article/2217347-google-claims-it-has-finally-reached-quantum-supremacy/

[1] https://www.researchgate.net/figure/Architecture-of-quantum-computing-platform_fig1_323904792

[2] https://docs.microsoft.com/en-us/quantum/language/?view=qsharp-preview

[3] https://en.wikipedia.org/wiki/Qubit

https://www.scientificamerican.com/article/how-close-are-we-really-to-building-a-quantum-computer/

[4] https://en.wikipedia.org/wiki/Qubit

https://www.scientificamerican.com/article/how-close-are-we-really-to-building-a-quantum-computer/

[5] https://www.dwavesys.com/press-releases/d-wave%C2%A0announces%C2%A0d-wave-2000q-quantum-computer-and-first-system-order

[6] https://en.wikipedia.org/wiki/IBM_Q_System_One

[7] https://newsroom.ibm.com/2019-01-08-IBM-Unveils-Worlds-First-Integrated-Quantum-Computing-System-for-Commercial-Use

[8] https://en.wikipedia.org/wiki/Quantum_programming

[9] https://digital.library.unt.edu/ark:/67531/metadc687305/m2/1/high_res_d/366453.pdf

[10] https://docs.microsoft.com/en-us/quantum/?view=qsharp-preview

[11] https://www.youtube.com/watch?v=v7b4J2INq9c

[12] https://github.com/Microsoft/Quantum

[13] https://docs.microsoft.com/en-us/quantum/quickstart?tabs=tabid-vs2017&view=qsharp-preview

[14] https://en.wikipedia.org/wiki/Bell_state

[15] http://www.quantumplayground.net/#/home

[16] https://en.wikipedia.org/wiki/Grover%27s_algorithm

[17] https://en.wikipedia.org/wiki/Shor%27s_algorithm

[18] https://en.wikipedia.org/wiki/Quantum_key_distribution

[19] http://blogs.nature.com/news/2012/08/d-wave-quantum-computer-solves-protein-folding-problem.html

[20] https://devops.com/4-amazing-quantum-computing-applications/

[21] https://en.wikipedia.org/wiki/BQP

[22] http://www.campdenfb.com/article/quantum-revolution-decrypting-family-business-potential-quantum-computing

[23] https://eandt.theiet.org/content/articles/2019/04/quantum-on-the-money-fintech-is-banking-on-the-future-of-computing/

[24] https://www.nccgroup.trust/uk/our-research/post-quantum-cryptography-overview/

[25] https://www.nccgroup.trust/uk/our-research/distributed-ledger-blockchain-security-and-quantum-computing-implications/

Quantum Computing Josef Gruska (McGraw, 2000)

Threat Modeling: Designing for Security Adam Shostack (Wiley, 2014)

17

Page 18: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals

About the Author

Nick Dunn is a security consultant with 12 years of experience covering network infrastructure, mobile devices, code review, web applications and thick client applications. Prior experience as secure software developer in the financial sector.

Creator of NCC Machine Learning Threat Model Template.Developer of VCG, an open source code security scanner. Developer of internal NCC scanning and exploitation tools.

Page 19: An Introduction to Quantum Computing for Security Professionals … · An NCC Group Publication | An Introduction to Quantum Computing for Security Professionals Contents 1 Introduction3

About NCC Group

NCC Group is a global expert in cyber security and risk mitigation, working with businesses to protect their brand, value and reputation against the ever-evolving threat landscape.

Through a unique range of services, the company helps businesses to prepare for and respond to cyber threats. It provides organisations with freedom from doubt that their most important assets are protected and operational at all times.

NCC Group is passionate about making the Internet safer and revolutionising the way in which organisations think about cyber security.

+44 (0) 161 209 5200 [email protected] www.nccgroup.trust

For more information from NCC Group, please contact: