Definition
A secret key is a confidential parameter used to encrypt and decrypt data in cryptographic processes. It could be a phrase, password, or random sequence of bits. The longer and more random a key is, the harder it is to crack with brute force or dictionary attack.
How Does a Secret Key Work in Asymmetric Encryption?
Here’s how secret keys are used in asymmetric cryptography:
- The sender gets the receiver’s public key
- The sender encrypts the message with the public key
- The sender sends the encrypted message to the receiver
- The receiver decrypts the message with the secret key
How Does a Secret Key Work in Symmetric Encryption?
Here’s how symmetric encryption uses secret keys:
- The sender and receiver agree on a secret key to use.
- The sender sends the secret key to the receiver (or vice versa).
- The sender encrypts the message with the secret key and turns it into ciphertext.
- The sender sends the encrypted message to the receiver.
- The receiver decrypts the message with their secret key.