Question

In: Computer Science

To demonstrate the practical implementation of the public\private encryption, you have been asked to compete the...

To demonstrate the practical implementation of the public\private encryption, you have been asked to compete the following task.

i. Type the following message in a .txt file: “My student ID is : >

ii. Download the public key given in this assignment folder and encrypt your message with the same key using openssl. iii. Using openssl, generate RSA key pair (2048bits) in your computer.

my student id is 40926

Solutions

Expert Solution

Public key encryption technique allows a person 'A' to send his public key to his friend 'B' through an open and insecure channel. Then, friend 'B' can use that public key to encrypt a message and return it to the original person 'A'. Moreover, this public key encrypted message can now be decrypted by the use of only its corresponding private key, which is present with person 'A' only.

OpenSSL, a free software, provides us the Secure Sockets Layer (SSL) protocol and enables us for secure communication.

Part 1: In this part we can create a file sample.txt with message " my student id is 40926" as following.

            1. touch sample.txt

            2. echo 'my student id is 40926' > sample.txt

Part 2: Assume that we have a given public in the ".pem" format as "public-key.pem", we can use the following command to encrypt the "sample .txt" file having a message "my student id is 40926" .

openssl rsautl -encrypt -in sample.txt -out sample_encrypted_file.txt -pubin -inkey public-key.pem

So after the above command, an encrypted file "sample_encrypted_file.txt" will get created, and we need a private key corresponding to the public-key.pem to decript it.

Further, to decript it and get the file "sample_decripted.txt" corresponding to the original file "sample.txt" we need to run the following command.

openssl rsautl -decrypt -in sample_encrypted_file.txt -out sample_decripted.txt -inkey private-key.pem

------------------------------------------------------------------------------------------------------------------------------------------------

Part 3: To generate the public/private key RSA pairs, we need to follow the following steps

1. Generate a private key using the following command.

openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:2048 -out private-key.pem

The above command will generate a private key "private-key.pem" using the RSA algorithm and having 2048 bit size.

2. Now, we need to generate a public key associated with this private key, according to the following command .

openssl pkey -in private-key.pem -out public-key.pem -pubout

Above command uses the "private-key.pem" private key and generates a public key "public-key.pem" associated to it.

Togeteher, step 1 and 2 generates the RSA public/private key pairs.

So, now person 'B' can encrypt a message using the public key "public-key.pem" which is given by person 'A' and send it to through the network. Moreover, 'A' can decrypt it using the associated private key "private-key.pem".

Further, details associted to the "openssl" can be found using following command.

openssl help

Related Solutions

You the auditor have been asked to audit a public traded company and you are looking...
You the auditor have been asked to audit a public traded company and you are looking for materiality. What would you gather ? what areas should you focus on ??
You are the public information officer of a busy health organization, and you have been asked...
You are the public information officer of a busy health organization, and you have been asked by the executive director to train key personnel in the organization on effective media communication. Prepare a curriculum for the training. Include why healthy relationships with the media are important, how they can be established, and tips to communicate effectively.  
You have been asked to value a private company using Method of Comparables. You believe you...
You have been asked to value a private company using Method of Comparables. You believe you have found a comparable publiccompany with the following data (in millions): Sales         $22,534.00 Earnings           $5,254.00 Book value         $13,422.32 Market value         $85,432.23 You were given the following data of the private company (in millions): Sales         14,324.23 Earnings           8,323.11 Book value         10,333.10 Number of shares outstanding         23,000.00 Please use Price/Sales, Price/Earnings, and Price/Book to calculate the estimated price per share for the private company. Please use...
WHAT ARE THE DIFFERENCES BETWEEN PUBLIC KEYS AND PRIVATE KEYS IN TERMS OF ENCRYPTION METHODS AND...
WHAT ARE THE DIFFERENCES BETWEEN PUBLIC KEYS AND PRIVATE KEYS IN TERMS OF ENCRYPTION METHODS AND BITS WISE UNDERSTANDING?
You have been asked by the government of your home country to advise on public policy...
You have been asked by the government of your home country to advise on public policy for innovation and entrepreneurship. Discuss your response, in the context of your country’s particular economic and innovation aspects.
As a representative of your county’s public health system, you have been asked to speak to...
As a representative of your county’s public health system, you have been asked to speak to a community group that is protesting the collection of health information about the community’s citizens. You must try to convince them that the collection of this information will be done to protect the health of the entire community by stopping the spread of communicable diseases. Compose the text of a speech in which you cover the following points: 1) why it is important for...
You are a public health researcher. You have been asked to identify a vaccine-preventable disease. Your...
You are a public health researcher. You have been asked to identify a vaccine-preventable disease. Your research design should focus on determining why health care workers are not receiving the vaccination for your selected vaccine-preventable disease in their place of employment. The presentation should also include the following: Researched and identified the disease to create a research plan An introduction and synopsis of the selected disease History of the public health issue or disease Social or behavioral antecedents related to...
RSA: Public and Private Key Encryption im doing this on an ubuntu virtual machine but unsure...
RSA: Public and Private Key Encryption im doing this on an ubuntu virtual machine but unsure how to Create your public and private keys and create and encrypted message using python Then encrypt the message with your private key I need output of a Message you sent (in plain text and encrypted) Message you received (in plain text and encrypted)
RSA: Public and Private Key Encryption im doing this on an ubuntu virtual machine but unsure...
RSA: Public and Private Key Encryption im doing this on an ubuntu virtual machine but unsure how to Create your public and private keys and create and encrypted message using python Then encrypt the message with your private key I need output of a Message you sent (in plain text and encrypted) Message you received (in plain text and encrypted)
You have been asked to value Ausbiz, a private company, using an excess earnings method, given...
You have been asked to value Ausbiz, a private company, using an excess earnings method, given the following information: Working capital balance = $365,000 Fair value of fixed assets = $725,000 Book value of fixed assets = $500,000 Normalized earnings of firm = $105,000 Required return on working capital = 7.0 percent Required return on fixed assets = 8.0 percent Required return on intangible assets = 12.0 percent Weighted average cost of capital = 10.0 percent Long-term growth rate of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT