Crypto Academy / Season 3 / Week 2 - Homework Post for Professor [@pelon53] : Hash y Criptografía
This is my homework post for Steemit Crypto Academy Season 3 Week 2 for Professor @pelon53’s lesson Hash y Criptografía.

1. Explain what does the Collision Resistance mean? And what does Preimage Resistance mean?
1.a. Collision Resistance
It is one of the properties of the cryptographic hash function. The word "collision" in this term refers to a condition when two different inputs leads to a same outout. So, the meaning of Collision Resistance in cryptography is a condition when it is difficult to find two different inputs that produce different hash as output. It is possible that two different input produce the same hash as output, since hash function compresses function with fixed hash length. The collision resistance property only confirms that the collisions should be hard to find. When it is difficult (hard) to find two different inputs that produce the same hash as output, then the hash function is called "collision resistant".
1.b. Preimage Resistance.
It is another property of the cryptographic hash function. This property means that there should be very little possibility to find the input that produce an output. When it is very little probability for someone to find the input that produce an output, a hash function is called "preimage resistant". It is like a "one way" trip, when you reach the destination (output), you cannot go back to see where you took a leave (input).
This property of the cryptographic hash function guarantees higher security. The "one-way function" concept in cryptography is attributed to William Stanley Jevons (1835 - 1882), who wrote in his 1874 book The Principles of Science, "Can the reader say what two numbers multiplied together will produce the number 8616460799? I think it unlikely that anyone but myself will ever know."
In 1966, Roger Needham (1935 – 2003), one of the first computer scientists, suggested to use one-way function to protect password file on computer system. Needham invented the method of storing a hashed version of plaintext passwords in order to to emphasize the need for computer security. Until today, this method is still being used to keep our passwords safe.
On November 6th, 1976, Whietfield Diffie (born in 1944, age 77 years) and Martin E. Hellman (born in 1945, age 75 years) publish a paper on IEEE Transactions On Information Theory volume IT-22 No. 6. In this magazine the two cryptologists proposed the use of on-way function in cryptography.
2. Use Tronscan and Etherscan to verify the hash of the last block and the hash of that transaction. Screenshot is required for checking.
2.a. Tronscan
I opened tronscan.org.

I scrolled down and saw this information. There was the Block section on the left side of the page (marked number 1) and the Transaction section on the right side (marked number 2).

Clicking on the block number (market number 1) will open the Block detail page, and clicking on the Transaction code (market number 2) will open the detail page for that transaction.

I clicked on the newest created block number 31646651. On the page I saw the detailed information of the block. The block hash was 0000000001e2e3bba2432348199535bcd48755bae7e91b1aeba23a56ad3278ae.

And when I scrolled down the page, I saw that the block contains a total of 303 transactions (marked number 1). I clicked on the first line of the hash column (marked number 2).

On the next page I saw this particular transaction details. The picture below shows the transaction hash.

2.b. Etherscan
I opened https://etherscan.io/. The pages showed the latest block at that time on the left side (market number 1) and the latest transaction on the right side (market number 2). I clicked on the block number 12762037 (market number 1) .

I saw the block detailed information on https://etherscan.io/block/12762037.

To see the block hash, I needed to scroll down, and clicked the [Click to see more] button. The block hash is
0x11efb2c3e690c5f400f82b6f80d6b589d30f7c784c9cbd25212dcb965fa711b6.

Scrolled back up to see that there was 219 transactions on this block. I clicked on it.

The block transactions list opened. The transaction hash column was on the left side of the table (Txn Hash). I clicked the one at the top to see the details.

Here was the details of transaction hash 0xee6a0753e4ca7c2e3f983b40be0297a6c7682662dab7ce80a252f1dcc5e2d7f9.

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.
For this task, I used the SHA256 Hash Generator on https://passwordsgenerator.net/sha256-hash-generator/. I needed to enter the text inside the provided box (marked number one on the picture below. The generated hash will be displayed on the section marked number 2.

The generated SHA256 Hash of CryptoAcademy was D03CA34B258E6E0FD06B2070DDE61B50BD4EEF6161A8EDAA4A420C9AE1BEB7F9.

While for cryptoacademy, the generated SHA256 Hash was 0592F5DD27DC72E675B2AB9C77487A69FAAF84196597FA052EC099C18EE7C4C5.

The generated SHA256 Hash for CryptoAcademy and cryptoacademy were different from each other. It looks like in the Hash algorithm, the input is case-sensitif.
I also did it on SHA256 online hash function on https://emn178.github.io/online-tools/sha256.html, for CryptoAcademy the generated SHA256 Hash was d03ca34b258e6e0fd06b2070dde61b50bd4eef6161a8edaa4a420c9ae1beb7f9.

And for cryptoacademy, it was 0592f5dd27dc72e675b2ab9c77487a69faaf84196597fa052ec099c18ee7c4c5.

The two SHA256 Hash Generators produced the same output for the same input, the difference is that the first generator in default writes all alphabets in capital letters with the option to use the lowercase letter, while the second generator writes them defaultly in lowercase letters. I learned here that the inputs are case-sensitive while the outputs are not.
4. In your own words explain the difference between hash and cryptography.
4.a. Hash
A hash is a unique set of alpha-numeric string which is the result of data conversing through a process called hashing. Regardless of its size or type, any form of data can be hashed. Even a "blank space" can be hashed, as shown on the picture below.

And you will see that adding another blank space to the input will generate different output as shown on the next picture below.

It shows that every character in the input is treated special.
4.b. Cryptography
Cryptography is a way to protect data, both in the form of information and communication. The data protection is done by using codes. Cryptography comes from two Greek words, namely "crypt" which means "hidden" and "graphy" which means "writing". So, literally, cryptography means " hidden writing" (behind a series of codes). So that only those for whom the data (information and / or communication) is intended can read and process it.
4.c. The Difference
After knowing the meaning of the two words (hash and cryptography), we can conclude that cryptography is a way to protect data with codes, while hashes are codes that are generated to protect the data through the process called "hashing". Cryptography is a science, while hashes are the fruit of that knowledge, and hashing is the process. In a simpler example: mathematics is a science, while calculating something in life is the process, and meeting the calculated result is the "fruit".
Thanks
Thanks Professor @pelon53 for the lesson titled Hash y Criptografía.
Pictures Sourcing
- The editorial picture was created by me.
- All another pictures were screenshoots and were edited with Photoshop CS 3.
Sources and Reading Suggestion
- https://en.wikipedia.org/wiki/Collision_resistance;
- https://link.springer.com/10.1007/0-387-23483-7_69;
- https://cryptography.fandom.com/wiki/Collision_resistance;
- https://csrc.nist.gov/glossary/term/collision_resistance;
- https://industri.uma.ac.id/2019/12/01/mengenal-proses-hashing/;
- https://link.springer.com/referenceworkentry/10.1007%2F978-1-4419-5906-5_604;
- https://link.springer.com/referenceworkentry/10.1007%2F978-1-4419-5906-5_467;
- https://www.coursehero.com/file/p2rnrh9h/In-his-1874-book-The-Principles-of-Science-William-Stanley-Jevons-6-wrote-Can/;
- https://blogs.manageengine.com/corporate/general/2018/09/18/theres-password-security-hashed-passwords.html;
- https://users.soe.ucsc.edu/~abadi/Papers/pwd-revised/pwd-revised.html;
- https://en.wikipedia.org/wiki/William_Stanley_Jevons;
- https://en.wikipedia.org/wiki/Roger_Needham;
- https://en.wikipedia.org/wiki/Whitfield_Diffie;
- https://ee.stanford.edu/~hellman/;
- https://en.wikipedia.org/wiki/Martin_Hellman;
- https://hackernoon.com/cryptographic-hashing-c25da23609c3;
- https://en.wikipedia.org/wiki/Cryptographic_hash_function;
- https://www.tutorialspoint.com/cryptography/cryptography_hash_functions.htm;
- https://www.synopsys.com/blogs/software-security/cryptographic-hash-functions/;
- https://blog.jscrambler.com/hashing-algorithms/;
- https://www.sciencedirect.com/topics/computer-science/hashing-algorithm;
- https://aboutssl.org/what-is-hashing-algorithm-how-does-it-work/;
- https://searchsecurity.techtarget.com/definition/cryptography;




La pregunta 3, aunque ambas palabras son las mismas, solo se diferencian en 2 letras mayúsculas, su salida es diferentes (Resistencia a la colisión).
Faltó profundizar en las diferencias entre el Hash y la criptografía.
Recomendaciones:
Faltaron las conclusiones de tu investigación.Calificación: 7.5
Thanks, Professor.
It is shared to Twitter : https://twitter.com/aneukpineung78a/status/1412418275141619717