Steemit Crypto Academy, Season 3: Week 2 Homework || Hash and Cryptography.

in hive-108451 •  3 years ago 

1E4B407B-6BAB-442A-9EC6-708948646D20.jpeg

910F098C-9AF6-4309-A87C-F0DCEA8DAFF4.png

Hello everyone,
I’m very delighted to the take part of the second week of the season 3 of crypto academy class. This lecture by respected professor @phelon53 is on Hashes and Cryptography.

Prof gave a very detailed explanation that helped me understand the topic very well.

BAB2DB37-BE35-4517-B6A4-D1D510C7C99F.jpeg

A hash is a function that meets an encrypted demand needed to solve for a blockchain. The same data in a blockchain will always return the same hash results. Hash results cannot be changed or manipulated in any way.

The hash is the backbone of the blockchain network. Any other activities on the blockchain are built on the hash. Hashes are developed based on information available on the block header.
All addresses on a blockchain are built on hashing. For example Bitcoin addresses use SHA2-256 and RIPEMD 160.

Hashes also play a major role in the generation of keys in a blockchain.
One of the series of the most used hash functions is SHA, which include: SHA-0 and SHA-1, SHA-2 and SHA-3, SHA- 256 which is part of the SHA-2 group and the SHA-512.

Hash functions have so many characteristics, these include;

  • Irreversibility
  • security
  • calculating algorithms
  • resistance of collision ( pre image and second pre image) etc.

These characteristics shows how tight the security hashes can provide. It demands a lot of effort and maybe I will say it is almost impossible for hashes to be reversed. Hashes are in no way vulnerable to security threats.

When hash functions are violated, collision is achieved. This sends us to question one of the assignment.

8B984521-4545-474D-9551-9251BE561D93.jpeg

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

Resistance to collision

Like I stated earlier, collision resistance is a property of cryptographic hash functions.
We say that a hash function(H) is collision resistant when two input functions cannot be hashed to give one output. Hash operation on random input is likely to find two matching outputs.

Collision resistance is also of different types. These weak collision resistance and strong collision resistance
Weak collision resistance is restricted to a specific input whilst strong collision resistance is applied to any two arbitrary inputs.

Preimage resistance

Preimage resistance of a hash function is the property of the function that is very difficult to invert. This means that when you’re given an element in the hash function, it is computationally impossible to find the input that matches that element.
Preimage is important because in selecting a hash function, it will ensure that it is uniform.

Resistance to second Preimage

In the second Preimage resistance, the attacker is given a message to start. In the second Preimage resistance, the hash function is computationally infeasible to find a second input that has the same output as a given input.

It must be noted that,
A hash function that is collision resistant is consequently resistant to second pre-image attacks.
However, a collision-resistant hash function can be attacked from pre-image, because a single input would be searched from a single output.

1070A17F-C394-4AB0-8234-6B8A9FE7C1E5.jpeg

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

699680EA-BC88-479D-AE06-DA9E1C8B6913.png

Tronscan

I’m going to demonstrate the verification of hash of the last block at the time of making this publication, as well as the last transaction.

To do this using Tronscan.org, on its home page, at the bottom appears the option of "Blocks" and "more", as indicated below, I pressed "more" to show me the details of the last block, which change very quickly, due to the number of operations carried.

4B2323CC-FC4B-45A0-83D7-C81AC543EC70.jpeg
Screenshot: Tronscan.org

1636EEBD-AFE1-4C5F-A359-569068E2B614.jpeg

Once the last block can be identified on this screen, at the time of making this publication there was block 31698429 , as shown in the second image below, clearly identified in a red box.

To show the details, click on the number of the block, so the rest of the information of the indicated block is displayed.

1D49C0E0-C392-4635-8101-3F68EE9EE0C7.jpeg
Screenshot: Tronscan.com

684BFA02-BBB1-444C-B836-3E50D32ED14F.jpeg

To verify the hash of the last transaction, I returned to the main page and in the transaction option that is next to the block one, by pressing you can see the information of the last transaction of that moment as shown below.

FD0AC433-CB53-4F4A-9B53-A705C696F049.jpeg
Screenshot: Tronscan.com

C2131C3A-2480-4194-BD1D-BC9A69271FF0.jpeg

At the time of opening the transaction option, the last one was identified with the hash: 39ec712bcd5ee300070297616a6cc78ebe8bf0d329e9ac330d1f491f4ca2aa8c , as shown in the image below.

9E1C07A3-B3FD-479B-BCEF-8DB2534FC711.jpeg
Screenshot: Tronscan.com

59FAB8BE-91F0-40D5-B660-32398A5A1114.jpeg

Etherscan.io

To verify the hash with Etherscan, I used the following link: https://etherscan.io/ At the beginning you can identify the Blocks and Transactions, by clicking on the last one that is displayed on the screen, you can view the details of the selected one below

7B4E8DB2-6366-43C1-87C5-E51840624821.jpeg
Screenshot source

993B401A-62CE-4BD8-B8F6-3A150D69F6CA.png

At the time of publication, the last Block was identified with the number: 12773979, as shown in the image below.

78B81902-1143-4FCB-9714-68EC0E21F27C.jpeg
Screenshot: source

756C69CC-BDBE-411C-955B-AD6D3DA1B127.jpeg

To verify the hash of the last block, you must move the screen down, where it shows: 0xf9bf521560cfa8efe2753a72f475cee8fbdfdae6b813fccc0ffaefa64c913ae4

A5ACCEDB-FE95-4A6E-81EC-D3B44458BF63.jpeg
Screenshot: source

C20395B7-B8EA-4CB1-9EC7-A19CFB07A8C4.jpeg

Then I go back to click on transaction, the details of the transaction was displayed.

The hash of the last transaction: 0x08fd1f0a02cf205ecdc3cf50c50dcea788807cb9b7d3d0cbfb24e1ce933e6126

E6834D38-16C7-4154-A39D-91AFA2EA62BB.jpeg
Screenshot: source

55442F0D-885F-4CFA-AC72-A6F3FB05B882.jpeg

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.


To generate the hash of the word CryptoAcademy and cryptoacademy, using SHA-256, I used the following link https://passwordsgenerator.net/sha256-hash-generator/

Simply put the word in the box and the hash is generated immediately, for the first word the hash generated was: 7B8ABC5E9238266CBA885E7EE43DB7256F69EC2E120D8706DB2A4AB704E85A43

A19C737E-A79A-49E7-9D6D-4CDB115E191A.jpeg
Screenshot:source

158BED2A-E6DF-4F91-A01D-78A3924C414B.jpeg

For the second word, proceed to change it in the box and in the same way generate the hash: DF12B8F89B61274C73291296EC828EAB61202F5863680EC6003682821D77FD31

7E5F76DD-C32C-434B-A82B-DDC01E30738B.jpeg
Screenshot: source

679AAAFF-195E-4858-8CCA-EA4F5E580587.jpeg

In the experiment above, the two different inputs generated hashes that are totally different. The first one was “steemexclusive” which produced a different hash to the second input which is “cryptocurrency.”

This shows the unique and unrepeatable function of hashes which generates a unique hash for each and every input.

7133AA31-D746-49C4-8DFB-E4F2A1651657.jpeg

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


HashCryptography
Hashing is not considered a form of encryptionCryptography is broad field of study which covers both encryption and secure hashing.
Hashing is a one way mechanismCryptography is a two way process which involves both encryption and decryption.
Hash is a cryptographic function that generates unique and unrepeatable codesCryptography aims at preventing data and information based on security patterns
Hash is the main foundations of the decentralization of this platformcryptography is the fundamental pillar of the blockchain for its operation, it can be considered the main axis of the ecosystem.

4BA6594C-219B-43D6-A6C1-F17B94B5DAA2.jpeg

Conclusion

From this topic by professor @pelon53, it is clearly evident the hashes and cryptography have been a very fundamental part in the security of the blockchain and cryptocurrencies. They provide security, privacy and anonymity that identify the blockchain.

These hashes have been very beneficial to the blockchain and it’s very crucial in developing this ecosystem.

Thank you

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
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.5
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.3.0
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.0.5
4En sus propias palabras explique la diferencia entre el hash y la criptografía.1.0

Es probable que la operación hash en una entrada aleatoria encuentre dos salidas coincidentes.

👆 Esto no es Resistencia a la colisión.

La pregunta 3, no respondió lo que se le preguntó, colocó 2 palabras que no eran la que se le pidió.

Faltó investigar un poco más sobre la diferencia entre el Hash y criptografía.

Puedes mejorar, sigue adelante.

Recomendaciones:

Es necesario que observes bien las preguntas para responder de acuerdo a lo que se le solicita.

Calificación: 6.0