Crypto Academy / Season 3/ Week 2 / Homework Post for Professor [@pelon53] || Hash and Cryptography

in SteemitCryptoAcademy3 years ago (edited)

SGN_05_06_2021_1620280086334.jpeg

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

Collision Resistance

images (4).png
p

Collision resistance can be referred to as the feature of a hash function that makes it computationally impossible for two inputs to collide. For a hash function to posses the property of collision resistance, then it's result should be upto 160 bits.

When a hash function H is Collision resistant, then it will be difficult to locate two or more inputs that hash similar output. For example, for two inputs; MArk and mARk, where MArk ≠ mARk then the hash funtions is Collision resistant if H(MArk) ≠ H(mARk).

Ways of Resolving Collision in Hash Function

(1) Open Addressing:

This method relies upon space usage and could be achieved using with the use of quadratic or linear probing techniques.
This method tries to locate a free slot to store the new record or finds another hash output to assign the second input.

(2) Probabilistic hashing:

This method is memory based that employs and uses caching. When there is collision, it will either replace the old input with the new one or the new input will then be discarded. Although, there is a great chance of losing great data, this method is still preferred because of it's high performance and implementation ease.

(3) Perfect hashing:

If the inputs are assigned to a unique hash output, then the chances of collision will be reduced. This method can be functional where there is a plenty of spare memory.

k75bsZMwYNtze9xHvT6xWCdz7q3QGD35ZKdaPpVrFksWkHhva6RwFvN5uCLAgQkVeX9Vh4QoCcWiGxfCDE1juupubU67jsVCGSZdCDtVRdTi9ZSHTiKLpLDuck2CTyHtGbfUbnSAp9dZaaZSYYaNF9F8hprZLV9ga.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.

The hash of the last block of tronscan

• Firstly, I open tronscan.io
Next, I navigate down the page that has opened and click on the last block that has been confirmed.

IMG-20210708-WA0017.jpg

• This block was produced by poloniex and the block hash is
0000000001e4a13ccb280c05a06c92241eb2a78cd2e4be96bc9ecd5fb655a7a1

IMG-20210708-WA0018.jpg

The hash of the last block of etherscan

• The first step was to open etherscan.io
Next I navigate down the page and click on the latest block.

IMG-20210708-WA0019.jpg

• This block was produce/mined by Hiveon Pool with a block reward of 2.43 Ether and the block hash is
0x63cd537656e802ef3b4b2c9a5d24f8168ade20eeacda1b87ba557b8ba426445e

IMG-20210708-WA0020.jpg

k75bsZMwYNtze9xHvT6xWCdz7q3QGD35ZKdaPpVrFksWkHhva6RwFvN5uCLAgQkVeX9Vh4QoCcWiGxfCDE1juupubU67jsVCGSZdCDtVRdTi9ZSHTiKLpLDuck2CTyHtGbfUbnSAp9dZaaZSYYaNF9F8hprZLV9ga.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.

• First, I open the SHA256 website

IMG-20210708-WA0014.jpg

• Next, I input the word CryptoAcademy in to the text box and below is the hash which was generated for it.
D03CA34B258E6E0FD06B2070DDE61B50BD4EEF6161A8EDAA4A420C9AE1BEB7F9

IMG-20210708-WA0015.jpg

• Next I input the next word ** cryptoacademy** into the text box and below is the hash which was generated for it.
0592F5DD27DC72E675B2AB9C77487A69FAAF84196597FA052EC099C18EE7C4C5

IMG-20210708-WA0016.jpg

My Observation

For m the two inputed words, I could see that it is the same word but there is a difference in some characters of the initial word. This in turn affected the hash output for the both text box input.
This also proves that the hash SHA256 is Collision resistant.

k75bsZMwYNtze9xHvT6xWCdz7q3QGD35ZKdaPpVrFksWkHhva6RwFvN5uCLAgQkVeX9Vh4QoCcWiGxfCDE1juupubU67jsVCGSZdCDtVRdTi9ZSHTiKLpLDuck2CTyHtGbfUbnSAp9dZaaZSYYaNF9F8hprZLV9ga.jpeg

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

Cryptography

images (5).png
p

Cryptography to the process by which ordinary plain text is converted into unintelligible text and back to the unitial ordinary plain text. It is a technique used in storing and sending data in a unique format so that it can be read and processed by only those which it is meant for.

Hashing

1200px-Hash_table_4_1_1_0_0_1_0_LL.svg.png
p

A hash refers to mathematical functions which transforms an input of voluminous length into a fixed lenth encrypted output.
The hash is also a type of cryptography.

The major difference between cryptography and hash is that in Crytptography, the text can be encrypted and also decrypted. That is to say that cryptography funtions in two ways
Hashing on the contrary, functions only in one direction which is to encrypt a given plain text. There is no way one can attempt to decrypt a hashed text.

Conclusion

• Cryptography is an robbot like algorithm tool that has an important role to play in network security today. It offers it's users authentication and also ensures it's users data integrity and privacy is well protected.

• Cryptography consist majorly of two technique or functions which are the encryption and decryption function.
Encryption function will convert a plain text into an unreadable text format for the purpose of keeping the information sent away from prying eyes while the decryption function will then convert back the unreadable text format back to its original format.

Regards to Professor @pelon53

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.0
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.5
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.8
4En sus propias palabras explique la diferencia entre el hash y la criptografía.1.5

No pude ve lo que significa la resistencia a la preimagen.

En la pregunta 2 no pude observar el hash de la transacción del bloque.

Faltaron algunas diferencias importantes por mencionar.

Recomendaciones:

  • Leer con detenimiento cada pregunta para poder responder adecuadamente.

Calificación: 6.8

Coin Marketplace

STEEM 0.17
TRX 0.16
JST 0.028
BTC 74526.95
ETH 2591.86
USDT 1.00
SBD 2.44