Question: Step 3 : Explaining the Advantages of SHA - 2 5 6 over MD - 5 and SHA - 1 ( Question 2 a )
Step : Explaining the Advantages of SHA over MD and SHAQuestion a
Explanation:
MDMessage Digest and SHASecure Hash Algorithm are cryptographic hash functions that produce a fixedsize hash value from an input data. However, they are both considered weak and vulnerable to collision attacks, where two different inputs produce the same hash value. SHA has been deprecated for cryptographic use since due to its vulnerabilities.
SHASecure Hash Algorithm is a more secure cryptographic hash function that produces a bit hash value. It is part of the SHA family of hash functions, which also includes SHA SHA and SHA SHA is widely used for digital signatures, password hashing, and other cryptographic applications.
Hashing data with SHA provides several advantages:
Security: SHA is considered secure against collision attacks and cryptanalysis, making it suitable for secure data transmission and storage.
Verifiability: The hash value produced by SHA can be used to verify the integrity of the data. If the data changes, the hash value will also change, indicating that the data has been tampered with.
Efficiency: SHA is efficient in terms of computational resources, making it suitable for use in various applications, including digital signatures and password hashing.
To demonstrate the difference in security between MD and SHA we can use a Python script to calculate the hash values of two different inputs using both algorithms:
import hashlib
# Input data
inputdata bhello
inputdata bworld
# Calculate MD hash
mdhash hashlib.mdinputdatahexdigest
mdhash hashlib.mdinputdatahexdigest
# Calculate SHA hash
shahash hashlib.shainputdatahexdigest
shahash hashlib.shainputdatahexdigest
printMD Hash of 'hello':", mdhash
printMD Hash of 'world':", mdhash
printSHA Hash of 'hello':", shahash
printSHA Hash of 'world':", shahash
In this example, the MD hash values for "hello" and "world" are the same dabcbabdc indicating a collision. However, the SHA hash values are different cfdbafbaeebacbeebecfaeb and cfeffaeaabbfbdc
Question: I recived this answer before, but i think the example is wrong because when i tried this example i got different MD for "hello" and "world". Can you provide another example for this?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
