Crypto Academy / Season 3 / Week 2 - Homework Post for Professor @pelon53

in SteemitCryptoAcademy3 years ago

Hello Steemians,

How are we all doing? It's a pleasure to be here again. I have read and understood the class taken by Prof. @Pelon53 titled "Hash and Cryptography". I am so happy to be a participant in this class because I learned a lot from the lecture.

Screenshot_20210708-160516_4.png


Hash and cryptography are very important in Blockchain in terms of security and transparency, privacy, and so on. Hash is a cryptography function in the blockchain. It encodes data in a uniques way, an alphanumeric character that is unrepeatable. While cryptography made it possible for data to be hidden in the blockchain and also allow it to be interpreted by just the sender and receiver.

In the mining of blocks such as Bitcoin, Tron, and Ethereum. The hash function plays a very big and important role. And also, it makes smart contracts more versatile and also with greater benefits.

About the creation of keys and addresses which is one of the most important functions. Hash and cryptography make a high degree of security, privacy, and anonymity to be presented and possible in the Blockchain.

However, one of the most used hash series is SHA, Which stands for "Secure Hash Algorithm". It includes 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 and cryptography as played and they are still playing a very big role in the Blockchain. From here, I would be moving to the answers to the question given to me by Prof. @Pelon53.



Question 1

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


C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPKY2T1QyTsPjEGzw5FmP3WmqVvRcNKkKQshQEzTtpAN1VaNzbkgyKCjcvjDEjVwRpwT63F85LJ.png

The two, preimage and collision resistance are characterized as hash functions. I will be explaining Below the two functions.

Collision Resistance

Among the characteristics of hash is said to be Resistance to Collision. It is a property of cryptographic hash functions that are computationally infeasible to find two colliding inputs.

This function is carried out in the Blockchain and this function is related to second preimage resistance, which is also known as weak collision resistance

Collision Resistance refers to hash function H if it is difficult to find two inputs that can be hash to the same output. On the other hand, there is a principle called the pigeonhole principle, which means any hash with more input than output is inevitable to have a collision.

Preimage Resistance

The resistance to the preimage is also a property of the hash function that is not easy to invert. That is, when you are given an element in the range of a hash function, it should be computationally infeasible to find an input that is the same as the element. Resistance to preimage occurs when it is possible to determine the input of a specific output.

Second Preimage Resistance

The second preimage as I said earlier is known as weak collision resistance and is also related to Preimage resistance. It is one of the properties of the hash function that is computationally infeasible. But the second preimage resistance is computationally infeasible to find the second input that has the same output as a given input.


C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPKY2T1QyTsPjEGzw5FmP3WmqVvRcNKkKQshQEzTtpAN1VaNzbkgyKCjcvjDEjVwRpwT63F85LJ.png

Question 2

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



I will be using showing us how we can check or verify the latest block hash of tronscan and etherscan as well as the last transaction.

Tronsacan

To check trashcan lastest block hash and last transaction, we need to visit the tronscan website page, https://tronscan.org/. As we can see in the screenshot of the homepage below.

Screenshot_20210707-143054_1.png

There are many things on homepage, but, we will only be checking the latest Block and Transaction Hash on the homepage as you can see below.

Screenshot_20210707-130314_3.png

As it is in the above image, at the bottom of the information about Tron appears the option of "Blocks" and "Transaction". Firstly, I will be showing us the details of the latest block hash.

Screenshot_20210707-130314_1.png

I clicked on "more" to show me the details of the last block, which change or displayed without wasting time

Once you can identify the last block on the list, it will be easy to locate the details of the latest hash block. As when I was doing my homework, the Block Height was 31728610 along with Hash: c883cc130e332361f29269bd4ba02c2f1f805652cfae54df8887c156982d288.

To show the full details, click on the number to show the details. After that, the rest of the information of the indicated block will be displayed.

Screenshot_20210707-130330_2.png

To verify the hash of the last transaction, I went back to the main page and in the transaction option that is next to block, I clicked on it and it displayed the screenshot below as you can see the result below.

Screenshot_20210707-130314_4.png

At the time of opening the transaction option, the last one was identified with the hash: 0xa2d695704976a665d1fba1d953478c81f3a49b2b9a79175144ede5d014d628a9, as shown in the screenshot below.

Screenshot_20210707-135106_1.png


C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPKY2T1QyTsPjEGzw5FmP3WmqVvRcNKkKQshQEzTtpAN1VaNzbkgyKCjcvjDEjVwRpwT63F85LJ.png

Etherscan

To verify the latest hash block and Transaction with Etherscan, I will make use of its website 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 also view the details of the selected one on etherscan.

Screenshot_20210707-142910_1.png

At the time of publication, the last Block was identified with the number: 12780428, as shown in the image below, and also to verify the hash of the last block, you must move the screen down, where it shows: 0xa2d695704976a665d1fba1d953478c81f3a49b2b9a79175144ede5d014d628a9, as also shown in the image below.

Screenshot_20210707-140149_1.png

Then clicking on the last one, the last transaction details. It is shown below.

Screenshot_20210707-140442_1.png


C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPKY2T1QyTsPjEGzw5FmP3WmqVvRcNKkKQshQEzTtpAN1VaNzbkgyKCjcvjDEjVwRpwT63F85LJ.png

Question 3

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


I will be using this link, https://passwordsgenerator.net/sha256-hash-generator/ to generate the hash of the word CryptoAcademy and cryptoacademy using SHA-256.

Once you visit the website, insert the word in the box and the hash is generated immediately, for the first word the hash generated was: D03CA34B258E6E0FD06B2070DDE61B50BD4EEF6161A8EDAA4A420C9AE1BEB7F9

Screenshot_20210707-195833_1.png

I proceeded in generating the hash for cryptoacademy by changing the word in the box, the same way I generated the one. The hash: 0592F5DD27DC72E675B2AB9C77487A69FAAF84196597FA052EC099C18EE7C4C5

Screenshot_20210707-200001_1.png

The test that was just carried on a word that is the same but written differently shows characteristics of hash. It shows that even if they are the same word with the same meaning but written differently they can never have the same hash alphanumeric code.

On the other hand, It demonstrates the word unique and unrepeatable character of the hash function, by generating different codes for different inputs. It happens just because it's different.

That is, the first word "CryptoAcademy" has a capital letter as the first letter and in the middle. Why the second starts and ends with a small letter. That little difference gives each word a different hash alphanumeric code. That means any change in a word gives a different code in the hash.


C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPKY2T1QyTsPjEGzw5FmP3WmqVvRcNKkKQshQEzTtpAN1VaNzbkgyKCjcvjDEjVwRpwT63F85LJ.png

Question 4

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


There are differences between Hash and Cryptography but the two works together. Their functions are very close in that they help each other to function, to maintain privacy, anatomy, and to be more valuable. I will be writing below some differences between the two.

HashCryptography
Hash is a cryptographic function that generates unique and unrepeatable codes.Cryptography Preserve data and information based on security patterns.
Hash is the main foundation of the decentralization in blockchains.Cryptography is the main foundation of the decentralization of its operation.
Hash as a fixed number of characters. But,Cryptography does not have. Its algorithm can store a large file.


C3TZR1g81UNaPs7vzNXHueW5ZM76DSHWEY7onmfLxcK2iPKY2T1QyTsPjEGzw5FmP3WmqVvRcNKkKQshQEzTtpAN1VaNzbkgyKCjcvjDEjVwRpwT63F85LJ.png

In conclusion, the usefulness of hash and cryptography in the blockchain brings about many advantages in the crypto world like privacy, Security, and so on.

I want to use this medium to appreciate Prof. @Pelon53 for tutoring us on this topic because it has added to our knowledge. Also, to those that will be viewing my post, thank you.

Sort:  
Loading...

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 61369.52
ETH 2929.95
USDT 1.00
SBD 3.66