Public key cryptography is the secret sauce that makes online communication safe and secure. It lets you send and receive secret messages without having to share a password with anyone. But do you know how it works and what are the crazy and scary things that may happen to it in the future? Read on to find out!

## What is public key cryptography and how does it work?

Public key cryptography, also known as asymmetric cryptography, is a way of scrambling or signing data with two different keys: a public key and a private key. ³ The public key is like your email address that you can give to anyone, while the private key is like your password that you must keep to yourself. Data scrambled with the public key can only be unscrambled with the private key, and vice versa. This way, you can make sure that only the person you want can read your message, and that the message has not been messed with by anyone else.

For example, suppose Alice wants to send a secret message to Bob. She can use Bob’s public key to scramble her message, and then send it to him over the internet. Bob can use his private key to unscramble Alice’s message and read it. No one else can unscramble Alice’s message, even if they have Bob’s public key, because they don’t have his private key.

Public key cryptography is used for a lot of things, such as:

- Secure web browsing: When you visit a website that uses HTTPS, your browser uses public key cryptography to check if the website is legit and set up a secure connection. The website’s SSL/TLS certificate has its public key, which your browser uses to scramble data that is sent to and from the website. The website uses its private key to unscramble the data and answer your requests. ⁴
- Digital signatures: When you sign a document or a message digitally, you use your private key to make a signature that is unique to you and the document or message. Anyone who has your public key can check if you are the author of the document or message, and if it has not been changed by anyone else. ³
- Key exchange: When you want to talk securely with someone over the internet, you can use a key exchange algorithm, such as RSA or Diffie-Hellman, to agree on a shared secret key that you can use for symmetric encryption. Symmetric encryption is faster and easier than asymmetric encryption, but it needs both parties to have the same secret key. A key exchange algorithm uses public key cryptography to safely exchange data that is used for making the shared secret key. ⁴

## What are the crazy and scary things that will happen to public key cryptography?

Public key cryptography is not perfect. It faces some big challenges, such as:

- Key management: Public key cryptography depends on the right creation, distribution, storage, and deletion of keys. If a private key is lost or stolen, or if a public key is fake or old, the security of the communication is ruined. Therefore, it is important to have a good system for managing keys, such as a public key infrastructure (PKI), which involves roles, policies, hardware, software, and procedures for creating, managing, distributing, using, storing, and deleting digital certificates and keys. ¹
- Computational complexity: Public key cryptography needs more computing power than symmetric cryptography, because it involves hard math problems on big numbers. This can affect how fast and efficient encryption and decryption processes are, especially for big amounts of data or devices with limited power. Therefore, it is important to make the algorithms and implementations of public key cryptography better for different situations and platforms.
- Quantum computing: Quantum computing is a new technology that promises to do some tasks much faster than normal computers, using weird quantum stuff like superposition and entanglement. Quantum computing is a threat to public key cryptography, because some quantum algorithms can possibly break some of the most popular public key encryption and signature schemes, such as RSA and ECC (elliptic curve cryptography). Therefore, it is important to make new quantum-proof cryptographic schemes that can resist quantum attacks.

However, public key cryptography also has some crazy and cool opportunities for innovation and improvement, such as:

- Post-quantum cryptography: Post-quantum cryptography is a branch of cryptography that tries to make new cryptographic schemes that are safe against quantum attacks. Some examples of post-quantum cryptographic schemes are lattice-based cryptography, code-based cryptography, multivariate cryptography, hash-based signatures, etc. These schemes use different math problems that are hard for both classical and quantum computers. [^3^][1]
- Quantum-safe cryptography: Quantum-safe cryptography refers to efforts to identify algorithms that are resistant to attacks by both classical and quantum computers, to keep information safe even after a large-scale quantum computer has been built. Quantum-safe cryptography includes both post-quantum cryptography and quantum key distribution (QKD). QKD is a way of using quantum physics to generate and share secret keys securely, without relying on any mathematical assumptions. QKD can be combined with classical encryption schemes to achieve quantum-safe security.
- AI and machine learning: AI and machine learning are technologies that use data and algorithms to learn from experience and perform tasks that normally require human intelligence. AI and machine learning can have both positive and negative impacts on public key cryptography. On one hand, they can help improve the efficiency and security of cryptographic algorithms, by optimizing parameters, detecting anomalies, generating keys, etc. On the other hand, they can also pose new threats to cryptographic systems, by breaking encryption, forging signatures, impersonating identities, etc. Therefore, it is important to balance the benefits and risks of using AI and machine learning for public key cryptography.

## Conclusion

Public key cryptography is an amazing technology that enables secure online communication. It works by using two different keys: a public key and a private key. It is used for many purposes, such as secure web browsing, digital signatures, and key exchange. However, it also faces some challenges, such as key management, computational complexity, and quantum computing. It also offers some opportunities, such as post-quantum cryptography, quantum-safe cryptography, and AI and machine learning. The future of public key cryptography is exciting and uncertain, but we can prepare for it by staying informed and proactive.

## References

(1) Top 25 Quantum Cryptography & Encryption Companies [2022]. https://thequantuminsider.com/2021/01/11/25-companies-building-the-quantum-cryptography-communications-markets/

(2) Migration to Post-Quantum Cryptography | NCCoE – NIST. https://www.nccoe.nist.gov/crypto-agility-considerations-migrating-post-quantum-cryptographic-algorithms

(3) What Is Quantum-Safe Cryptography, and Why Do We Need It?. : https://www.ibm.com/cloud/blog/what-is-quantum-safe-cryptography-and-why-do-we-need-it

(4) The Quantum Threat To Cryptography: Don’t Panic, But Prepare Now: https://www.forbes.com/sites/forbestechcouncil/2022/01/11/the-quantum-threat-to-cryptography-dont-panic-but-prepare-now/

(5) Public-key Cryptography: https://en.wikipedia.org/wiki/Public-key_cryptography

(6) How does public key cryptography work?: https://www.cloudflare.com/learning/ssl/how-does-public-key-encryption-work/

## Leave a Reply