1 / 28

SHA 256 | SHA 256 Algorithm Explanation | How SHA 256 Algorithm Works | Cryptogr

In this presentation on the sha 256 algorithm, we learn the basics of the sha 256 algorithm. We start with a brief recap into what is hashing, and learning about the secure hash algorithm family. We take a look at the characteristic of the SHA family and it's working from the padding of bits till we receive the hash digest. At the end, we go through the applications to fully understand how sha 256 algorithm works.<br>learn more https://www.simplilearn.com/cyber-security-expert-master-program-training-course

Simplilearn
Télécharger la présentation

SHA 256 | SHA 256 Algorithm Explanation | How SHA 256 Algorithm Works | Cryptogr

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Agenda for The Day What Is Hashing? What Is SHA? SHA Characteristics Steps in SHA Applications of SHA

  2. What Is Hashing?

  3. Click here to watch the video

  4. What Is Hashing? Hashing is the process of scrambling a piece of information or data beyond recognition. We use hash functions to convert input into hash Digest. These functions are irreversible by design. Company G#20F5*@L Original Data Hash Function Hash Value/Digest

  5. Password Hash Storage If the re-calculated hash matches the hash stored on the servers during initial sign-up, the log-in is allowed. G#20F5*@L G#20F5*@L Re-calculated Digest Hash Stored on the Servers Login is Allowed

  6. Integrity Verification Hashing can also be used for integrity checks to ensure the data isn’t corrupted. The hash value/digest will always be the same for similar input. G#20F5*@L G#20F5*@L Hash calculated after download Original Hash Digest before download Both owner and file verified

  7. Integrity Verification To convert plaintext to digest, we need hash algorithms like SHA. Hashing can also be used for integrity checks to ensure the data isn’t corrupted. The hash value/digest will always be the same for similar input. G#20F5*@L G#20F5*@L Hash calculated after download Original Hash Digest before download Both owner and file verified

  8. What Is SHA?

  9. What Is SHA? • Secure Hash Algorithm • NSA & NIST joint development • Has multiple families such as SHA-0, SHA-1, SHA-2 & SHA-3 • Declared FIPS in 1993 3b61a67bcd5e23f79dd4f13a4e69a61539ecfa33 Jonathan Input String SHA-1 Function 160-bit Digest

  10. SHA Characteristics

  11. SHA Characteristics

  12. SHA Characteristics Length of the original message should be less than 264 bits

  13. SHA Characteristics The length of digest is always 160 bits in length

  14. SHA Characteristics Digest should not be able to produce the original message

  15. SHA Characteristics To obtain the digest, we follow a number of steps in SHA hash algorithm. Digest should not be able to produce the original message

  16. Steps In SHA

  17. Step 1: Padding Bits • Bits are appended to the original input to make it compatible with the hash function. • Total bits must always be 64 bits short of any multiple of 512. • The first bit added is ‘1’, and the rest are all zeroes. Original Message Padding Bits Total length to be 64 bits less than multiple of 512

  18. Step 2: Padding Length • Length of the original message is padded to the result from step 1. • Length is expressed in the form of 64 bits. • Resultant string will now be a multiple of 512. • Used to increase complexity of the function. Original Message Length of Input Padding Bits Final Data to be Hashed as a multiple of 512

  19. Step 3: Initialize Chaining Variables • The entire message is broken down into blocks of 512bits each. • 5 buffers are used of 32 bits each. • They are 5 words named A, B, C, D and E. • The first iteration has fixed hexadecimal values. A = 01 23 45 67 B= 89 ab cd efC = fe dc ba 98 D = 76 54 32 10 E = C3 D2 E1 F0

  20. Step 4: Process Each Block • Each 512 bit block is broken down to 16 sub blocks of 32 bit each. • There are 4 rounds of operations, each of them utilizing the abcderegister, the 512 bit block and a constant K[t]. • Each round has 20 iterations, so total iterations = 4x20 = 80 rounds. • The constant value is an array of 80 elements, with 16 elements being used every round.

  21. Step 4: Process Each Block • Each iteration follows a formula : ABCDE = E + Process P + S5(A) + W(t) + K(t) • ABCDE = Register value of the chaining variables • P = Logical Process that changes each round • S5 = Circular shift by 5 bits • W(t) = A 32-bit string derived from existing sub block • K(t) = One of the constants which changes each round • For the words from 0-16 (W(0-15)), the sub block M(t) is same as W(t). • The remaining 64 values are calculated as : W[t] = S1( W(t-16) XOR W(t-14) XOR W(t-8) XOR W(t-3))

  22. Steps in SHA A D D C C B B E E A Addition Process P S5 Addition Addition W[t] K[t] Addition

  23. Non-Linear Process • Different for each round. • Used to increase randomness of the hash. Round 1: (b AND c) OR ((NOT b) AND (d)) Round 2: b XOR c XOR d Round 3: (b AND c) OR (b AND d) OR (c AND d) Round 4: b XOR c XOR d

  24. Applications of SHA

  25. Applications of SHA Digital Signature Verification Password Hashing SSL Handshake in browsing Integrity checks

More Related