Question

In: Computer Science

Using OpenSSL from the command line interface. Please solve all the following questions. I also need...

Using OpenSSL from the command line interface. Please solve all the following questions. I also need the screenshots for every part.

a. Create a text file with some input and encrypt it using

i. AES-128 CBC

ii. AES-256 CTR

iii. DES

b. Create a 2048 bit RSA public and private key

Solutions

Expert Solution

OpenSSL is cryptography toolkit which can be used for encryption and decryption of files and messages.

Now let's move to the question:-

A)Assume that you have created a file named "ashok.txt" with some personal input and you want to encrypt it.

i) Encrytion with  AES-128 CBC:-

Open the command line interface of your pc which may have windows or linux and type there:-

Note: You can download OpenSSL from their official website and install in your system incase there is no OpenSSL but most of the linux distro have already pre-installed OpenSSL.

 

i) openssl enc -aes-128-cbc -salt -in ashok.txt -out ashok.txt.enc

ii) Encrytion with AES-256 CTR:

openssl enc -aes-256-ctr -salt -in ashok.txt -out ashok.txt.enc

iii)DES:-

Decryption of both AES-128 CBC and AES-256 CTR:- Same file will be decrypted:

AES-128 CBC DES:-

openssl enc -aes-128-cbc -d -in ashok.txt.enc -out ashok.txt

AES-256 CTR DES:-

openssl enc -aes-256-ctr -d -in ashok.txt.enc -out ashok.txt

syntax Explanation:-

openssl= cmd line tool

enc= encryption with ciphercodes

aes-256-ctr and aes-128-cbc= Encryption methods

salt= makes more powerful encryption

in= input data or file

ashok.txt= original file(without encrypted)

ashok.txt.enc= Encrypted file

out= output file

d= Decrypts data

B)Create a 2048 bit RSA public and private key:-

2048 bit RSA public key generation:-

command:- openssl genrsa -des3 -out public.pem 2048

2048 bit RSA private key generation:-

command:- openssl genrsa -des3 -out private.pem 2048

Please consider a thumbs-up(like),it really helps to be motivated.>3

#TIA


Related Solutions

Please solve all the following questions. I need the text file and screenshots of encryption and...
Please solve all the following questions. I need the text file and screenshots of encryption and decryption. Exchange of encrypted data. a. Encrypt a file (e.g., a text file) with an algorithm and a key length of your choice. b. Exchange the file and the necessary credentials for decryption (i.e., algorithm, key) with your neighbor. c. Decrypt the secret of your neighbor.
Please look at the following code. When I run it from the command line, I am...
Please look at the following code. When I run it from the command line, I am supposed to get the following results: 1: I am 1: I am I need to fix it so that the functions 'print_i' and 'print_j' print all of their lines. What do I need to add? Thank you. C source code: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <pthread.h> #include <unistd.h> // These two functions will run concurrently void* print_i(void *ptr) { printf("1: I am...
Windows XP Command Line questions. a) What is the command to display all of the files...
Windows XP Command Line questions. a) What is the command to display all of the files on the disk in drive A:--do not use the DIR command or the CHKDSK command C:\> b) Display the contents of the PERSONAL.FIL file located in the root directory of drive A: one screenful at a time C) Display the contents of the PERSONAL.FIL file located in the root directory of drive A:, one screenful at a time, beginning with the 25th record, on...
I need an answer to all three questions, please. Q1: Which of the following was not...
I need an answer to all three questions, please. Q1: Which of the following was not a policy response to the Economic crisis associated with the COVID-19 Crisis? Select one: a. The Fed lowered the policy rate by roughly 1.5 percentage points to nearly zero. b. The U.S. Congress passed a roughly $3 Trillion economic stimulus package. c. The Commonwealth of Massachusetts relaxed the balanced budget rule in the State Constitution. d. The Fed introduced facilities to keep markets liquid...
(I also need to know how to solve this on a TI-83) 6. For the following...
(I also need to know how to solve this on a TI-83) 6. For the following data set: x 5.7 4.1 6.2 4.4 6.5 5.8 4.9 y 1.9 4.8 0.8 3.9 1.2 1.7 3.0 (A) Compute the coefficient of determination. (B) How much of the variation in the outcome variable is explained by the least-squares regression line?
******IN JAVA******** I need the following interface implemented accordingly. It is a linked list. The interface...
******IN JAVA******** I need the following interface implemented accordingly. It is a linked list. The interface can be found below: List.java public interface List<T> extends Iterable<T> { /** * Insert an element at a specified location. * @param index * @param obj * @throws IndexOutOfBoundsException */ public void add(int index, T obj); /** * Append an object to the end of the list. * @param obj */ public boolean add(T obj); public void clear(); public boolean contains(T obj); /** *...
**Need to use awk command in putty (should be a ONE LINE COMMAND) Write the command...
**Need to use awk command in putty (should be a ONE LINE COMMAND) Write the command that would find all lines that have an email address and place a label email = before the line in the file longfile output will multiple lines similar to this one : using a good awk command the output would be something like this email = From: "Linder, Jann/WDC" <[email protected]> email = To: Mr Arlington Hewes <[email protected]> email = > From: Mr Arlington Hewes...
Please answer the below questions ( I need answers for all the below questions). Thank you...
Please answer the below questions ( I need answers for all the below questions). Thank you True or False Write true if the statement is true or false if the statement is false. _______ The heart consists mainly of muscle. _______ Blood pressure is highest in veins. _______ Atherosclerosis is the buildup of plaque inside arteries. _______ Platelets are blood cells that fight infections. _______ Peripheral gas exchange takes place in the lungs. _______ Food travels from the mouth to...
Please solve all of the questions, questions 1, 2, and 3. Please show all work and...
Please solve all of the questions, questions 1, 2, and 3. Please show all work and all steps. 1.) Find x(t) = Σ aktk such that tx'' = x 2.) Find x(t) = Σk>=0 aktk such that x'' = tx + 1 and x(0) = 0, x'(0) = 1 3.) Using the Frobenius method, solve t2x'' - 3tx' + (4-t)x = 0
Can you please solve these questions/ statements using python? I started with "importing" the file. I...
Can you please solve these questions/ statements using python? I started with "importing" the file. I only need question one to be answered not two-four. Can use whatever data frame of choice, I just need a sample code for each line. Thank you #1. #Fit a linear regression model on data: USA_housing.csv to predict the Price of the house. import pandas as pd housing_df = pd.read_csv("USA_Housing.csv") #Income: Avg. area income #Age: Avg age of the houses #Bedrooms: Avg No of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT