Question

(3) Using OpenSSL from the command line interface a. Create a text file with some input...

(3) Using OpenSSL from the command line interface

a. Create a text file with some input and encrypt it using AES-128 CBC AES-256 CTR DES

b. Create a 2048 bit RSA public and private key

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a. Create a text file with some input and encrypt it using AES-128 CBC AES-256 CTR DES

A text file is created with file name message.txt

The command syntax to encrypt file specifying the encryption algorithm is:

$ openssl <Encryption Algorithm> -e -in <InputFile> -out <OutPutFileName>

The command syntax to encrypt file specifying the encryption algorithm is:

$ openssl <Encryption Algorithm> -d -in <EncryptedFile> -out <OutPutFileName>

Encrypt the file using AES-128 CBC is

$ openssl aes-128-cbc -e -in message.txt -out message.txt.enc

Encrypt the file using AES-256 CTR is

$ openssl aes-256-ctr -e -in message.txt -out message.txt.enc

Encrypt the file using DES is

$ openssl des -e -in message.txt -out message.txt.enc

The output of the encrypted files are verified by decrypting the files.

Sample Output:

b. Create a 2048 bit RSA public and private key

Command to generate private key is:

$ openssl genrsa -out PrivateKey.key 2048

We have to extract the public key from the private key. The command is

$ openssl rsa -in PrivateKey.key -out PublicKey.key -pubout -outform PEM

-outform : output format to be spcified

Sample Output:

Add a comment
Know the answer?
Add Answer to:
(3) Using OpenSSL from the command line interface a. Create a text file with some input...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Create a textfile called input.txt that contains the string “Hello World!” a. Using openssl, encrypt the...

    Create a textfile called input.txt that contains the string “Hello World!” a. Using openssl, encrypt the input file using CBC, where the DES algorithm is used. Name the output file output.enc What is the command you used to perform the task above? b. Now decrypt the output.enc file and name the file decrypted.txt What is the command you used to perform this task? c. Use openssl to generate MD5 message digest of input.txt and decrypted.txt What is the command you...

  • 1. Create an RSA private key 2. Output the key in a text format so that it shows the following:     modulus     public e...

    1. Create an RSA private key 2. Output the key in a text format so that it shows the following:     modulus     public exponent (e)     private exponent (d)     the primes (p and q) Send me a file called key.txt with this information. 3. Using openssl's rsautl option encrypt this message to me: "NAME" using the public key that's embedded with the private key above. Attach a file named encrypted.txt that contains the encrypted message. Hint: Copy the text above and put...

  • your answer. Refer to attack scenarios on mutual authentication protocols that were discussed during the Lecture-7 and...

    your answer. Refer to attack scenarios on mutual authentication protocols that were discussed during the Lecture-7 and Tutorial-7.] 5 Marks] Q5 (OpenSSL and IPFS) Assume that the School of Science of RMIT University is planning to use IPFS-based repository of sensitive files for sharing among staffs. An owner of a particular file, say Alice wants to share the file to her supervisor, say Bob. Therefore, Alice encrypts the file with Alice and Bob's shared AES secret key (KaB) using OpenSSL,...

  • // can someone explain the code line by line shortly.thanks import java.security.KeyPair; import ...

    // can someone explain the code line by line shortly.thanks import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PrivateKey; import java.security.PublicKey; import java.util.Base64; import java.util.HashMap; import java.util.Map; import javax.crypto.Cipher; // Java 8 example for RSA encryption/decryption. // Uses strong encryption with 2048 key size. public class GlobalMembers { public static void main(String[] args) throws Exception { String plainText = "Hello World!"; // Generate public and private keys using RSA Map<String, Object> keys = getRSAKeys(); PrivateKey privateKey = (PrivateKey) keys.get("private"); PublicKey publicKey = (PublicKey)...

  • The question asks you to assume that your input file is an English text that may...

    The question asks you to assume that your input file is an English text that may contain any character that appears on keyboard of a computer. The task is to read each character from the input file and after encrypting it by adding an integer value n (0 < n < 128) to the character, to write the encrypted character to output file. We are supposed to use command line arguments and utilize argc, and argv parameters in main function...

  • in c++ what is an example of command line input parsing. Like a small program which...

    in c++ what is an example of command line input parsing. Like a small program which is using the command line input to get the file name and will open that file and read the content from it. The program also has a function that will form an action on what is inside the text file.

  • Objective: Use input/output files, strings, and command line arguments. Write a program that processes a text...

    Objective: Use input/output files, strings, and command line arguments. Write a program that processes a text file by removing all blank lines (including lines that only contain white spaces), all spaces/tabs before the beginning of the line, and all spaces/tabs at the end of the line. The file must be saved under a different name with all the lines numbered and a single blank line added at the end of the file. For example, if the input file is given...

  • Implement in Go language AES encryption mode CBC with providing the packages name for Go language....

    Implement in Go language AES encryption mode CBC with providing the packages name for Go language. You can implement AES-ECB Mode (the basic AES) from crypto/aes package and crypto/cipher.Block. You can also get the SHA-256 hash function from crypto/sha256. You can get the secure random numbers generator from crypto/rand package. However, the you will implement both CBC mode and HMAC from scratch. You are NOT allowed to use any libraries or packages to implement these two things for you. You...

  • Using the IST Linux system create the following Java command line inheritance application Lab4. Create the...

    Using the IST Linux system create the following Java command line inheritance application Lab4. Create the following project Java files: Point.java, Shape.java, Circle.java, Triangle.java, Rectangle.java, and Lab4.java Point.java will contain two coordinates x and y. This will be reused to create point objects to draw all the shapes. Shape.java will be the parent class and will contain a Point type. Circle.java, Triangle.java, Rectangle.java will all be children of Shapes.java class Each class (Circle, Triangle, Rectangle) will contain the private class...

  • Write a program that reverses a text file by using a stack. The user interface must...

    Write a program that reverses a text file by using a stack. The user interface must consist of 2 list boxes and 3 buttons. The 3 buttons are: Read - reads the text file into list box 1. Reverse - reverses the items in list box 1 by pushing them onto stack 1, then popping them from stack 1 (in the reverse order) and adding them to list box 2. Write - writes the contents of list box 2 to...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT