Author

Topic: Books on SHA-256 (Read 1182 times)

member
Activity: 69
Merit: 34
September 29, 2022, 11:48:54 PM
#7
Thank you for your time.  I now see my error.  I read 264 bits rather than 264 bits.  Yeah, I have a bit of lesdexia.   And I read it a couple of times.

That said, and since you are better acquainted with the subject than I, can you explain, in simple words, the meaning of  "message schedule."  I am trying to follow it as a group of bits/bytes/words/etc, but, in plain speaking words, why have the two words "message" and "schedule" been selected as the name for such entity?

Edit
I have read the introduction again and focused on a few sentences.  So far, my understanding is this.

First the input is parsed and padded into a specified format. 

Second it is hashed.  The result of the hashing is an array of bits (organized as bytes/words, etc). 

This array is the message schedule.  Creating this message schedule is the real work of the SHA process. 

Finally, from that message schedule, the final message digest is created.  I have not progressed that far, but presume that last step, while critical, is relatively simple.

Thank you for your time and patience.
staff
Activity: 3458
Merit: 6793
Just writing some code
September 29, 2022, 11:15:51 PM
#6
I was under the impression that the hash function, specifically SHA256 for my interest, can be used on any length input to create a “digest” or hashed function.  By that I am thinking of the example of submitting a document to the hash function and getting a “digest” (right word?) that can be used to verity that the document has not been changed.   But that explanation specifically states less than 264 bits.
Please set me straight.
The limit of 2^64 bits is basically a theoretical limit rather than a practical one. 2^64 bits is 2.3 exabytes which is way larger than a file would ever practically be.

This limit comes from the padding method used by SHA256. This padding adds a single bit, and then the length of the message in bits plus that added "1". This length is stored in a fixed width integer. For SHA256, it's 64 bits. Thus the message must not be larger than 2^64-1 bits as otherwise it will overflow the maximum of a 64 bit integer.
member
Activity: 69
Merit: 34
September 29, 2022, 07:46:25 PM
#5
Replying to achow101
Followed this link: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
and started reading about Secure Hash Standard.  From the explanation, item 3.

Quote
… When a message of any length less than 264 bits (for SHA-1, SHA-224 and SHA-256) or less than 2128 bits (for SHA-384, SHA-512, SHA-512/224 and SHA-512/256) is input to a hash algorithm, the result is an output called a message digest…
.

I was under the impression that the hash function, specifically SHA256 for my interest, can be used on any length input to create a “digest” or hashed function.  By that I am thinking of the example of submitting a document to the hash function and getting a “digest” (right word?) that can be used to verity that the document has not been changed.   But that explanation specifically states less than 264 bits.
Please set me straight.
sr. member
Activity: 278
Merit: 254
September 06, 2015, 10:33:49 AM
#4
You might find the following video on computing SHA256 by hand interesting (or at least amusing).

https://www.youtube.com/watch?v=y3dqhixzGVo



newbie
Activity: 15
Merit: 0
September 04, 2015, 10:56:15 AM
#3
Thanks, knightdk.  You just made my day.

The pdf, that you provided, is exactly what I was looking for.  After looking it over, I'm beginning to understand why textbooks tend to shy away from a detailed explanation of the SHA-256 hash algorithm.  The bottom line is that it's fairly complex.  A text book would have to dedicate an entire section on the algorithm, and that section would simply be a reiteration of the document that you've just provided.  However, I still feel that a text book, on cryptography, should at least clearly reference this information directly, as you have done.  They could simply state that the details are beyond the scope of the book and could be found at the link that you've given.

I get the feeling that as bitcoin becomes more mainstream, the document, which you've provided, will begin to find its way into the appendices of future cryptography text books.  If bitcoin sticks around, as many predict, I can't imagine this not happening.  The SHA-256 hash algorithm is too central to bitcoin cryptography to be ignored.  As long as the bitcoin protocol remains as is, SHA-256 won't be able to be overlooked.

Thanks so much again for what you've provided.  It truly is exactly what I was looking for.
staff
Activity: 3458
Merit: 6793
Just writing some code
September 03, 2015, 09:44:51 PM
#2
Well wikipedia is generally useful https://en.wikipedia.org/wiki/SHA-2.
But NIST (the agency that created and approved SHA2) has a website for it http://csrc.nist.gov/groups/ST/toolkit/secure_hashing.html#Approved Algorithms and a publication that specifies the standard for multiple SHA algorithms, including SHA 256 here: http://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf
newbie
Activity: 15
Merit: 0
September 03, 2015, 09:36:21 PM
#1
I'm trying to learn complete details about the SHA-256 protocol.  Does anyone know of any books that they would recommend for learning everything there is to know about the algorithm and how it works?

I would like a formal, detailed explanation of SHA-256 so I first tried to find text books on cryptography.  I have found many cryptography text books, but they only seem to MENTION SHA-256.  They never give any real detail in terms of how the function works specifically.  I want to understand how it works.  I know that someone knows how it works since people are able to write programs, and program FPGAs, that actually carry out the process.  But what is the process?  What's the actual, detailed process that occurs to an input that is operated on by the SHA-256 hash algorithm?

If anyone knows of any text books that explain this kind of detail, then I'd love to hear from you.  Thanks for your time.
Jump to: