1 Introduction

Quantum cryptography [1], also known as quantum encryption, makes use of quantum mechanics principles to encrypt messages so that no one other than the intended receiver can read them. Quantum cryptography varies from conventional cryptography systems in that physics plays a fundamental role in its security concept whereas in conventional cryptography, mathematics plays a key role. Quantum cryptography depends on the utilization of photons and their integral quantum properties to produce an cryptosystem that is unbreakable—principally since any system’s quantum state cannot be measured without disrupting it. They're the data carriers of optical fiber cables, which are used for extremely high-bandwidth communications as a reliable medium. According to the fundamentals of quantum physics, observing a quantum state causes disturbance. Any eavesdropper attempting to track the transmitted photons will cause the transmission to be interrupted thanks to the various QKD mechanisms. This interference will cause transmission failures that authorized users will be able to identify. This is used to ensure that the distributed keys are secure. Quantum computers are quickly evolving, with the potential to provide major computer science capabilities capable of handling a wide range of critical, even life-saving, computing problems that regular computers cannot. Regrettably, Quantum computers can create new dangers at an unprecedented pace and scale. Hackers that use quantum computing as part of their attack arsenal will be able to quickly decipher today's encryption methods. Some types of computing issues will be much easier to tackle with this technology than with today's traditional computers. Quantum computing poses two threats, which will be addressed using two pillars. There is a need to develop classical algorithms that can survive quantum computers in the first place. In computing, these algorithms are referred to as post-quantum algorithms.

1.1 Quantum Versus Conventional Cryptography

In conventional cryptography [2], the original text is encrypted to ciphertext, which is then sent through a channel controlled by a key data string. Only if the receiver has this key will he be able to retrieve the original information and understand the original text. There are two primary techniques in classical cryptography: symmetric and asymmetric cryptography. Algorithms like AES, Triple DES and Blowfish algorithm are used as convolutional cryptographic algorithms.

Among the most popular and commonly used symmetric block cypher algorithms is the Advanced Encryption Standard (AES) algorithm [3]. This method, which is used worldwide in hardware and software, has a unique structure that makes it ideal for encrypting and decrypting sensitive data. Three distinct key sizes—AES 128, 192, and 256 bit—can be handled by AES, and each of these cyphers has a 128 bit block size. Without creating a completely new cryptosystem, the Triple Data Encryption Standard (3DES) algorithm [4] was created to overcome the blatant vulnerabilities in DES. The 56-bit key used by the Data Encryption Standard (DES) is regarded as insufficient to secure sensitive data. 3- DES simply increases the DES key size by running the algorithm three times consecutively with three distinct keys. Thus, 168 bits make up the total key size. A symmetric block cypher that employs the Feistel network, simple encryption and 16 iterations of decryption is called the blowfish algorithm [5]. There are many benefits to each Feistel structure, especially in hardware. The only prerequisite for decrypting the cypher text is to flip the key schedule. Quantum algorithms, on the other hand, pose a danger to existing cryptography systems. The Grover algorithm, another quantum technique, is capable of breaking symmetric cryptography. The famous Shor algorithm, for example, can decrypt asymmetric cryptography schemes like RSA and Elliptic Curve.

While Quantum cryptography makes use of quantum mechanics to safeguard key exchanges. Furthermore, weak random key generators, advancements in CPU power, new attack techniques, and the development of quantum computers all challenge the security of traditional encryption. Such encryption is rendered worthless in the case of quantum computers in particular. Data that is encrypted today can be intercepted and saved in the future for decryption by quantum computers. The benefits of quantum cryptography include "unconditional security" and sniffer detection. These features may be useful in addressing cyberspace security issues for the future internet and applications like the internet of things and smart cities.

The 127-qubit Eagle processors are the latest addition to IBM Quantum's systems, which also have 27-qubit Falcon and 65-qubit Hummingbird processors. Eagle, a 127-qubit quantum processor from IBM Quantum, is based on the transmon superconducting qubit architecture. In general, we use three measures to compare our three major performance qualities across these devices: Measure scale in terms of the number of qubits, quality in terms of quantum volume, and speed in terms of CLOPS, or circuit layer operations per second. For superconducting quantum computers, "classical crosstalk" is a significant source of errors. The major contribution of this paper is given as follows;

  • QKD is integrated with classical cryptography algorithms it increases the security in transmitting data to a high level

  • Quantum key distribution (QKD) allows users to safely exchange conventional keys, which can then be utilized for secure communication.

  • Key distillation procedures is used for bit error estimation.

  • The Cascade technique is used to identify and fix all key transmission defects in noisy quantum channels.

  • QKD using BB84 protocol is implemented using Python packages like QuTip. The BB84 protocol is compared with different implementation platforms like C++ Sim and OMNeT++ .

The remaining section of this research is demonstrated as follows. The quantum Key Distribution using BB84 is explained in Sect. 2. A comparison of Quantum cryptography protocols is explained in Sect. 3. Other Methods for secret key Exchange is discussed in Sect. 4. The performance outcome and their analysis are provided in Sect. 5. Section 6 encloses Conclusions.

2 Quantum Key Distribution (QKD) Using BB84 Protocol

Instead of encrypting data, quantum key distribution allows users to safely exchange conventional keys, which can then be utilized for secure communication. QKD [6] is a technique for transmitting secret keys that relies on some unusual subatomic particle characteristics and is, at least in theory, entirely unhackable. One at a time, photons are transmitted across a fiber optic wire in the land-based form of QKD. If someone is listening in, the polarization of the photons is changed, and the recipient may determine that the message isn't secure, according to quantum physics principles. Quantum key distribution (QKD) employs quantum mechanics to provide safe transmissions by allowing users to securely exchange keys to one another and enabling encrypted communication that can’t be deciphered by malicious eavesdroppers. QKD protects communications but does not encrypt the information sent. QKD systems allow two linked parties to communicate securely using a stream of photons (light particles) to transmit the data and private key.

2.1 Qubits

Qubits [7], or quantum bits, are used in quantum computers. The qubit’s state can be denoted as a vector \(\left| \psi \right.\) (Fig. 1)

$$\left| \psi \right. = y\left| 0 \right. + z\left| 1 \right. ,\, y,\, z \epsilon C \left| y \right|^{2} + \left| z \right|^{2} = 1 $$
(1)
Fig. 1
figure 1

Bloch sphere representation of a Qubit

A qubit is in one of two states: \(\left| 0 \right.\) or \(\left| {1 } \right.\) or in a superposition of the two states, i.e., y \(\left| 0 \right.\) + z \(\left| 1 \right.\). A qubit is said to be pure if it is in one of two states \(\left| {0 } \right.\) or \(\left| 1 \right.\).We call it a superposition of the pure states \(\left| 0 \right.\) and \(\left| 1 \right.\) if it isn’t otherwise.

2.2 The Working Process of QKD

To exchange a secret key in the BB84 protocol [8], Alice and Bob must do the following:

Assume that Alice and Bob need to transmit information in secret to each other. Alice begins the communication by sending Bob a secret key that will be used to encrypt the data. This secret key is a series of random bits conveyed by using a specific type of scheme in which two distinct beginning values can be used to represent the same binary value (0 or 1). Alice and Bob decide to encrypt their discussion with QKD. Bob must read a sequence of polarized photons transmitted by Alice using a series of filters over a fiber-optic connection, which he must measure using two distinct types of filters. Consider that this secret key is a single-direction stream of photons, with each photon particle encoding a single data bit (either a 1 or 0).

However, these photons are oscillating (vibrating) in some way in addition to their linear trip. The photon's polarization refers to the angle at which it vibrates. Now, let’s add a polarizer to the solution. A polarizer is just a filter that permits some photons to travel through in the oscillation state which is similar to before while permitting other photons to travel through a different oscillation state (it can also entirely block some photons, but that's a topic for another time). Alice is equipped with a polarizer that allows her to send photons in any of the four states: Horizontal, backward-facing diagonal, Vertical, and forward-facing diagonal. A diagonal spin that is vertical and facing backward represents the bit containing the state "1," whereas a diagonal spin that is horizontal and facing forward represents the bit containing the state "0." A diagonal filter can only read diagonal spin that is facing forward or backward, whereas a rectilinear filter can only read horizontal and vertical spin. Alice alternates her polarization scheme between diagonal and rectilinear filters at random for every single photon bit transmission. The broadcast can use one of the two polarizations to denote a single bit in any system she uses, either 0 or 1 (Fig. 2).

Fig. 2
figure 2

Polarization States

Bob must select whether to read each photon bit using his rectilinear or diagonal polarizer when he receives the photon key: sometimes the correct polarizer will be chosen by Bob, and at other times he will choose the incorrect one. Each polarizer is chosen at random by him, just like Alice. Bob would receive an inaccurate measurement if he had used the incorrect filter for a certain photon. Alice and Bob have established an unsafe communication channel at this stage, which means that others can listen in. After that, Alice tells Bob about the polarizer she used to transmit each photon bit, but not the way she polarized them. E.g., assume that Alice informs Bob that the photon number 6597 was transmitted using the rectilinear technique, but won’t specify whether she sent a horizontal or a vertical photon. Bob then double-checks that he used the correct polarizer to receive each photon. The photon readings that he checked with the incorrect polarizer are subsequently discarded by Alice and Bob. Alice would phone Bob once the photon transaction occurred and inform him which series of filters, she used to achieve the original polarization. After removing the photons for which the improper filter was used by Bob, the remaining sequence of ones and zeros is used to encrypt their conversation (Fig. 3).

Fig. 3
figure 3

Working process of the BB84 protocol

2.3 Eavesdropping

Assume we have an eavesdropper, Eve, who is trying to listen in on their conversation. Eve has the same polarizers as Bob, and for each photon, she must pick between rectilinear and diagonal polarizers at random. However, she has the same difficulty as Bob that is, she chooses the wrong polarizer half of the time. Bob, on the other hand, has the advantage of being able to validate which polarizer type was used for each photon by communicating with Alice. Eve’s measurement will be rendered useless if she uses the wrong filter most of the time and misinterprets part of the photons that will generate the secret key. Suppose Eve was eavesdropping on their chat, she won’t be able to figure out the secret key since she only knows the filters used by Alice and not the polarization states used. To obtain the key correctly, she'd need to know the filters which were used by Alice and Bob before sending the photons [9]. They must use the procedures outlined above to identify Eve's attack, which will result in a key sequence of 1 s and 0 s that is identical and in case someone has been eavesdropping, there will be some variations. Then, they must next take additional steps to ensure that their secret key is valid. It is unnecessary to compare all of the binary digits of the final key via the insecure route explained above. Eve has to go through her filter sequence to read the spin of the photon which Alice passed through the line. If she uses the incorrect filter for a particular photon, the spin of that photon will change. As a result, as soon as Alice tells Bob the filter sequence she used, both of them will be aware that their key has been hacked because their bit sequences do not match. Bob would then receive a new key that has not been compromised from Alice, which he could use to read the message. Assume the final key is 2000 binary digits long. What Alice and Bob need to do is pick a part of these digits at random, say 100 digits, in terms of both digit state and digit state (0 or 1). If Alice and Bob's answers are identical, Eve probably wasn't listening.

2.4 Key Refinement

Alice and Bob converse while exchanging quantum keys via both the public/classical channel and the quantum channel. Quantum mechanics is used to coding the information in the quantum channel states. Alice and Bob send data while monitoring the open channel to see if Eve is listening. There are other parties to blame for the quantum channel issues besides Eve. Quantum channel disruptions, optical defects, and other factors can all lead to errors in quantum communication. In detectors, there may be a misalignment or noise. In today's QKD systems, mistakes account for only a small percentage of all bits. This is in stark contrast to the Bit Error Rate (BER) in normal communication networks, which is typically about 10^ (− 9). The number of errors in QC is measured by the Quantum Bit Error Rate (QBER), which is calculated by dividing the number of erroneous bits by the total number of bits shown in Eq. (2).

$$ QBER = \frac{Number\, of\, errors}{{Total\, number\, of\, bits}}*100\% $$
(2)

Alice and Bob must calculate QBER and establish whether or not an eavesdropper exists due to errors. In reality, they only compare a small fraction of the raw key dispersed over the classical channel to calculate the QBER. Eve has eavesdropped when the QBER exceeds a specific threshold. Alice and Bob will continue to distill the key if the mistake rate is low enough. They must, of course, remove the raw key's compared component. Following the bit error estimation, Alice and Bob use key distillation procedures. There are usually 2 parts to these protocols: key reconciliation and privacy amplification [10]. Figure 4 shows steps in key refinement.

Fig. 4
figure 4

Steps in key refinement

2.4.1 Key Reconciliation

The reconciliation phase's purpose is to remove any errors (natural or manufactured by an eavesdropper) so that Bob and Alice can share the same key. Figure 5 shows Error Correction using Cascade Protocol.

Fig. 5
figure 5

Error correction using cascade protocol

This can be done using the traditional channel, which means that an eavesdropper could learn something from this channel if they listen to it. To limit the knowledge of prospective eavesdroppers, privacy amplification will play a role. The topic of reconciliation and privacy amplification is discussed in Experimental Quantum Cryptography. The idea is to do parity checks on the sifted key blocks. Alice and Bob can choose a random permutation of the key ahead of time. They then divided the sifted key into blocks based on the length of the sifted key and an estimate of the mistake rate, expecting zero or one error in each block. If the blocks are too large, the errors may not be detected appropriately, and if the blocks are too small, too much information will be leaked. If there are an even number of 1 s in a bit string, the parity is 0, and if there are an odd number of 1 s in the string, the parity is 1. The flip of the parity is the result of a one-bit flip on the string. If there are an even number of errors in a string shared by Alice and Bob, they will have the same parity. If there are an odd number of errors, on the other hand, they will have different parity.

They can then detect an error by comparing the parities if the blocks are split correctly, with zero or one fault in each block (if the parities are the same, there is no error and if the parities are different there is one error). If there are two faults in a block, they will have the same parities and the user will believe there is no issue. We must keep in mind that revealing the parity of blocks reveals some information. Alice and Bob agree to erase the last bit of the block to reduce information leaking. It will remove a zero with a probability \(\frac{1}{2}\) and a one with probability \(\frac{1}{2}\) if the bits are random. As a result, it will keep the parity unchanged with probability \(\frac{1}{2}\) and flip it with probability \(\frac{1}{2}\), making the parity random once more. As a result, Alice and Bob filtered the key into blocks and checked the parity. If the parity is different, they believe there is only one error and conduct a binary search to find it. In 1994, BRASSARD and SALVAIL presented the cascade protocol, which had an optimal and a little less optimal algorithm that was significantly more practical in practice.

The CASCADE protocol [11] accepts a noisy key and an estimated error rate as input and outputs a reconciled key as well as some information that was leaked over the public channel. Iterations are used in the protocol. Bob shuffles the key at the start of each cycle except the first. The public channel can be used to announce the shuffle. The key is then divided into equal blocks b by Bob. The error rate Q and the pass i determine the number of blocks k (i, Q). Top blocks are the name for these blocks. Bob then computes the parity for each top block and requests the correct parities from Alice. He checks the correct and present parities, then applies the BINARY primitive to each block with varying parities. All top blocks will have the right parity after using the BINARY primitive. The cascade effect is then used by Bob to fix bits from the preceding iterations.

2.4.2 Privacy Amplification

After the completion of the key distillation phase, finish the privacy amplification step [12]. Because Eve may have obtained critical data about the secret key, Alice and Bob must enhance their secrecy (to prevent eavesdropping during bit error estimation in the quantum channel and key reconciliation in the public channel). They can disassemble some parts and precisely reassemble the final key. The secret key that can be utilized for symmetric encryption will be less if Alice and Bob accomplish all of the aforementioned steps. All quantum key distribution protocols provide this key shortening capability. Assume that the key size form the QC is K and the key size after estimating the error is C and the key size after reconciliation is R and the final key size is B.

$$ K > C > R > B $$
(3)

The QKD's performance diminishes as the key gets shorter with each level. When we want to guarantee a high level of security, this reduction is significant.

2.5 QKD Features

Quantum key distribution (QKD) presents a potential alternative for a quantum-proof cryptography solution and has fundamentally secure security that has been demonstrated. The QKD technique enables two different devices to agree upon a shared sequence of random bits, thereby greatly reducing the possibility of others (eavesdroppers) being able to determine the values. The following are the desirable characteristics of QKD, including its resistance to traffic analysis, location independence, robustness, rapid key delivery, and confidentiality.

2.5.1 Key Confidentiality

The secrecy of QKD is a major factor in its appeal. For public key systems, the theoretical intractability of decryption continues to be a challenge. Because of this, key agreement primitives like Diffie-Hellman, which are frequently used in today's Internet security architecture, could one day be broken, which would not only hinder communication in the future but could even reveal communications from the past. Traditional secret key systems have worried about insider threats and the practical difficulty of disseminating keying material. Automatic key distribution using QKD techniques may be more secure than those of its competitors if properly integrated into a larger security system. [13].

2.5.2 Authentication

Authentication is not provided by QKD on its own. Two contemporary methods for providing authentication in quantum systems are positioning the secret keys at device pairs earlier for use in hash function-based authentication or a hybrid of public key-QKD schemes. But both of the approaches are not particularly appealing. On the other hand, hybrid public key-QKD methods determine how vulnerable public key systems are to being broken by quantum computers or unexpected mathematical breakthroughs.

2.5.3 Robustness

The Quantum key distribution community has not historically taken robustness into account. An attacker who has mastered the art of cunning must not be able to run out of keying material accidentally. QKD has so far offered an extremely brittle service because QKD technologies have only been implicitly used via a single point-to-point link. If the link was broken due to a fiber cut or eavesdropping, all of the keying material would stop flowing. We believe that a meshed QKD network is much stronger than a single point-to-point link as it contains several important distribution pathways.

2.5.4 Traffic Analysis Resistance

Opponents may be able to take on the valuable analysis of traffic on a QKD system, such as finding a huge flow of keying material among 2 locations indicating that a high volume of secret data is passed, or will pass, among them. As a result, it is advantageous to obstruct such kind of analysis. QKD has a relatively feeble approach in this field because most configurations require dedicated, pt-to-pt QKD links among communicative objects that set out the underlying key distribution relationships.

2.5.5 Fast Key Delivery

The secret keys must be transmitted quickly to the encryption devices to ensure that you do not run out of key bits. Data encryption and decryption rates compete with the rate of installing keying material. It is both desirable and feasible to considerably improve upon the current QKD technology's rates.

2.5.6 Distance- and Location-Independence

In an idyllic world, any object can agree on keying material with other (authorized) objects in the world. Surprisingly, the security design of the Internet allows for this – any machine connected to the Internet can generate a secure communication with another, agreeing on keys using the Internet IPsec protocols. This characteristic is glaringly absent in Quantum key distribution, which needs a clear and unimpeded path for photons to go between the two objects and it can work only for a few kilometers over optical fiber.

2.6 Challenges in QKD

In QKD, relays are necessary [14]. Unless the sender and destination construct a conduit that goes directly between their offices and the distance is low enough that the messages do not deteriorate—roughly 60 miles or fewer with present technology—hackers will have plenty of opportunities. When communications travel great distances, QKD networks will require repeaters, which could cause information to be hacked and the key stolen." Quantum cryptography, despite the protection it provides, has a few flaws. One of the major problems in quantum cryptography's its ability to provide security. Interference is the reason for the short length of quantum cryptography capacity.

3 Comparison of Quantum Cryptography Protocols

The QKD protocol is a mechanism for generating a secret key based on the principles of digital and photon measurements and based on the law of physics. To illustrate the reliability of QKD protocols [15], several protocols were established. Some QKD techniques can be processed in an acceptable amount of time and have proven to be resistant to quantum attacks. Furthermore, QKD protocols can be implemented using an existing security system. These QKD protocols were created in a variety of ways, and some of them required specific hardware. The next section provides a quick overview of various intriguing QKD techniques (Table 1).

Table 1 Comparison of quantum cryptography protocols

4 Other Methods for Secret Key Exchange

The quantum key distribution (QKD) is a perfect illustration of the value of quantum effects in the creation of provably secure techniques for exchanging secret keys in cryptography. A lot of work is being done to increase QKD's security and effectiveness. Some of those techniques are briefly explained in this section.

4.1 Quantum One Time Pad

The encryption of the qubit using a one-time pad [16] is shown here. E.g., Alice sends a quantum bit \(\left| \psi \right.\) to bob using the key K. And Eve is the intruder between Alice and Bob who tries to listen to their communication but cannot learn anything about \(\left| \psi \right.\).Alice performs some changes on \(\left| \psi \right.\) based on K and then sends the message to bob. Eve does not know about the key k but sees a state. Bob uses a decryption function to the state P and obtains the state \(\left| \psi \right.\) based on the key K. Consider the classical bit m as a quantum state in Eq. (4)

$$ \left| e \rangle \right. = \left. {Y^{K} } \right|m \rangle $$
(4)

where Y is the bit flip operation. Bob uses the decryption function to obtain the message which is given in Eq. (5)

$$ \left| m \rangle \right. = \left. {Y^{K} } \right|e \rangle $$
(5)

Sender

M: 0 1 0 0 1 0 0 1

Receiver

C: 1 1 0 1 0 0 0 0

 

K: 1 0 0 1 1 0 0 1

 

K: 1 0 0 1 1 0 0 1

 

     1 1 0 1 0 0 0 0

 

     0 1 0 0 1 0 0 1

Since Eve does not know anything about the key K. The probability of k = 1 is ½ and k = 1 is ½.

$$ P = \frac{1}{2}\left| m\rangle \langle m \right| + \frac{1}{2}\left| m\rangle \langle m \right|Y $$
(6)

Considering the standard bases, we obtain the maximum mixed state as,

$$ P = \frac{1}{2}\left| 0\rangle \langle 0 \right| + \frac{1}{2}\left| 1\rangle \langle 1 \right| = \frac{1}{2}\left( {\begin{array}{*{20}l} 1 &\quad 0 \\ 0 &\quad 1 \\ \end{array} } \right) $$
(7)

The maximum mixed state is independent of m, so eve cannot obtain anything about m.

4.2 Entanglement-Based QKD

To demonstrate how entanglement [17] is utilized to generate a safe distribution of keys, consider some properties of a polarization-entangled photon pair. A single photon’s polarization state is given in Eq. (8)

$$ \left| \psi \rangle \right. = y\left| \updownarrow \rangle \right. + z\left| \leftrightarrow \rangle \right. $$
(8)

where y \(\left| \updownarrow \rangle \right.\) + z \(\left| \leftrightarrow \rangle \right.\) denote rectilinear polarization states constituting a set of orthogonal bases. The normalization condition is \(\alpha \alpha^{*} + \beta \beta^{*}\) = 1 where \(\alpha and \beta are complex numbers.\). A pure state is thought to characterize a photon's polarization, with a definite phase relationship between the 2 basic components. The mixed state of a nonpolarized photon, on the other hand, can only be defined as a numerical mixture of base states. A superposition of four base states can also be used to define the most general polarization state (pure state) of a photon pair is given in Eq. (9).

$$ \left| \psi \rangle \right. = \alpha_{1} \left| \updownarrow \rangle \right._{1} \left| \updownarrow \rangle \right._{2} + \alpha_{2} \left| \updownarrow \rangle \right._{1} \left| \leftrightarrow \rangle \right._{2} + \alpha_{3} \left| \leftrightarrow \rangle \right._{1} \left| \updownarrow \rangle \right._{2} \alpha_{4} \left| \leftrightarrow \rangle \right._{1} \left| \leftrightarrow\rangle \right._{2} . $$
(9)

When \(\alpha_{1} = \alpha_{4}\) = \(\frac{1}{\sqrt 2 }\),\( \alpha_{2} = \alpha_{3} = 0\), the entangled Einstein, Podolsky and Rosen photon pair is given in Eq. (10)

$$ \left| {\Phi } \rangle \right. = \frac{1}{\sqrt 2 }\left( {\left| \updownarrow\rangle \right._{1} \left| \updownarrow\rangle \right._{2} + \left| \leftrightarrow\rangle \right._{1} \left| \leftrightarrow \rangle \right._{2} } \right) $$
(10)

Assume we deliver one of an Einstein, Podolsky and Rosen pair's photons to Alice and the other to Bob. With the same likelihood, Alice will detect a horizontal or vertical polarized photon if she reads her photon using the rectilinear basis. Bob's photon will be projected to the appropriate polarisation state in accordance with the measurement result from Alice. Bob's measurement will be entirely interrelated with Alice's if bob reads his photon on the same bases as Alice. On the other hand, there is no correlation when Bob measures on a diagonal basis. The following rationale still holds true if Bob completes his measurement first. Between Alice and Bob, the EPR source can be put. Each EPR pair sends one photon to Alice and the other to Bob. Alice and Bob choose rectilinear or diagonal measurement bases for each incoming photon at random and independently. When they've finished, only the photon pairs that Alice and Bob have measured will be kept when they compare their measurement bases.

With matching bases, random bits are created. The BB84 protocol, which uses a single photon source, is similar. To generate the final safe key, they can do error repair and privacy amplification. Note that the polarization of each photon is unknown before Alice and Bob do the measurement. Each photon in the Einstein, Podolsky and Rosen pair is in a maximally mixed state, to be more specific (fully non-polarized). Because no information is encoded in the photon as it transmits from the source of the EPR to the user, the eavesdropper cannot obtain any information from it. During the measurement process, random bits are created (Fig. 6).

Fig. 6
figure 6

Elapsed time for classical cryptography algorithms with and without QKD

Fig. 7
figure 7

Comparison of Encryption Time

Fig. 8
figure 8

Comparison of Decryption Time

5 Results and Discussion

The BB84 Protocol was implemented using the Python programming language since it offers the freedom to select the necessary modules for the creation of the code and simulation of the protocol. To implement the code, support packages such as pool, random, and certain system packages were needed. This study compares the performance of three of the most used algorithms, including 3DES, AES, and Blowfish, using varied processing settings to examine different data file sizes ranging from 500 to 3500 KB. The techniques with and without QKD are evaluated in terms of decryption/encryption time, Avalanche effect, and throughput.

  1. a.

    Throughput The encryption and decryption times of the files are used to calculate throughput.

  2. b.

    Encryption Time The time it takes to use the secret key to convert plaintext to ciphertext. The time it takes to encrypt a message is measured in milliseconds and is dependent on the size of the key and the size of the text.

  3. c.

    Decryption Time The time it took to use the secret key to convert the encrypted text to plain text. The time it takes to decrypt a message is measured in milliseconds.

  4. d.

    Avalanche Effect Change one bit in the key or one bit in the plaintext and examine how the output of at least half of the bits in the cipher text changes. Table 2 shows the Elapsed time for classical cryptography algorithms with and without QKD for file sizes ranging from 500 to 3500 Kb.

Table 2 Elapsed time comparison of quantum key integrated cryptography algorithms

Figures 7, 8 compares the performance of several classical and quantum cryptography algorithms in terms of encryption and decryption time for files ranging in size from 500 to 3500 kb. It shows that when combined with QKD, it outperforms the classical cryptography algorithms without QKD for file size = 3500 Kb.

Figure 9 compares the performance of several quantum and classical cryptography algorithms in terms of throughput for files ranging in size from 500 to 3500 kb. It shows that when combined with QKD (Fig. 9), the throughput performs well for Blowfish when compared with other classical cryptography algorithms.

Fig. 9
figure 9

Comparison of throughput with and without QKD

Figure 10 comparative analysis of several classical and quantum cryptography algorithms in terms of Avalanche effect by changing 1 bit of the plain text for files ranging in size from 500 to 3500 kb. It shows that when combined with QKD, it outperforms the classical cryptography algorithms without QKD.

Fig.10
figure 10

Comparative analysis of several classical and quantum cryptography algorithms

The graphical representation of the QuTip with a different platform for execution time is shown in Fig. 11. The Execution time is evaluated against the file size and the file size is varied from 100 Kb to 35oo Kb. When the file is 100 Kb the execution time of QuTip is 110 (ms) which is very less compared to the other platforms. When the file is increased the execution time also increased.

Fig. 11
figure 11

Comparative analysis of different platforms

Fig. 12
figure 12

QKD protocol with 10% noise

The chance of an eavesdropper being identified in a channel with 10% noise is shown in Fig. 11. When the number of transmitted photons approaches 90, the risk of the eavesdropper being detected is high. The bigger the number of transmitted data, regardless of whether there is noise interference or not, the more likely the eavesdropper will be found (Fig. 12).

6 Conclusion

This paper discusses Quantum Cryptography and how quantum cryptography is more efficient when compared with conventional cryptography algorithms and shows when QKD is integrated with classical cryptography algorithms it increases the security in transmitting data to a high level. From the results, it can be seen that QKD with classical cryptography decreases the encryption and decryption time and increases the throughput for file sizes ranging from 500 to 3500 Kb. The chance of detecting eavesdroppers in quantum cryptography is high compared to conventional cryptography algorithms.