Crypto Academy :Season 3 Week 2| Homework Post For [@pelon53]- Hash and Cryptography

in SteemitCryptoAcademy3 years ago (edited)

Hi @pelon53 ! I am excited to be one of your students in season 3 of the steemit crypto academy. Below is my entrance on your homework post.


BB6974BB-1308-4CB8-A17A-0D001EF2306F.png

Have you ever realized the algorithm behind the blockchain security and privacy, All these features that gives the blockchain it’s anonymity is driven by hash and cryptography. That is why our wallet addresses are unique and a lot of calculations are required in order to generate a block in POW mining.
What is Cryptography and hashing then?
By and large, cryptography and hashing are vital approaches to keep information secrecy in the blockchain.

Cryptography

Cryptography is the study of concealing data on display, to cover it from unapproved access. It is a method of putting away and communicating information in a specific structure so that solitary those for whom it is proposed can peruse and deal with it. All in all, it involves encrypting and decrypting data

Hashing

Hashing is the change of a series of characters into a normally more limited fixed-length value that addresses the first one. It shouldn't be feasible to transform the value from a hashed function other than attempting every one of the possible values . It ought to consistently deliver a similar value independent of various attempts. Indeed, even somewhat level change should make the entire hashed value change. Shouldnt prompts collission (No two numbers to have same hash value or event of such a case is close to nothing)

Resistance to collision

This is one of the properties of hashing. When a hash function say A, is resistant to collision, it means you have to find two inputs say, X and Y. To make finding the terms such that A=A and X=!Y difficult to achieve. The resistance to collision doesn’t mean there is no collision in the hash function but this is rare in resistance to collision. This is why cryptographic hash functions are built to be resistance to collision. For a hash function to be considered resistance to collision, it should have a minimum length of 160 bit

Preimage Resistance

A preimage attack enables to make an input that delivers a predefined result. A feasible preimage attack essentially implies that the hash algorithm is totally broken. The efforts and resistance to keep away from these attacks on the hashed functions is what is referred to as Preimage Resistance

How I used Etherscan to verify the hash of the last block and the hash of the last transaction.

  1. I first of all opened etherscan. Hence all images are screenshots from that site

  2. Upon opening the site, the latest blocks are available on the homepage with the latest transactions. As shown in the picture below, the latest block at that time was with the block height: 1277128


    1E001759-4ABA-47CC-81EE-2998F378E66A.jpeg

  3. I want to verify that block so I clicked on that block and it’s details was shown. Including it’s transactions and hash.
    The Hash of the block is
    0x47492ad7d324d60163fb4d4882f95b4788cc787466bd7ed5f3de5837f8a601d1

    With 189 transaction.


    7925D13B-7914-4425-960C-21DB6F7AB773.jpeg
    The hash of the block is shown here
    9405991B-99B7-4864-902A-9D703ECC1F50.jpeg

  4. I clicked on transactions and the transactions under that block are shown below. The C. Hash indicates the hash I’ve confirmed


    014B9D42-136F-459E-940A-E8F3F054F77D.jpeg

  5. I clicked on one of the transactions and it’s details was shown. From the picture, it shows that the transaction belongs to the block with height of 12771285.
    The hash of the transaction is
    0xcf8f29f065a50c2bdb203531d4fcb2daba1f73fee5c32f73bf09577fcb041a1d

    NB: I used T. H in place of transaction hash


    8306FF13-EC18-4156-8E48-4919F3528A18.jpeg

  6. To confirm this, i pasted the transaction hash and the same details was given as when I checked through the block.
    NB: I used T. H in place of transaction hash


    F3214D62-24DC-472C-B0FE-EA2293457ED6.jpeg

How I used Tronscan to verify the hash of the last block and the hash of the last transaction.

  1. I visited tronscan.org Hence all images here are screenshots from that site
  2. On the homepage, the latest transactions and blocks are all available

    122FE393-AA83-43D8-95D1-80BDFE692BCE.jpeg
  3. I clicked on one of the latest blocks and it’s details were shown with the hash of the block and the number of transactions
    Block height: 31688956
    Block hash: fc45df0939de81b35bc35c5819363cff95c1a31a89177512796c6050e45109a6

    84E5D158-1692-495E-AA59-236A0A175010.jpeg
  4. The transactions of that block are beneath the details of the block. Hence I clicked on one of the transactions and it’s details are shown
    Hash of the transaction : fc45df0939de81b35bc35c5819363cff95c1a31a89177512796c6050e45109a6

    07F56D0C-0D3A-4D72-8AE7-F54EBDAA5051.jpeg

    Transaction details of the latest transaction

    FBD78B3E-9267-4466-B138-8CA2F7944AC9.jpeg

How I generated the Hash SHA256 from cryptoacademy and Cryptoacademy

I will generate the Hash SHA-256 from these two words “cryptoacademy and Cryptoacademy” from this site https://passwordsgenerator.net/sha256-hash-generator/
Hence, all images in this section are screenshots from that link.

To generate cryptoacademy, I wrote the word in the text field then the hash was generated for me as shown in the picture below


B0B1751B-285A-4E97-83B7-D1703D1AFC61.jpeg

cryptoacademy Hash SHA-256 : 0592F5DD27DC72E675B2AB9C77487A69FAAF84196597FA052EC099C18EE7C4C5

To generate Hash SHA-256 Of Cryptoacademy, I wrote the word in the text box and it was automatically generated.


B0662A8F-DEC2-453C-88D8-826ECA698931.jpeg

Cryptoacademy Hash SHA-256: 975779F41D5CB39C3B7C9A66C5DEF2D3ADD07BA7AB8DBE7AFE162FA8F3AC6657

As shown in all the demonstrations above, the Hash values generated from these two words looks totally difference, although they’re all the same words to the understanding of man. This is as a result of changing the case of just one word from uppercase to lower case. This is what gives the hash SHA-256 it’s resistance to collision property.

Difference between Cryptography and Hashing

The table below contains the main difference between Hashing and Cryptography

HashingCryptography
The process is irreversible. To know the original data, you have to compare the encoded dataThe process is reversible. Meaning encrypted data can be decrypted
It basically involves conversion of data into a fixed value to represent the original dataThe main aim is to hide the meaning behind data
Fixed length of all encoded dataIn cryptography, length of encoded data varies
Keys are not requiredKeys are required in cryptography. The brain behind cryptography is security

Conclusion

After going through the lecture by professor @pelon53 , and doing research for this assignment I’ve learnt more about the blockchain technology with regards to hashing and cryptography and I’ve realized how important they are in the world of cryptocurrencies. The assignment have really helped me gain real world experience on how the two functions works. I can’t wait to take part in the continuation of the topic from the professor.

NB: All screenshots are taken from the above sites involved. For clearity of my demonstrations to the professor, these images are not resized because trying to do so makes the images blur in my phone.
Thank you
Cc:
@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?0.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.2.0
4En sus propias palabras explique la diferencia entre el hash y la criptografía.2.0

No estuvo claro la explicación de Resistencia a la Colisión y la Resistencia a Preimagen no fue explicada bien.

La pregunta 3, la palabra era CryptoAcademy, tanto la C como la A eran mayúscula.

Puedes mejorar en las próximas tareas, sigue adelante.

Recomendaciones:

Es necesario que leas con detenimiento cada pregunta, para que tus respuestas puedan ser las correctas. Para mejorar tu presentación, puedes justificar el texto.

Calificación: 7.5

Coin Marketplace

STEEM 0.26
TRX 0.11
JST 0.032
BTC 63585.64
ETH 3035.86
USDT 1.00
SBD 3.84