[go: up one dir, main page]

0% found this document useful (0 votes)
37 views1 page

11.1 Asymmetric Encryption Using Openssl

The document outlines the steps for asymmetric encryption using OpenSSL. It details the creation of private and public keys for two individuals, Joy and Ayleen, and the process of encrypting and decrypting a message. The instructions include generating keys, exchanging public keys, and using them to encrypt and decrypt a message file.

Uploaded by

tonycubahiro24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views1 page

11.1 Asymmetric Encryption Using Openssl

The document outlines the steps for asymmetric encryption using OpenSSL. It details the creation of private and public keys for two individuals, Joy and Ayleen, and the process of encrypting and decrypting a message. The instructions include generating keys, exchanging public keys, and using them to encrypt and decrypt a message file.

Uploaded by

tonycubahiro24
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Asymmetric Encryption using openssl

1. Create a Private Key for Joy

openssl genrsa -aes256 -out joy_private.pem 2048

2. Get the Public Key for Joy

openssl rsa -in joy_private.pem -pubout > joy_public.pem

3. Create a Private Key for Ayleen

openssl genrsa -aes256 -out ayleen_private.pem 2048

4. Get the Public Key for Ayleen

openssl rsa -in ayleen_private.pem -pubout > ayleen_public.pem

5. Exchange the Public Keys with each other

6. Joy encrypts the message using Ayleen’s public key

openssl rsautl -encrypt -inkey ayleen_public.pem -pubin -in hello.txt -out


encrypted_file.txt

7. Send the encrypted file to Ayleen

8. Ayleen decrypts the message using her private key

$ openssl rsautl -decrypt -inkey ayleen_private.pem -in encrypted_file.txt > top_secret.txt

You might also like