## Introduction

## How does public key cryptography work?

In the RSA scheme, keys are generated using a modulus that is arrived at by multiplying two numbers (often two large prime numbers). In basic terms, the modulus generates two keys (one public that can be shared, and one private that should be kept in secret). The RSA algorithm was first described in 1977 by Rivest, Shamir, and Adleman (hence, RSA) and remains a major component of public key cryptography systems.

## PKC as an encryption tool

Public key cryptography solves one of the long-standing problems of symmetric algorithms, which is the communication of the key that is used for both encryption and decryption. Sending this key over an insecure connection risks exposing it to third parties, who can then read any messages encrypted with the shared key. Although cryptographic techniques (such as the Diffie-Hellman-Merkle key exchange protocol) exist to solve this problem, they are still vulnerable to attacks. In public key cryptography, by contrast, the key used for encryption can be shared securely over any connection. As a result, asymmetric algorithms offer a higher level of protection when compared to the symmetric ones.

## Generating digital signatures

Another application of asymmetric cryptography algorithms is that of authenticating data through the use of digital signatures. Basically speaking, a digital signature is a hash created using the data in a message. When that message is sent, the signature can be checked by the recipient using the sender's public key. This way, they can authenticate the source of the message and ensure that it has not been tampered with. In some cases, digital signatures and encryption are applied together, meaning the hash itself may be encrypted as part of the message. It should be noted, however, that not all digital signature schemes use encryption techniques.

## Limitations

Although it can be used to enhance computer security and provide verification of message integrity, PKC does have some limitations. Owing to the complex mathematical operations involved in encryption and decryption, asymmetric algorithms can be quite slow when forced to deal with large amounts of data. This type of cryptography also depends heavily on the assumption that the private key will remain secret. If a private key is accidentally shared or exposed, the security of all messages that have been encrypted with its corresponding public key will be compromised. It is also possible for users to accidentally lose their private keys, in which case it becomes impossible for them to access the encrypted data.

## Applications of public key cryptography

This type of cryptography is used by many modern computer systems to provide security for sensitive information. Emails, for example, can be encrypted using public key cryptography techniques to keep their contents confidential.

The secure sockets layer (SSL) protocol that makes secure connections to websites possible also employs asymmetric cryptography. PKC systems have even been explored as a means of providing a secure electronic voting environment that would potentially allow voters to participate in elections from their home computers.

Once a transaction has been verified by confirming the hash contained in the digital signature, that transaction can be added to the blockchain ledger. This system of digital signature verification ensures that only the person who has the private key associated with the corresponding cryptocurrency wallet can move the funds.

## Closing thoughts

From computer security to verifying cryptocurrency transactions, public key cryptography plays an important role in securing modern digital systems. By using paired public and private keys, asymmetric cryptography algorithms resolve fundamental security concerns presented by symmetric ciphers. Although PKC has been in use for many years, new uses and applications are regularly being developed for it, particularly in the blockchain and cryptocurrency space.