In asymmetric encryption two keys are generated; a public key and a private key. This public key can be distributed freely and the private key must remain private to ensure the integrity of the system.
At this stage there are essentially two uses for this form of encryption: To send an encrypted message or to create a message that can only ever have come from the Private key holder. These are commonly known as Public Key Encryption and Digital Signatures respectively.
With the first method, Public Key Encryption, a message would be encrypted using the Public Key. This message could only then be read by the holder of the Private Key, even though the message was encrypted using the Public Key another person with the Public Key would not be able to decrypt the message.
An example of this might be a website for password authentication, there would only be one Private Key holder, which would be the host of the website and the Public Key would be freely distributed to the sites’ visitors. When a password is entered it is encrypted using the Public Key and transmitted to the website, the website would then decrypt the message using their Private Key and ensure it matches the password stored on their system.
The most common analogy for this is: that of a locked mailbox with a mail slot, the mail slot is available to anyone and anyone can put a message in the mailbox, however, only someone with the key to the mailbox can access these messages.
Public Key encryption isn’t commonly used in cryptocurrencies.
You may have heard the phrase “A transaction is signed by the private key” or something similar when talking about cryptocurrency transactions. This is referring to this form of cryptography and is what ensures that when funds are sent they are sent by the correct holder of the wallet.
With a digital signature a message is encrypted by the Private Key and the Public Key is shared freely. This message can be easily read by anyone with the Public Key, however, because the Public Key is able to decrypt the message it must have been encrypted using the Private Key, hence we can be confident that whomever sent the message held the private key.
To continue with the mailbox analogy, this is essentially the opposite system, only the holder of the Private Key can put mail into the mail box but anyone with the Public Key can access it.
With cryptocurrencies whenever a transaction is sent it is “signed” in this manner ensuring the integrity of the transaction.
Please note that this whole system does assume that whoever holds the Private Key is the correct owner of the wallet and as such it is of vital importance that you ensure that your Private Key remains secure and is not shared.
How secure is asymmetric encryption?
This is a good question, however, it is akin to asking how secure is a car? Essentially Public Key Cryptography is as secure as the method used to generate the key.
At this time whilst this form of encryption is not unbreakable (in fact the only entirely secure system of cryptography is known as the one time pad) it is not feasible to break this form of encryption and it is much much more likely that someone will steal a private key via hacking or social engineering than the encryption will be broken.