Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

Real world quantum cryptography

I. Lucio-Martinez

Published Jan 1, 2014• 0 citations
Publisher

Abstract

Quantum cryptography uses the quantum properties of individual photons to provide two or more users with means to communicate securely and efficiently. Specifically, quantum key distribution (QKD) focuses on the secure communication between two distant parties and guarantees the security of a transmitted message between them. Although QKD is the most mature application of quantum cryptography, applications of quantum mechanics in communication systems are not limited to QKD and other cryptographic protocols can be implemented as well. This thesis focuses on the implementation of quantum cryptographic systems over deployed fiber. A first QKD system was built and used to demonstrate the BB84 protocol over deployed fiber between the University of Calgary and SAIT. The system implemented a novel tool called quantum frames that allow for the quantum signals to be routed, for clock synchronization, and for channel stabilization in a network scenario. The same system was used to examine the scalability of the secret key generation rate in different steps of the process in order to detect potential bottlenecks for key generation rate of high speed systems. A second QKD system was developed to demonstrate the measurement-device independent QKD protocol. The system worked over deployed fiber between the University of Calgary, SAIT, and Foothills Hospital in the City of Calgary. The advantage of the measurement-device independent QKD protocol over previous QKD protocols is that it eliminates the possibility of side-channel attacks that target single photon detectors used in QKD systems. This demonstration also involved the first demonstration of a Bell state measurement over deployed fiber. Bell state measurements were further studied by using novel single photon detectors, which allowed demonstrating a highly efficient Bell measurement. Finally, a cryptographic protocol known as private queries was demonstrated between the University of Calgary and SAIT. Quantum private queries were demonstrated for the first time over deployed fiber by developing and implementing an error correction scheme to make the protocol noise and loss tolerant.

DOI
10.11575/prism/27552

Related papers

Quantum Key Distribution Protocols

Dipan Kumar Das, Padmaja Patnaik, Sudip Kumar Das

Quantum key distribution (QKD) is a straightforward cryptographic protocol for secure communication using quantum mechanics principles. This book chapter provides an introduction to QKD protocols based on theoretical principles, applicability, and recent advancements. The chapter provides an overview of the most popular BB84 protocol and its extensions, including measurement-device-independent QKD (MDI-QKD) and twin-field QKD (TF-QKD). The chapter includes continuous-variable QKD (CV-QKD) and its applicability to real networks. Security attacks, including side-channel attacks and photon-number splitting (PNS) attacks, are addressed with a focus on countermeasures, including decoy-state techniques and device-independent protocols. Application of QKD for network security, cloud computing, and critical infrastructure is addressed. Integration of QKD with classical cryptography techniques, post-quantum cryptography, and innovative quantum network topologies is addressed to investigate applicability for large-scale implementation. The chapter discusses recent advancements in superconducting nanowire single-photon detectors, quantum memory-assisted QKD, and free-space QKD in atmospheric channels. It also discusses innovative reconciliation techniques, authentication schemes, future developments, and deployment challenges and provides valuable information for researchers and practitioners.

CRC Press eBooks•Jun 2, 2026•0 citations

Implementation of Quantum Cryptography Protocol

Norshamsuri Ali

The main goals of cryptography are the encryption of messages to render them unintelligible to third parties and the authentication of messages to certify that they have not been modified. These goals can be accomplished if the sender ("Alice") and recipient ("Bob") both possess a secret random binary digit (bit) known as "key". It is essential that Alice and Bob acquire the key material with a high level of confidence that any third party ("Eve") does not have even partial information about the random bit sequence. If Alice and Bob communicate solely through classical messages (as opposed to Quantum cryptography), it is impossible for them to generate a certifiably secret key. QKD are the new generation of cryptographic systems which allow two remote parties (Alice and Bob) to generate a secret key with privacy guaranteed by quantum mechanics. They generate a random key securely over an optical fiber connection (also known as Quantum channel). This random key is then used for encryption and decryption of confidential messages, which then can be sent in encrypted form over any non-secure communication channel. In this thesis, we study two fiber-based QKD systems namely "oneway" and "two-way". Both systems have their unique advantage which distinguish them to one another. In one-way, the complexity of the electronic system may reduce. However more attention has to be made on the optical setup due to the requirement of active compensation. In the two-way, the requirement of optical setup may reduce but the attention moves to the electronic system which requires precise and short pulse especially for high speed in Alice system configuration. Our developed prototype is capable to support either one-way and two-way QKD system. We also solved some of the issues from the previous prototype Kumar [2008] which limited the system to be used in high speed. For instance: the synchronization system now uses a single synchronization signal per frame; the frame initialization time delay is reduced to 140ms per frame; pulse shaping distortion due to current consumption. We also introduced the security perspective for B92 protocol with uninformative states. This is done by utilizing the security analysis for BB84 such as entanglement distillation protocol (EDP) [...], smooth Ra'©nyi entropy [...] and composable security [...]. Numerous proposal on smooth Ra'©nyi entropy as general case [...] either for finite security analysis [...] or in asymptotic limit [...] assist us to deduce finite security perspective for B92 with uninformative states. [...] This thesis is organized as follow, initially starts with a general introduction to the cryptography and its relation with quantum cryptography. This is elaborated in Chapter One. In the Second Chapter we will go through the background of quantum mechanics and quantum information and introduce some parameters and theory mostly used in Quantum Key Distribution. These include quantum measurement, state behavior and the security analysis parameters. The second chapter will give the background concepts for the QKD in perspective of quantum information. The Third Chapter will explore more detailed information towards QKD. It starts with the basic architecture algorithm of the quantum cryptography system and details each components of the architecture. Later we focus on the security analysis specifically for the B92 protocol. Finally in the chapter, we will make some finite element analysis for the B92 protocol with uninformative states. In Chapter Four and onwards, we are discussing the experimental implementation and analysis. We begin with the heart of our system which is the field programmable gate array (FPGA) system. We explain the detailed architecture of our FPGA system and how the system works. The module that we develop in our FPGA system in order to work inside the QKD system is also explained in detail. We reserve the modification and advanced work of this system for the future by giving the original codes in the Appendix A. Chapter Five is one of the shortest chapters in this thesis. This chapter explains our electronic development and the opto-electronic device which are used in the QKD system. The main device that we develop for the QKD system is our Mezzanine board for FPGA. This mezzanine board supports some functions that are not available from the FPGA in order to make the system functional. Other developments include opto-electronic board and proportional-integral-derivative (PID) controller with the current driver. Chapter Six is the main experimental part. In this Chapter we start to give the introduction to our optical setup. We detail out our configuration of the setup and finally show our results taken from experimental work. Finally in Chapter Seven we conclude our work and purposed future work which actually need to done for the system.

•Nov 14, 2014•0 citations

Measurement-device-independent Quantum Cryptography

Zhiyuan Tang

Quantum key distribution (QKD) enables two legitimate parties to share a secret key even in the presence of an eavesdropper. The unconditional security of QKD is based on the fundamental laws of quantum physics. Original security proofs of QKD are based on a few assumptions, e.g., perfect single photon sources and perfect single-photon detectors. However, practical implementations of QKD systems do not fully comply with such assumptions due to technical limitations. The gap between theory and implementations leads to security loopholes in most QKD systems, and several attacks have been launched on sophisticated QKD systems. Particularly, the detectors have been found to be the most vulnerable part of QKD. Much effort has been put to build side-channel-free QKD systems. Solutions such as security patches and device-independent QKD have been proposed. However, the former are normally ad-hoc, and cannot close unidentified loopholes. The latter, while having the advantages of removing all assumptions on devices, is impractical to implement today. Measurement-device-independent QKD (MDI-QKD) turns out to be a promising solution to the security problem of QKD. In MDI-QKD, all security loopholes, including those yet-to-be discovered, have been removed from the detectors, the most critical part in QKD. In this thesis, we investigate issues related to the practical implementation and security of MDI-QKD. We first present a demonstration of polarization-encoding MDI-QKD. Taking finite key effect into account, we achieve a secret key rate of 0.005 bit per second (bps) over 10 km spooled telecom fiber, and a 1600-bit key is distributed. This work, together with other demonstrations, shows the practicality of MDI-QKD. Next we investigate a critical assumption of MDI-QKD: perfect state preparation. We apply the loss-tolerant QKD protocol and adapt it to MDI-QKD to quantify information leakage due to imperfect state preparation. We then present an experimental demonstration of MDI-QKD over 10 km and 40 km of spooled fiber, which for the first time considers the impact of inaccurate polarization state preparation on the secret key rate. This would not have been possible under previous security proofs, given the same amount of state preparation flaws.

•Nov 1, 2016•1 citation

Towards practical quantum cryptography.

Abdul Mirza

The information society that presides today is dependent on the communication industry to facilitate unintelligible data transfers between authenticated parties. Such requirements have, to date, taken advantage of security based on the mathematical complexities of certain algorithms. However, the advancement of computing power and the advent of the quantum computer together with the vulnerability of this scheme to mathematical progress have prompted the introduction of quantum cryptography. This process, through the laws of quantum physics, ensures provably secure data communication. Quantum cryptography provides physical protection to individual bits of information thus providing a hardware implemented solution. The implementation of this theoretical concept requires much practical innovation for transparent deployment into current cryptographic solutions. This thesis introduces the concept of quantum cryptography in a practical perspective. It raises a few core concerns with the present quantum cryptographic technology and provides some solutions towards the practical deployment of commercially feasible quantum cryptographic systems. The thesis commences with an introduction to classical cryptography focussing on key management protocols. This is followed by the presentation of the basic concepts of Quantum Key Distribution (QKD) together with an explanation of some QKD protocols and parameter required to classify such protocols. Chapter 2 discusses the theoretical and practical aspects of quantum channels in particular optical fibre. The primary challenges of transferring classical and quantum data along these channels are mentioned together with some solutions. A description of experimental usage with present QKD solutions is presented in Chapter 3. An investigation into highly efficient QKD protocols follows illustrating effective post-distribution processing for increasing the efficiency of the BB84 protocol. Chapter 4 begins with the limitations of present day QKD systems and explicates Quantum Networks as a possible solution. An introduction to classical networking theory is first presented after which some quantum network architectures based on passive optical networks are illustrated. Finally the proposed Quantum City project in conjunction with the eThekwini Municipality is explained. The realization of this project is intended to be complete by the third quarter of 2008 effectively making Durban into the first Quantum City in the world.

•Jan 1, 2009•0 citations

Quantum Cryptographic Protocols for Secure Communication Systems

Ivan Popescu, Helena Ivanov

Quantum Key Distribution (QKD) provides information-theoretic security guaranteed by the laws of physics rather than computational hardness -- making it the primary tool for quantum-secure communication against harvest-now-decrypt-later quantum threats. This paper proposes the Quantum Cryptographic Protocol Design and Analysis (QCPDA) framework, evaluating six quantum cryptographic protocols -- BB84, E91, MDI-QKD, Twin-Field QKD (TF-QKD), Quantum Digital Signatures (QDS), and Quantum Secret Sharing (QSS) -- across five dimensions: unconditional security, key generation rate, maximum secure distance, noise tolerance, and implementation complexity. TF-QKD achieves the longest secure distance (605 km on ultra-low-loss fibre) but lowest key rate. MDI-QKD eliminates all detector side-channels at moderate key rates. BB84 achieves the highest composite QCPDA score (8.24) due to commercial maturity. QCPDA provides a protocol selection guide mapping deployment scenarios (metropolitan, intercity, long-haul, multi-party) to optimal protocols, and discusses the complementary roles of QKD and NIST post-quantum cryptography standards for quantum-secure infrastructure.

Quantum Frontiers Journal•Jun 28, 2025•0 citations

Beating Quantum Hackers

Feihu Xu

Cryptography plays a key role in today's digital society. The most widely used encryption method is the public-key algorithm, but its security relies on unproven computational assumptions. In contrast, quantum key distribution (QKD) is an unbreakable encryption algorithm. QKD has been proven to provide information-theoretic security rigorously based on the laws of physics. Despite the beauty of QKD theory, in practice, QKD still suffers from practical side-channel attacks, due to the imperfections of real-life implementations. Such discrepancy between the theory and the practice is fatal to the security of a QKD system. This thesis addresses a number of the discrepancies in a standard QKD implementation, and it offers efficient countermeasures to resolve these discrepancies. A novel protocol -- measurement-device-independent (MDI) QKD - was proposed to remove all detector side-channel attacks. To apply MDI-QKD in real life, I have proposed practical protocols, conducted the first rigorous finite-key security proof, designed methodologies to optimize parameters, and demonstrated MDI-QKD experimentally. These results allow MDI-QKD mature enough to be implemented in real-life. Based on the framework of MDI-QKD, the only security issue left is the source. To solve the loophole due to the imperfect encoder, I have experimentally implemented a recent protocol, which enables QKD loss-tolerant to source flaws. This experiment for the first time shows secure QKD with imperfect state preparations at long distances. Another vulnerable part in the source is the ability to generate true randomness. I have developed a compact and cost-effective quantum random number generator (QRNG) prototype, which has a real-time generation rate of 1 Gbit/s with excellent stability. The simplicity and speed of my prototype prove the feasibility of a robust, low-cost, and fast QRNG. In summary, MDI-QKD enables new scientific developments in the field of quantum cryptography. This thesis solves the major practical issues in the implementation of MDI-QKD. The combination of MDI-QKD, imperfect sources, and QRNG consists of the foundation of a future practical side-channel-free QKD protocol. The success of this protocol can substitute current classical cryptosystems by offering people an unconditionally secure infrastructure, which will be the ultimate dream for researchers in secure communication.

•Jun 1, 2015•1 citation
Quantum cryptography uses the quantum properties of individual photons to provide two or more users with means to communicate securely and efficiently. Specifically, quantum key distribution (QKD) focuses on the secure communication between two distant parties and guarantees the security of a transmitted message between them. Although QKD is the most mature application of quantum cryptography, applications of quantum mechanics in communication systems are not limited to QKD and other cryptographic protocols can be implemented as well. This thesis focuses on the implementation of quantum cryptographic systems over deployed fiber. A first QKD system was built and used to demonstrate the BB84 protocol over deployed fiber between the University of Calgary and SAIT. The system implemented a novel tool called quantum frames that allow for the quantum signals to be routed, for clock synchronization, and for channel stabilization in a network scenario. The same system was used to examine the scalability of the secret key generation rate in different steps of the process in order to detect potential bottlenecks for key generation rate of high speed systems. A second QKD system was developed to demonstrate the measurement-device independent QKD protocol. The system worked over deployed fiber between the University of Calgary, SAIT, and Foothills Hospital in the City of Calgary. The advantage of the measurement-device independent QKD protocol over previous QKD protocols is that it eliminates the possibility of side-channel attacks that target single photon detectors used in QKD systems. This demonstration also involved the first demonstration of a Bell state measurement over deployed fiber. Bell state measurements were further studied by using novel single photon detectors, which allowed demonstrating a highly efficient Bell measurement. Finally, a cryptographic protocol known as private queries was demonstrated between the University of Calgary and SAIT. Quantum private queries were demonstrated for the first time over deployed fiber by developing and implementing an error correction scheme to make the protocol noise and loss tolerant.
Quantum key distribution (QKD) is a straightforward cryptographic protocol for secure communication using quantum mechanics principles. This book chapter provides an introduction to QKD protocols based on theoretical principles, applicability, and recent advancements. The chapter provides an overview of the most popular BB84 protocol and its extensions, including measurement-device-independent QKD (MDI-QKD) and twin-field QKD (TF-QKD). The chapter includes continuous-variable QKD (CV-QKD) and its applicability to real networks. Security attacks, including side-channel attacks and photon-number splitting (PNS) attacks, are addressed with a focus on countermeasures, including decoy-state techniques and device-independent protocols. Application of QKD for network security, cloud computing, and critical infrastructure is addressed. Integration of QKD with classical cryptography techniques, post-quantum cryptography, and innovative quantum network topologies is addressed to investigate applicability for large-scale implementation. The chapter discusses recent advancements in superconducting nanowire single-photon detectors, quantum memory-assisted QKD, and free-space QKD in atmospheric channels. It also discusses innovative reconciliation techniques, authentication schemes, future developments, and deployment challenges and provides valuable information for researchers and practitioners.
The main goals of cryptography are the encryption of messages to render them unintelligible to third parties and the authentication of messages to certify that they have not been modified. These goals can be accomplished if the sender ("Alice") and recipient ("Bob") both possess a secret random binary digit (bit) known as "key". It is essential that Alice and Bob acquire the key material with a high level of confidence that any third party ("Eve") does not have even partial information about the random bit sequence. If Alice and Bob communicate solely through classical messages (as opposed to Quantum cryptography), it is impossible for them to generate a certifiably secret key. QKD are the new generation of cryptographic systems which allow two remote parties (Alice and Bob) to generate a secret key with privacy guaranteed by quantum mechanics. They generate a random key securely over an optical fiber connection (also known as Quantum channel). This random key is then used for encryption and decryption of confidential messages, which then can be sent in encrypted form over any non-secure communication channel. In this thesis, we study two fiber-based QKD systems namely "oneway" and "two-way". Both systems have their unique advantage which distinguish them to one another. In one-way, the complexity of the electronic system may reduce. However more attention has to be made on the optical setup due to the requirement of active compensation. In the two-way, the requirement of optical setup may reduce but the attention moves to the electronic system which requires precise and short pulse especially for high speed in Alice system configuration. Our developed prototype is capable to support either one-way and two-way QKD system. We also solved some of the issues from the previous prototype Kumar [2008] which limited the system to be used in high speed. For instance: the synchronization system now uses a single synchronization signal per frame; the frame initialization time delay is reduced to 140ms per frame; pulse shaping distortion due to current consumption. We also introduced the security perspective for B92 protocol with uninformative states. This is done by utilizing the security analysis for BB84 such as entanglement distillation protocol (EDP) [...], smooth Ra'©nyi entropy [...] and composable security [...]. Numerous proposal on smooth Ra'©nyi entropy as general case [...] either for finite security analysis [...] or in asymptotic limit [...] assist us to deduce finite security perspective for B92 with uninformative states. [...] This thesis is organized as follow, initially starts with a general introduction to the cryptography and its relation with quantum cryptography. This is elaborated in Chapter One. In the Second Chapter we will go through the background of quantum mechanics and quantum information and introduce some parameters and theory mostly used in Quantum Key Distribution. These include quantum measurement, state behavior and the security analysis parameters. The second chapter will give the background concepts for the QKD in perspective of quantum information. The Third Chapter will explore more detailed information towards QKD. It starts with the basic architecture algorithm of the quantum cryptography system and details each components of the architecture. Later we focus on the security analysis specifically for the B92 protocol. Finally in the chapter, we will make some finite element analysis for the B92 protocol with uninformative states. In Chapter Four and onwards, we are discussing the experimental implementation and analysis. We begin with the heart of our system which is the field programmable gate array (FPGA) system. We explain the detailed architecture of our FPGA system and how the system works. The module that we develop in our FPGA system in order to work inside the QKD system is also explained in detail. We reserve the modification and advanced work of this system for the future by giving the original codes in the Appendix A. Chapter Five is one of the shortest chapters in this thesis. This chapter explains our electronic development and the opto-electronic device which are used in the QKD system. The main device that we develop for the QKD system is our Mezzanine board for FPGA. This mezzanine board supports some functions that are not available from the FPGA in order to make the system functional. Other developments include opto-electronic board and proportional-integral-derivative (PID) controller with the current driver. Chapter Six is the main experimental part. In this Chapter we start to give the introduction to our optical setup. We detail out our configuration of the setup and finally show our results taken from experimental work. Finally in Chapter Seven we conclude our work and purposed future work which actually need to done for the system.
Quantum key distribution (QKD) enables two legitimate parties to share a secret key even in the presence of an eavesdropper. The unconditional security of QKD is based on the fundamental laws of quantum physics. Original security proofs of QKD are based on a few assumptions, e.g., perfect single photon sources and perfect single-photon detectors. However, practical implementations of QKD systems do not fully comply with such assumptions due to technical limitations. The gap between theory and implementations leads to security loopholes in most QKD systems, and several attacks have been launched on sophisticated QKD systems. Particularly, the detectors have been found to be the most vulnerable part of QKD. Much effort has been put to build side-channel-free QKD systems. Solutions such as security patches and device-independent QKD have been proposed. However, the former are normally ad-hoc, and cannot close unidentified loopholes. The latter, while having the advantages of removing all assumptions on devices, is impractical to implement today. Measurement-device-independent QKD (MDI-QKD) turns out to be a promising solution to the security problem of QKD. In MDI-QKD, all security loopholes, including those yet-to-be discovered, have been removed from the detectors, the most critical part in QKD. In this thesis, we investigate issues related to the practical implementation and security of MDI-QKD. We first present a demonstration of polarization-encoding MDI-QKD. Taking finite key effect into account, we achieve a secret key rate of 0.005 bit per second (bps) over 10 km spooled telecom fiber, and a 1600-bit key is distributed. This work, together with other demonstrations, shows the practicality of MDI-QKD. Next we investigate a critical assumption of MDI-QKD: perfect state preparation. We apply the loss-tolerant QKD protocol and adapt it to MDI-QKD to quantify information leakage due to imperfect state preparation. We then present an experimental demonstration of MDI-QKD over 10 km and 40 km of spooled fiber, which for the first time considers the impact of inaccurate polarization state preparation on the secret key rate. This would not have been possible under previous security proofs, given the same amount of state preparation flaws.
The information society that presides today is dependent on the communication industry to facilitate unintelligible data transfers between authenticated parties. Such requirements have, to date, taken advantage of security based on the mathematical complexities of certain algorithms. However, the advancement of computing power and the advent of the quantum computer together with the vulnerability of this scheme to mathematical progress have prompted the introduction of quantum cryptography. This process, through the laws of quantum physics, ensures provably secure data communication. Quantum cryptography provides physical protection to individual bits of information thus providing a hardware implemented solution. The implementation of this theoretical concept requires much practical innovation for transparent deployment into current cryptographic solutions. This thesis introduces the concept of quantum cryptography in a practical perspective. It raises a few core concerns with the present quantum cryptographic technology and provides some solutions towards the practical deployment of commercially feasible quantum cryptographic systems. The thesis commences with an introduction to classical cryptography focussing on key management protocols. This is followed by the presentation of the basic concepts of Quantum Key Distribution (QKD) together with an explanation of some QKD protocols and parameter required to classify such protocols. Chapter 2 discusses the theoretical and practical aspects of quantum channels in particular optical fibre. The primary challenges of transferring classical and quantum data along these channels are mentioned together with some solutions. A description of experimental usage with present QKD solutions is presented in Chapter 3. An investigation into highly efficient QKD protocols follows illustrating effective post-distribution processing for increasing the efficiency of the BB84 protocol. Chapter 4 begins with the limitations of present day QKD systems and explicates Quantum Networks as a possible solution. An introduction to classical networking theory is first presented after which some quantum network architectures based on passive optical networks are illustrated. Finally the proposed Quantum City project in conjunction with the eThekwini Municipality is explained. The realization of this project is intended to be complete by the third quarter of 2008 effectively making Durban into the first Quantum City in the world.
Quantum Key Distribution (QKD) provides information-theoretic security guaranteed by the laws of physics rather than computational hardness -- making it the primary tool for quantum-secure communication against harvest-now-decrypt-later quantum threats. This paper proposes the Quantum Cryptographic Protocol Design and Analysis (QCPDA) framework, evaluating six quantum cryptographic protocols -- BB84, E91, MDI-QKD, Twin-Field QKD (TF-QKD), Quantum Digital Signatures (QDS), and Quantum Secret Sharing (QSS) -- across five dimensions: unconditional security, key generation rate, maximum secure distance, noise tolerance, and implementation complexity. TF-QKD achieves the longest secure distance (605 km on ultra-low-loss fibre) but lowest key rate. MDI-QKD eliminates all detector side-channels at moderate key rates. BB84 achieves the highest composite QCPDA score (8.24) due to commercial maturity. QCPDA provides a protocol selection guide mapping deployment scenarios (metropolitan, intercity, long-haul, multi-party) to optimal protocols, and discusses the complementary roles of QKD and NIST post-quantum cryptography standards for quantum-secure infrastructure.
Cryptography plays a key role in today's digital society. The most widely used encryption method is the public-key algorithm, but its security relies on unproven computational assumptions. In contrast, quantum key distribution (QKD) is an unbreakable encryption algorithm. QKD has been proven to provide information-theoretic security rigorously based on the laws of physics. Despite the beauty of QKD theory, in practice, QKD still suffers from practical side-channel attacks, due to the imperfections of real-life implementations. Such discrepancy between the theory and the practice is fatal to the security of a QKD system. This thesis addresses a number of the discrepancies in a standard QKD implementation, and it offers efficient countermeasures to resolve these discrepancies. A novel protocol -- measurement-device-independent (MDI) QKD - was proposed to remove all detector side-channel attacks. To apply MDI-QKD in real life, I have proposed practical protocols, conducted the first rigorous finite-key security proof, designed methodologies to optimize parameters, and demonstrated MDI-QKD experimentally. These results allow MDI-QKD mature enough to be implemented in real-life. Based on the framework of MDI-QKD, the only security issue left is the source. To solve the loophole due to the imperfect encoder, I have experimentally implemented a recent protocol, which enables QKD loss-tolerant to source flaws. This experiment for the first time shows secure QKD with imperfect state preparations at long distances. Another vulnerable part in the source is the ability to generate true randomness. I have developed a compact and cost-effective quantum random number generator (QRNG) prototype, which has a real-time generation rate of 1 Gbit/s with excellent stability. The simplicity and speed of my prototype prove the feasibility of a robust, low-cost, and fast QRNG. In summary, MDI-QKD enables new scientific developments in the field of quantum cryptography. This thesis solves the major practical issues in the implementation of MDI-QKD. The combination of MDI-QKD, imperfect sources, and QRNG consists of the foundation of a future practical side-channel-free QKD protocol. The success of this protocol can substitute current classical cryptosystems by offering people an unconditionally secure infrastructure, which will be the ultimate dream for researchers in secure communication.