Working
- Key Generation: Each user generates a pair of keys for encrypting and decrypting messages. One of the keys is made public, stored in a register or accessible file, while the other key remains private. Users collect public keys from others.
- Encryption: The sender encrypts the message using the public key of reciever. This transforms the message into an unreadable format (ciphertext). When Alice wants to send a confidential message to Bob, Alice encrypts it using Bob’s public key.
- Decryption: The recipient uses their private key to decrypt the ciphertext back to the original message (plaintext). Upon receiving the message, Bob decrypts it using his private key. Only Bob can decrypt the message because only he has his private key.
In this setup, all participants possess public keys, while private keys are locally generated and never distributed. As long as a user’s private key remains secure and undisclosed, incoming communications are safe. The system can change its private key at any time and publish the corresponding public key to replace the old one.
Asymmetric Key Cryptography
In asymmetric Key cryptography, there are two keys, also known as key pairs: a public key and a private key. The public key is publicly distributed. Anyone can use this public key to encrypt messages, but only the recipient, who holds the corresponding private key, can decrypt those messages. “Public-key cryptography” is another representation used to refer to Asymmetric Key cryptography.
This cryptographic system addresses two major challenges faced in traditional (symmetric) cryptography: key distribution and digital signatures. Asymmetric algorithms use one key for encrypting data and another, related key for decrypting it. These algorithms possess an important feature:
- It’s impossible to figure out the decryption key just by knowing the encryption key and the cryptographic algorithm.
- Either of the two keys can be used for encryption, while the other is used for decryption.
Asymmetric-key cryptography uses mathematical functions to transform plaintext and ciphertext represented as numbers for encryption and decryption, while symmetric-key cryptography involves symbol substitution or permutation. In asymmetric-key cryptography, plaintext and ciphertext are treated as integers, requiring encoding and decoding processes for encryption and decryption.