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

in SteemitCryptoAcademy3 years ago (edited)

Hello cryptoacademy world
Nice to have you here again prof @pelon53. I'm glad to be part of this week’s lecture on "Hash and Cryptograph", quite an interesting and educative lesson.

meniya_1_original.jpg

INTRODUCTION

After going through the lesson, i came to understand more on Hash, as it is a vital aspect of blockchain technology. I'll like to briefly highlight what Hash is about.

HASH

20210705_222913.jpg
Source

A hash is a function of cryptography. It is an adaptable one-way cryptographic algorithm or function that maps data numerically by converting an input content of any length/size to an output content of a specific length/size through encryption, and this process is irreversible. The converted output is now known as Hash code, Hash digest or Hash value.

Hash function is a critical mathematical
function that plays a vital role in public key cryptography. Hash function helps in storage of passwords in blockchains,
boosts the security of a database against unauthorized modifications, and efficiently oraganizes contents and files in a database. For a Hash to be cryptographically confirmed Strong, it must have properties of Determinism,
Resistance to Collision, Avalanche effect, Hash speed and Resistance to Preimage.

These Hash algorithms are used in writing new transactions into the blockchain throug mining process there by validating the authenticity and integrity of the various types of input. Hash is very useful in a blockchain as it is mostly used to avoid keeping long and plain texts as passwords on a blockchain.



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

▪︎RESISTANCE TO COLLISION

Resistance to collision also known as Collision resistance is a security function of Hash cryptographic. It is a vital property of hash function that gives a signal if two unique content of input data results to an identical outputs, and this process is known as collision.

Collision of resistance is a vital factor to consider to know how strong the security of a hash function to map an input data into an output data(Hash value). when collision of resistance is weak, it indicates that the algorithm used to hash a data is broken and insecure, making it impractical to break-even to find two colliding inputs with same hash value(output).

Resistance to Collision makes it impossible or impracticable to find values X and Y, where X is not equal to Y(X ≠ Y), yet H(X) is equal to H(y) (H(x) = H(y)). In a nutshell, collision of resistance is the property of a hash where two different input data ought not to hash the same output.

▪︎RESISTANCE TO PRE-IMAGE

Resistance to Preimage is a Hash function that makes it impossible to reserve a hash value in order to to retrieve the original input data(plaintext). This is the property of hash function that makes hash process more secured, irreversible and a one-way function and the length of output result should be at least 80bits. The idea of resistance to preimage is that a strong hash algorithm is one, that is Pre-image Resistance


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

▪︎Using Etherscan to verify Hash of the last block.

Step 1: First , I visted Etherscan website, https://etherscan.io on the browser to see the latest block.

20210705_203756.jpg

Step 2: After accessing the home page, I click on the latest block and to see the hash of the block.

20210705_203705.jpg

20210705_203502.jpg

Hash for Block 12769193 is:
0x35d1924bd513e28eab71a91ff40c475a26fcb809dd80db608a05850613722307

Step 3: After Verifying Hash, i click on transactions to see the transactions on the latest block (block12769193). There are two transactions on this block.

20210705_203604.jpg

•This block has 93 internal contract transactions (as below).
20210705_203256.jpg

•And a total of 135 transactions on this block too(as seen below)
20210705_203356.jpg

▪︎Using Tronscan to verify Hash of the last block.

Step 1: use the link https://tronscan.org to acess Tronscan on the browser and it takes you to the homepage
20210706_072433.jpg

Step 2: When the homepage appears,you scroll upwards to see the details of latest Block.

20210705_204113.jpg

From the screenshot above, the Block hash for block 31679350 is, 0000000001e3637658cc32d6ffad0799a4cbd7600178f6a45f5d86f6a398654e
It can be confirmed or reviewed using this link https://tronscan.org/#/block/31679350

Step 3: After Verifying the Hash of the block 31679350, now you click on the block to get the transactions on the block.

20210705_204244.jpg

From the screenshots above, 294 transactions have been carried out on block 31679350



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.

Generating the hash from the two words "CryproAcademy and cryptoacademy" using SHA-256.

•First, visit this link- https://passwordsgenerator.net/sha256-hash-generator/. It takes you to the homepage, now input the word(CryptoAcademy) to be hashed and it give you the hashed output(as seen on the screenshot).

20210705_204337.jpg

From the screenshot above, Using SHA-256 the hash for CryptoAcademy is E8A7A9DE59452C21A6C379087B00F4C2ABE511E58C241C2A5354015ECC6308C1

•Again to get the hash of cryptoacademy using SHA-256. First, I input the data to be hashed (cryptoacademy) and the hash is created.

20210705_204431.jpg

From the screenshots above, the hash for cryptoacademy using SHA-256 is
9BFA21FDA556B654E5BE620A3AD168A1EF9195FD99D3D5655070A12EC7470449

There is a difference in the hashing codes because the first word 'CryptoAcademy' has two upper case letter as well as lower upper case letters, while the second word 'cryptoacademy' has all lower case letters. The hash algorithm gave two different hash because, two different words can't give the same hash value or code.Hence Resistance to Collision comes to play.



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

HASHCRYPTOGRAPHY
Hash are cryptographic functions used to encode data into a specific alphanumeric string for security, privacy and anonymity.Cryptography is a process of developing techniques and protocols to prevent the interference of a third-party on a blockchain, from accessing or gaining information of a data from the private messages during a communication process between the originator of a content and the receiving end.
A hash is a cryptographic function or algorithm used to map data by converting an input data into an encrypted output data with a unique length.Cryptography is a protocol on a blockchain that protects sensitive data transfers or transactions.
Hash function is used in authentication of a transaction, storage of passwords anda data in blockchains, and helps increase security of a blockchain.Cryptography is used to send secure messages between two or more participants in a blockchain, it protects and secure transactions between two participants.
Hash is a one-way function of converting input data into an output content, that is practically impossible to retrieve or reverse its computation after the data is verified.It is a two-way process that invoves encryption(is a process of converting a plaintext to a random sequence of bits), and decryption(a process of reversing an encrypted data with the specific keys). In a nutshell, encrypted cryptography data can be reversed or retrieved with the right keys.
Hash function doesn't require use of keys and it's output length should be at least 80bits.Cryptography makes use of keys(public and private keys) and doesn't have a specific length, as the length increases with addition of more information to the blockchain.
Hash as a function connverts input to encrypted output known as Hash value, Hash code or Hash digest .Cryptography encrypts all input data.


CONCLUSION

Hash is a cryptographic one-way function that maps data by converting input data to an output data of a unique length. Hash is an irreversible process that secures a blockchain. After this lesson, i can now generate a Hash, verify the hash of a block and see the transactions on the latest block using Etherscan and Tronscan.

Thanks to @pelon53 for an amazing and interesting lecture. Warm regards.

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

En la pregunta 2 no mostró el hash de la ultima transacción del último bloque. No importa cuantas transacciones tuvo ese bloque, solo el hash de la última transacción.

En la pregunta 3, colocó la palabra, pero al final le dio un espacio y generó otro número.
D03CA34B258E6E0FD06B2070DDE61B50BD4EEF6161A8EDAA4A420C9AE1BEB7F9 para CryptoAcademy.
0592F5DD27DC72E675B2AB9C77487A69FAAF84196597FA052EC099C18EE7C4C5 para crytoacademy.

Buen trabajo, sigue adelante.

Recomendaciones:

Justificar el texto, y ser cuidadosa al responder las preguntas.

Calificación: 7.0

 3 years ago 

Thank you @pelon53

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63117.29
ETH 2601.03
USDT 1.00
SBD 2.76