ECE 404 Homework #8 solution




5/5 - (5 votes)

To better understand the Secure Hash Algoritm (SHA), use the BitVector module to create an
implementation of SHA-512.
Program Requirements
Your program should have the following call syntax :
An explanation of this syntax is as follows:
• Read the text (in ASCII format) from the input file specified by the first command-line
argument. Do not strip or remove any characters (e.g. newlines) when reading the input file.
• The hash is written in hexstring format to the file specified by the second argument.
You can include the round constants Ki
in the program file.
You can check the correctness of your work by comparing the hash values produced by your code
with those produced by Python’s hashlib library:
Submission Instructions
• Make sure to follow program requirements specified above. Failure to follow these instructions may result in loss of points!.
• For this homework you will be submitting 1 file electronically. Your submission must include:
– The file containing your code for your SHA-512 implementation.
• In your program file, include a header as described on the ECE 404 Homework Page.
• If using Python, please denote the Python version in your code with a shebang line (e.g.
#!/usr/bin/env python3)
• Please include comments in your code.
Electronic Turn-in
turnin -c ece404 -p hw08 (if using Perl)
turnin -c ece404 -p hw08 (if using Python)