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

in SteemitCryptoAcademy3 years ago (edited)

Hello everyone. This is @hibbanoor. I read the lecture thoroughly for more than twice and now after getting the points, i am going to do my homework task for professor @pelon53.

httpswallpaperaccess.commodern-black  .png

Screenshot (1258).png


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


Before answering the above question, I would firstly like to clear the concept of Hash function because the whole lecture is actually about the Hash Function.

What is Hash Function

The hash is a mathematical Function which is use to ensure that the data integrity is safe and secure. This function is apply on the Input message. The input message is converted into the unrepeated alphanumeric. The length of these alphanumeric is fixed. It's mean that the input length is not fixed but the output length is fixed. The Resistance to Collision, and Resistance to Preimage are the properties of Hash Function.


Collision of Resistance

Collision of resistance is a property of Hash function. The collision occur when an input of length which is not fixed become same to the output(fixed length). When two different input generate the same result, the collision occur there.

We know that here the input is always infinite and out is finite. The inputs of infinite length produce the outputs when it go through the process. But if two different input of infinite length produce the same result whose length is fixed, then the collision occur.

The hash function is being used in crypto world a lot for validation of transactions.

We know that the hash function is reliable. Here the collisions occur after long times because of trial and error method. This method is used by the traders in validation process.

But Collision of resistance insure the security of hash function. In simple words, This property ensure that two different input cannot generate the same result.

Weak Collision Resistance

In weak collision resistance, the probability that two input will produce the same output is very low. It is hard to find the input which produce the same output. Here the collision possibilities are quite low.

Strong Collision Resistance.

In strong collision resistance, it is hard to findout the x' and x which produce the same output. In strong collision resistance, the probability that two input will produce the same output is very high. Here the collision possibilities are high.

There are some hash algorithm who have lost their trust among the users for having the collision. SHA-1 is one of those hash algorithm. In SHA-1, the collision has been discovered. And the reliability of this algorithm is lost.


Resistance to Preimage


The security of hash function is ensure by the multiple properties. One we studied above. Second is resistance to preimage. The resistance to preimage is not able to invert. You cannot reverse this function.

This mean that it is not possible to convert the output into the original position(mean input form).

Two input of same size are use to produce the result. But once you produce the result, you cannot generate the input using the output value.

It is extremely hard to find the input from any given output value. In resistance of preimage is a hash function property, and according to this, if a user given an input then it is quite hard or impossible to generate the input from the given output.

This property of hash function is impossible to invert. This is a way to secure the hash function. But if the unauthorized person invert the output, he can then attack.

Screenshot (1258).png




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


Tronscan.org

1- Fist go to the Tronscan.org

Screenshot (366).png

2- Click on the first link. https://tronscan.org

Screenshot (367).png

3- The following page will be appear.

Screenshot (369).png

4- There will be list of the blocks which re perform on the Tronscan. Click on the latest block.

Screenshot (370).png

5- The whole information about that block will be shown.

Screenshot (371).png

6- There is a search bar given on that page. If you copy the height, and paste it in search bar, you will get the detail again. So you can search the block by its name, height or hash value too.

Screenshot (385).png

Screenshot (1258).png


Etherscane.io

1- First visit the  https://etherscan.io.

Screenshot (373).png

2- The below page will be appear.

Screenshot (374).png

3- A list of block will be there. Select the latest one.

Screenshot (375).png

4- The whole information about that block will be appear.

Screenshot (376).png

5- If you copy the hash value and paste it again on search bar, you will get the same information again.

Screenshot (378).png

Screenshot (379).png

Screenshot (1258).png



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.



1- Visit https://passwordsgenerator.net/sha256-hash-generator/

Screenshot (381).png

2- Write "cryptoacademy " there. You will get the hash of your word.

Screenshot (382).png

Now i will show you what happen if you change the word very minorly.

If i write the word "CryptoAcademy" now instead of "cryptoacadem", then the following hash will be appear.

Screenshot (383).png

So we see that two different input cannot produce the same output. The word is same but just two words were capital. But the hash of both was different. So this is just because of Resistance of collision

Screenshot (1258).png



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


The hash functions are use to hide our data. The hash functions are applied to make it unreadable. In encryption method, the sender and receiver of message are verified using their ID and IP. All the cryptography are the hash function but all the hash are not crypto graphy.


The hash functions and cryptography, both help you to secure you information. The information are converted into secure and unreadable form.

Some specific keys are used while securing the data in cryptography not this not happen in hash function. Not any sort of key is used in Hash function. In cryptography, these keys are use to retrieve the data by authorized people. Only authorized person have the keys. Only these person can get the data using the keys.

The cryptography is the way which covert the data into unreadable form and store it in storage medium without any sort of change. The data is encrypted and it become secure, then this data is stored on storage medium and then transfer to anyone. Only authorized person can access the data and can read the message. The same data without bringing changes is communicated.



Hash FunctionCryptography
The length is fixed in the hash function. The length varies
A way to secure informationIt is also a method of securing information
Keys are not used in hash function. Keys are used to encrypt the data. Then late on, these keys are used o retrieve the data.
The hash function can be said as a one way function. You can covert the data but you cannot retrieve your actual data. The cryptography use the keys. You can encrypt the data. By using the keys, you can get the original data back.
All hash functions are not the crypto All crypto are hash function
The purpose of hash function is encoding the data to secure it. The purpose of hash function is encoding the data to secure it. The purpose of cryptography is also encryption of data to secure it
The output of hash function is always a fixed size numerical dataThe length is not fixed here.
The main purpose of hash function is the verification of dataThe cryptography is applied on data so that data can be communicated between two parties without accessing by any third party.




Screenshot (1258).png

Conclusion

The hash and cryptography are method for securing your data from attackers. The hash function is being used largly in crypto world for different purposes. The transactions are get verified using hash functions. Both these techniques are quite important and using at large scale in crypto currencies. In this lecture, We have learnt in in detail about these two technologies. I am very thankful to professor @imagen.

Sort:  
Gracias por participar en Steemit Crypto Academy Season 3: Espero seguir leyendo tus publicaciones.
NoPreguntas.Puntaje.
1Explique ¿Qué significa la resistencia a la colisión? Y ¿Qué significa resistencia a la preimagen?1.7
2Use tronscan y etherscan para verificar el hash del último bloque y el hash de esa transacción. Se requiere capture de pantalla para su comprobación.1.2
3Genere el hash usando SHA-256, de la palabra CryptoAcademy y de cryptoacademy. Se requiere capture de pantalla. ¿Observa alguna diferencia entre ambas palabras? Explique.2.0
4En sus propias palabras explique la diferencia entre el hash y la criptografía.2.0

En palabras simples, esta propiedad asegura que dos entradas diferentes no puedan generar el mismo resultado.

👆 No hay ninguna función hash sin colisión, lo que sucede que la probabilidad que ocurra es muy baja.

La pregunta 2, no encontró el hash de las transacciones tanto en tronscan como etherscan.

en la pregunta 3, la entrada de la palabra cryptoacademy no genera el hash correcto.

Recomendaciones:

Debe justificar el texto.

Calificación: 6.9

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.030
BTC 58119.97
ETH 3054.21
USDT 1.00
SBD 2.26