Using Linux System And Openssl Commands

Using Linux System And Openssl Commands
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 ––

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more

Order your essay today and save 30% with the discount code GRADE