Crypto Academy Season 3 Week 2 Homework Post for (@pelon53) - Hash and Cryptography

in SteemitCryptoAcademy3 years ago

Hello friends. In this lecture, the professor talked about the hashing and cryptography. Now i am going to write the homework for professor @pelon53.

Screenshot (1170).png



1- Explain what does the resistance to collision mean? And what does resistance to preimage mean?

The hashing is used to encrypt the data. This is a mathematical function which the user use to secure the data. The hash mathematical function is applied on the input of different length. Then an output is produced and the length of output is fixed. We applied the hash function on the input message and produced an output whose length is fixed. The output is in alphanumeric form which cannot be repeat. This is a way to safe the data. The input is encoded and these encoded information is very secure.

Collision of Resistance


The Hash function have some properties. The Collision of resistance occur when two input whose length is varied generate the same output. In collision, the input of infinite length produce the same output of finite length. It is said that collision occur when the two different input produce the same hash function. The input is infinite but the output is finite.

There are very hard cases when there are the two inputs who generate the same output. The hash function is use to secure the blockchain. The hash function is reliable and safe the blockchain from any sort of attack. The hash function is designed in such a way that the collision does not occur. Because if it is difficult to find the two identical outputs, then the hash function is more secure. A hash function is more collision resistance if it get more difficult to find two input who generate the same output.

The Collision of resistance make the system more secure because this make it harder to produce the same output from two different input.

The SHA-256 is known as the collision resistance. Here it is impossible or most difficult to find the input who generate the same output. The conflict has been found in SHA-0 and SHA-1 and they both have lost their trust. Now user do not trust on both these SHA because in these SHA, the collision has been discovered. These are not now considerate the more secure collsiion resistance.

Resistance of Preimage

The second property of hash function is Resistance of preimage. This property is invertible. In this case, it is not possible to generate the input back from the output. It is impossible to convert the output into the original form. You cannot produce the input from output.

The input is converted into the output but when you get the output, you cannot reverse the process. You cannot get the input back.

In resistance of preimage, if you convert the input into output, you cannot then get the input back. You cannot reverse the process.

This property ensure that no output can generate the input. The resistance of preimage is not invertible. Once you get the output, you cannot invert it and cannot generate the output back.



Collision of resistance

Resistance of preimage
Not possible to get the input who produce the same outputNot possible to get the input back from output
The length of input is infinite but the length of output is finiteLength does not matter
Property of hash functionThis is also a property of hash function
More secure because no two input can generate same outputSecure because no malicious person can get what the input was



2- Use tronscan and etherscan to verify the hash of the last block and the hash of that transaction. Screenshot is required for checking.


Etherscan

When you open the Etherscan.io website, you get the transaction which occur on the network.

Screenshot (741).png

Click on the latest block. You can see that the name of minor who mined this block is.

Screenshot (742).png

When you click on the block, all detail of block is appeared.

Screenshot (743).png

Screenshot (744).png

When you copy the hash and paste it into the search bar, you get the same pages back. You can search the block by hash function.

Screenshot (749).png

Tronscan

When you open the tronscan.org website, you get the transaction which are occur on the tronscan network.

You see the following page.

Screenshot (745).png

Screenshot (746).png

Click on the latest block and you get the all information about the block.

Screenshot (747).png

When you copy the hash on the search bar, you get the same block page back.

Screenshot (748).png



3- Generate the hash using SHA-256, from the word CryptoAcademy and from cryptoacademy. Screenshot required. Do you see any difference between the two words? Explain.


Visit the website. A page will appear and write the "cryptoacademy" there.

You will get the hash function of that word.

Screenshot (750).png

If you write the "CryptoAcademy" on the box, then you will get the different hash function. Its mean that no two different input can produce the same output.

Screenshot (751).png

You can see that the hash of the two words are different. First we wrote the word in small letters(cryptoacademy) and the hash function was appear. But when you wrote two capital letters and wrote the word "CryptoAcademy" then the hash was different. The hash of same word which was written in different way was different. We see that the hash function is super secure because no collision can occur. No two input can generate the same hash at all. This fullfil the first property of hash function.


4- In your own words explain the difference between hash and cryptography.

The hash function is a mathematical function which is use to encrypt the data. The data which is encrypted through the hash function is not readable. The hash of same word is different on different blockchain.

The hash function is highly secure and reliable. The people use this to secure their information. The cryptography method is use to make the data secure and safe from malicious attacks. The cryptography method all fall in hash function but the hash function all are not counted as the cryptography.

The hash function is usually use to hide your data. No one can read this data. The cryptography is use in communication method to verify the sender and receiver of messages. You convert your information into a form which is not readable. The data is store then and communicated. The sender and receiver IDs are verifies through cryptography.

Difference between Hash function and cryptography

The hash function is use to secure the data. The information become unreadable. In cryptography, the data is encrypted and no one can read the data unless they do not have password. Both are use for securing the data.

The length of input is matter in hash function. The input length is infinite but the length of output is finite. But in encryption method, we encrypt the data and the length of encrypted data is different. The encrypted data is unreadable.

In encryption method, when the data is encrypted, the keys are used in future to dycrypt the data. But no keys are use in hash function.

When we perform the hash function on some data, the output generated and it is always of same finite length. But in cryptography, the length of output is different.

In hash function, as we read above, it is not possible to generate the input from the output. You cannot get back the input. This is not possible to invert. But in cryptography, you can get the input back. You use the keys and can get the data in origional form.

Conclusion

We learnt about the collision of resistance and resistance of preimage in this lecture. In collision of resistance, you cannot get the same hash for two different input values. In resistance of preimage, it is impossible to invert the process. you cannot generate the input back from output.

Then we learn to read about the bloc detail from Tronscan Etherscan and learn to generate the hash. We see that the hash of different input was different.

At the end we fin out the difference between hash and crypto graphy. The both are secure and reliable. I am very thanks to professor @pelon53 for this informative lecture.

Sort:  
Loading...

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 71539.00
ETH 3603.23
USDT 1.00
SBD 4.75