Step 1: Generate key pairsīefore you can encrypt files, you need to generate a pair of keys. To explore file encryption and decryption, imagine two users, Alice and Bob, who want to communicate with each other by exchanging encrypted files using OpenSSL. The tool is usually installed by default by most Linux distributions if not, you can use your package manager to install it: $ cat /etc/fedora-release This demo uses a Fedora machine with OpenSSL installed.
OpenSSL is an amazing tool that does a variety of tasks, including encrypting files. Hence the descriptor 'key-pair' the set of keys goes hand-in-hand. The only way you can decrypt your sender's encrypted message is by using your private key. If someone wants to communicate sensitive information with you, you can send them your public key, which they can use to encrypt their messages or files before sending them to you. The other, the private key, is supposed to be a secret and never shared. One is the public key and can be freely shared with anyone you want to communicate with secretly. Public-key encryption uses two sets of keys, called a key pair. Webinar: Automating system security and compliance with a standard operating system.