Using Linux System And Openssl Commands

Using Linux System And Openssl Commands

Check before you submit. Get Turnitin Score Report in 15 Minutes.

Don't risk the 'Red' score. Get the exact same Turnitin report your professor uses. Join 50,000+ students who submitted their essays with confidence this semester.

Cryptographic Tasks General Instructions: Perform all the given tasks below. In your submission, do both specify the commands that you use (including their arguments), and also answer the asked questions. Correct answers submitted, but without the corresponding commands described, will only obtain partial marks.

Task 2: SHA1 Digest Generation Download a bmp image file tux.bmp. Using openssl command, generate the SHA-256 digest of the file. Specify the openssl command you use, and the outputted digest. Additionally, use the sha256sum command in Linux to generate the digest, and compare it with your openssl’s result. (Note: Recall that SHA-256 is a hash function in the SHA-2 hash family. Its digests are 256 bits.)

Task 3: MAC/Keyed-Hash using HMAC Using openssl command, generate the MAC (keyed-hash) of the tux.bmp file using HMAC

with SHA-256. Use the following (alphanumeric string) key: tic23012122. Specify your

command and the generated MAC.

Task 4: AES Encryption in ECB Mode Use openssl command to encrypt the tux.bmp and output tux2.bmp using 128-bit AES in the Electronic Code Book (ECB) mode-of-operation using the (hex-digit string) key: abcdef12345678. As the weak ECB mode does not use an IV, no IV should be supplied. Do

specify the encryption command that you use, and also the SHA-256 digest of the tux2.bmp. After that, do overwrite the first 54 bytes of tux2.bmp with the corresponding 54 bytes of

the original (image) file tux.bmp, so that tux2.bmp can be a legitimate and viewable bmp

file. You can use a free hex editor, such as bless or ghex, for this bmp-header overwriting. To install bless or ghex, simply run: sudo apt-get install bless | ghex. To view bmp

files, you can use a pre-installed image viewer program eog (Eye of GNOME). Is Tux the penguin still (somewhat) noticable/inspectable in the final tux2.bmp file whose header has been overwritten? Why or why not? Please include the screenshot of tux2.bmp

as shown by your image viewer software as your proof of work. Hint: You can use openssl enc command to perform the encryption. To see what

arguments that the openssl enc command takes, you can run man enc. In editing the

header of your tux2.bmp file, note that you may need to first cut the file’s first 54 bytes

before pasting the corresponding bytes copied from tux.bmp. Also note, for your byte-block selection operation, that 54 = 0x36.

Task 5: AES Encryption in CBC Mode Now, encrypt the tux.bmp file to output tux3.bmp using 128-bit AES in the CBC (Cipher Block Chaining) mode-of-operation using the (hex-digit string) key: abcdef12345678 and IV

(also in hex-digit string): 12345678abcdef. Do specify the encryption command that you

use, and also the SHA-256 digest of the tux3.bmp outputted by openssl. After that, again do overwrite the first 54 bytes of tux3.bmp with the corresponding 54 bytes

of the original (image) file tux.bmp. Now, can you still notice/inspect Tux the penguin in the final tux3.bmp file whose header has been overwritten? Why or why not? Please include the

screenshot of tux3.bmp as shown by your image viewer software as your proof of work.

Task 6: Random Number Generations First, use a Linux command and a hex-dump like xxd to get 48 bytes from your system’s

/dev/urandom and then hex-encode the returned bytes, so that you can represent the bytes in hexadecimal string format. Subsequently, repeat the same Linux command to get 48 bytes from /dev/urandom and use openssl to base64-encode the returned bytes, so that the bytes are represented in ASCII string format. Try running your 2 generation-then-encoding operations at least 5 times each. For your submission, specify the commands that you use for the two tasks above; and also write down any 2 hex strings and any 2 base64 strings that you obtain. Next, use a Linux command and openssl to get 48 bytes from your system’s /dev/random and then base64-encode the returned bytes. Try running your generation-then-encoding operation 10-20 times successively. (In Linux, you can use the “up arrow” key to quickly recall the last shell command executed, so that you can successively repeat your employed shell command in an easy manner.) For your submission, specify the Linux and openssl commands that you use; and also write down any 2 base64 strings that you obtain. Lastly, tell what could be the issue with running the command successively multiple times. Hints: To extract/output the first few bytes of a file in Linux, you can use the head command.

Do check the corresponding man page man head to use the command’s right option/flag. To find out more about /dev/urandom and /dev/random, you can run man 4 random. Additionally, you also can read about them at: https://en.wikipedia.org/wiki//dev/random. Lastly, you can use openssl enc command to perform a base64 encoding operation.

–– End of Assignment ––

Essay writing help – Using Linux System And Openssl Commands Online Essay Writing Agency – Essay Shredder.

Write my Essay. Premium essay writing services is the ideal place for homework help or essay writing service. if you are looking for affordable, high quality & non-plagiarized papers, click on the button below to place your order. Provide us with the instructions and one of our writers will deliver a unique, no plagiarism, and professional paper.

Get help with your toughest assignments and get them solved by a Reliable Custom Papers Writing Company. Save time, money and get quality papers. Buying an excellent plagiarism-free paper is a piece of cake!

All our papers are written from scratch. We can cover any assignment/essay in your field of study.

PLACE YOUR ORDER