What does the symbol $W_t$ mean in the SHA-256 specification?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












6












$begingroup$


I'm really confused about the computation about SHA 256.



$$W_t = begincases
M_t^(i) & 0 leq t leq 15 \
&\
sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
endcases$$



The $W_t$ variable: What's the value of $W_t$? How do I get that value?



I'm still confused because of the explanation using the English language. I'm a beginner guys, any help from you will be a plus point for me about hashing.










share|improve this question











$endgroup$
















    6












    $begingroup$


    I'm really confused about the computation about SHA 256.



    $$W_t = begincases
    M_t^(i) & 0 leq t leq 15 \
    &\
    sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
    endcases$$



    The $W_t$ variable: What's the value of $W_t$? How do I get that value?



    I'm still confused because of the explanation using the English language. I'm a beginner guys, any help from you will be a plus point for me about hashing.










    share|improve this question











    $endgroup$














      6












      6








      6


      1



      $begingroup$


      I'm really confused about the computation about SHA 256.



      $$W_t = begincases
      M_t^(i) & 0 leq t leq 15 \
      &\
      sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
      endcases$$



      The $W_t$ variable: What's the value of $W_t$? How do I get that value?



      I'm still confused because of the explanation using the English language. I'm a beginner guys, any help from you will be a plus point for me about hashing.










      share|improve this question











      $endgroup$




      I'm really confused about the computation about SHA 256.



      $$W_t = begincases
      M_t^(i) & 0 leq t leq 15 \
      &\
      sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
      endcases$$



      The $W_t$ variable: What's the value of $W_t$? How do I get that value?



      I'm still confused because of the explanation using the English language. I'm a beginner guys, any help from you will be a plus point for me about hashing.







      hash sha-256






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 9 at 15:57









      Squeamish Ossifrage

      22.1k132100




      22.1k132100










      asked Mar 8 at 10:00









      Onta SsOnta Ss

      416




      416




















          1 Answer
          1






          active

          oldest

          votes


















          9












          $begingroup$

          It is in SHA-256 message schedule (NIST-FIPS 180-4);



          The message $M$ with length $l$ is first padded as the usual way;



          • append 1 to the end of the message,

          • then, add $k$ zero bits such that $$l+1+k equiv 448 mod 512$$

          • finally, add the length of the message in 64-bit. Now, the total padded length is divisible by 512.

          After padding, the padded message parsed into $M^1,ldots,M^N$ where each has size 512-bit.



          The sub index $t$ represents 32-bits in 512 bits. Thus, The $M_t^(i)$ is the $t$-th 32-bit in the $M^(i)$ for $0 leq t leq 15$



          The $W_t$ is defined as your equation;



          $$W_t = begincases
          M_t^(i) & 0 leq t leq 15 \
          &\
          sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
          endcases$$



          Where
          $$sigma_1^256(x) = operatornameROTR^17(x) oplus operatornameROTR^19(x) oplus operatornameSHR^10(x)$$
          $$sigma_0^256(x) = operatornameROTR^7(x) oplus operatornameROTR^18(x) oplus operatornameSHR^3(x)$$



          $sigma_1^256(x)$ and $sigma_0^256(x)$ operate on 32 bits and produce 32 bits.



          Note: the 256 above the $sigma$ represents the 256 in SHA-256. Similarly, there is $sigma_0^512(x)$ and $sigma_1^512(x)$ for SHA-512.






          share|improve this answer











          $endgroup$












          • $begingroup$
            so you mean Wt = M16.....Mn ?
            $endgroup$
            – Onta Ss
            Mar 8 at 10:44






          • 1




            $begingroup$
            No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
            $endgroup$
            – kelalaka
            Mar 8 at 11:00











          • $begingroup$
            @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
            $endgroup$
            – Richie Frame
            Mar 9 at 0:50










          • $begingroup$
            @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
            $endgroup$
            – Onta Ss
            Mar 9 at 2:25










          • $begingroup$
            @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
            $endgroup$
            – Onta Ss
            Mar 9 at 3:27











          Your Answer





          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "281"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f67873%2fwhat-does-the-symbol-w-t-mean-in-the-sha-256-specification%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          9












          $begingroup$

          It is in SHA-256 message schedule (NIST-FIPS 180-4);



          The message $M$ with length $l$ is first padded as the usual way;



          • append 1 to the end of the message,

          • then, add $k$ zero bits such that $$l+1+k equiv 448 mod 512$$

          • finally, add the length of the message in 64-bit. Now, the total padded length is divisible by 512.

          After padding, the padded message parsed into $M^1,ldots,M^N$ where each has size 512-bit.



          The sub index $t$ represents 32-bits in 512 bits. Thus, The $M_t^(i)$ is the $t$-th 32-bit in the $M^(i)$ for $0 leq t leq 15$



          The $W_t$ is defined as your equation;



          $$W_t = begincases
          M_t^(i) & 0 leq t leq 15 \
          &\
          sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
          endcases$$



          Where
          $$sigma_1^256(x) = operatornameROTR^17(x) oplus operatornameROTR^19(x) oplus operatornameSHR^10(x)$$
          $$sigma_0^256(x) = operatornameROTR^7(x) oplus operatornameROTR^18(x) oplus operatornameSHR^3(x)$$



          $sigma_1^256(x)$ and $sigma_0^256(x)$ operate on 32 bits and produce 32 bits.



          Note: the 256 above the $sigma$ represents the 256 in SHA-256. Similarly, there is $sigma_0^512(x)$ and $sigma_1^512(x)$ for SHA-512.






          share|improve this answer











          $endgroup$












          • $begingroup$
            so you mean Wt = M16.....Mn ?
            $endgroup$
            – Onta Ss
            Mar 8 at 10:44






          • 1




            $begingroup$
            No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
            $endgroup$
            – kelalaka
            Mar 8 at 11:00











          • $begingroup$
            @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
            $endgroup$
            – Richie Frame
            Mar 9 at 0:50










          • $begingroup$
            @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
            $endgroup$
            – Onta Ss
            Mar 9 at 2:25










          • $begingroup$
            @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
            $endgroup$
            – Onta Ss
            Mar 9 at 3:27















          9












          $begingroup$

          It is in SHA-256 message schedule (NIST-FIPS 180-4);



          The message $M$ with length $l$ is first padded as the usual way;



          • append 1 to the end of the message,

          • then, add $k$ zero bits such that $$l+1+k equiv 448 mod 512$$

          • finally, add the length of the message in 64-bit. Now, the total padded length is divisible by 512.

          After padding, the padded message parsed into $M^1,ldots,M^N$ where each has size 512-bit.



          The sub index $t$ represents 32-bits in 512 bits. Thus, The $M_t^(i)$ is the $t$-th 32-bit in the $M^(i)$ for $0 leq t leq 15$



          The $W_t$ is defined as your equation;



          $$W_t = begincases
          M_t^(i) & 0 leq t leq 15 \
          &\
          sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
          endcases$$



          Where
          $$sigma_1^256(x) = operatornameROTR^17(x) oplus operatornameROTR^19(x) oplus operatornameSHR^10(x)$$
          $$sigma_0^256(x) = operatornameROTR^7(x) oplus operatornameROTR^18(x) oplus operatornameSHR^3(x)$$



          $sigma_1^256(x)$ and $sigma_0^256(x)$ operate on 32 bits and produce 32 bits.



          Note: the 256 above the $sigma$ represents the 256 in SHA-256. Similarly, there is $sigma_0^512(x)$ and $sigma_1^512(x)$ for SHA-512.






          share|improve this answer











          $endgroup$












          • $begingroup$
            so you mean Wt = M16.....Mn ?
            $endgroup$
            – Onta Ss
            Mar 8 at 10:44






          • 1




            $begingroup$
            No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
            $endgroup$
            – kelalaka
            Mar 8 at 11:00











          • $begingroup$
            @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
            $endgroup$
            – Richie Frame
            Mar 9 at 0:50










          • $begingroup$
            @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
            $endgroup$
            – Onta Ss
            Mar 9 at 2:25










          • $begingroup$
            @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
            $endgroup$
            – Onta Ss
            Mar 9 at 3:27













          9












          9








          9





          $begingroup$

          It is in SHA-256 message schedule (NIST-FIPS 180-4);



          The message $M$ with length $l$ is first padded as the usual way;



          • append 1 to the end of the message,

          • then, add $k$ zero bits such that $$l+1+k equiv 448 mod 512$$

          • finally, add the length of the message in 64-bit. Now, the total padded length is divisible by 512.

          After padding, the padded message parsed into $M^1,ldots,M^N$ where each has size 512-bit.



          The sub index $t$ represents 32-bits in 512 bits. Thus, The $M_t^(i)$ is the $t$-th 32-bit in the $M^(i)$ for $0 leq t leq 15$



          The $W_t$ is defined as your equation;



          $$W_t = begincases
          M_t^(i) & 0 leq t leq 15 \
          &\
          sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
          endcases$$



          Where
          $$sigma_1^256(x) = operatornameROTR^17(x) oplus operatornameROTR^19(x) oplus operatornameSHR^10(x)$$
          $$sigma_0^256(x) = operatornameROTR^7(x) oplus operatornameROTR^18(x) oplus operatornameSHR^3(x)$$



          $sigma_1^256(x)$ and $sigma_0^256(x)$ operate on 32 bits and produce 32 bits.



          Note: the 256 above the $sigma$ represents the 256 in SHA-256. Similarly, there is $sigma_0^512(x)$ and $sigma_1^512(x)$ for SHA-512.






          share|improve this answer











          $endgroup$



          It is in SHA-256 message schedule (NIST-FIPS 180-4);



          The message $M$ with length $l$ is first padded as the usual way;



          • append 1 to the end of the message,

          • then, add $k$ zero bits such that $$l+1+k equiv 448 mod 512$$

          • finally, add the length of the message in 64-bit. Now, the total padded length is divisible by 512.

          After padding, the padded message parsed into $M^1,ldots,M^N$ where each has size 512-bit.



          The sub index $t$ represents 32-bits in 512 bits. Thus, The $M_t^(i)$ is the $t$-th 32-bit in the $M^(i)$ for $0 leq t leq 15$



          The $W_t$ is defined as your equation;



          $$W_t = begincases
          M_t^(i) & 0 leq t leq 15 \
          &\
          sigma_1^256(W_t-2) + W_t-7 + sigma_0^256(W_t-15) + W_t-16 & 16 leq t leq 63
          endcases$$



          Where
          $$sigma_1^256(x) = operatornameROTR^17(x) oplus operatornameROTR^19(x) oplus operatornameSHR^10(x)$$
          $$sigma_0^256(x) = operatornameROTR^7(x) oplus operatornameROTR^18(x) oplus operatornameSHR^3(x)$$



          $sigma_1^256(x)$ and $sigma_0^256(x)$ operate on 32 bits and produce 32 bits.



          Note: the 256 above the $sigma$ represents the 256 in SHA-256. Similarly, there is $sigma_0^512(x)$ and $sigma_1^512(x)$ for SHA-512.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 9 at 4:19









          Richie Frame

          10.1k11530




          10.1k11530










          answered Mar 8 at 10:11









          kelalakakelalaka

          8,68022351




          8,68022351











          • $begingroup$
            so you mean Wt = M16.....Mn ?
            $endgroup$
            – Onta Ss
            Mar 8 at 10:44






          • 1




            $begingroup$
            No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
            $endgroup$
            – kelalaka
            Mar 8 at 11:00











          • $begingroup$
            @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
            $endgroup$
            – Richie Frame
            Mar 9 at 0:50










          • $begingroup$
            @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
            $endgroup$
            – Onta Ss
            Mar 9 at 2:25










          • $begingroup$
            @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
            $endgroup$
            – Onta Ss
            Mar 9 at 3:27
















          • $begingroup$
            so you mean Wt = M16.....Mn ?
            $endgroup$
            – Onta Ss
            Mar 8 at 10:44






          • 1




            $begingroup$
            No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
            $endgroup$
            – kelalaka
            Mar 8 at 11:00











          • $begingroup$
            @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
            $endgroup$
            – Richie Frame
            Mar 9 at 0:50










          • $begingroup$
            @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
            $endgroup$
            – Onta Ss
            Mar 9 at 2:25










          • $begingroup$
            @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
            $endgroup$
            – Onta Ss
            Mar 9 at 3:27















          $begingroup$
          so you mean Wt = M16.....Mn ?
          $endgroup$
          – Onta Ss
          Mar 8 at 10:44




          $begingroup$
          so you mean Wt = M16.....Mn ?
          $endgroup$
          – Onta Ss
          Mar 8 at 10:44




          1




          1




          $begingroup$
          No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
          $endgroup$
          – kelalaka
          Mar 8 at 11:00





          $begingroup$
          No. $W_1 = M_1^(i), W_2 = M_2^(i), ldots, W_15 = M_15^(i)$
          $endgroup$
          – kelalaka
          Mar 8 at 11:00













          $begingroup$
          @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
          $endgroup$
          – Richie Frame
          Mar 9 at 0:50




          $begingroup$
          @OntaSs there is no $M_16$, the 16 words of the input block are numbered 0 to 15 only
          $endgroup$
          – Richie Frame
          Mar 9 at 0:50












          $begingroup$
          @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
          $endgroup$
          – Onta Ss
          Mar 9 at 2:25




          $begingroup$
          @kelalaka Wt = M1 u mean (Wt-2) = (M1-2) ? sorry bro i learn self-taught about this. i got little confused if read mathematic formulas
          $endgroup$
          – Onta Ss
          Mar 9 at 2:25












          $begingroup$
          @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
          $endgroup$
          – Onta Ss
          Mar 9 at 3:27




          $begingroup$
          @RichieFrame yeah i got it. How about W16....W63 ? what is the value ?
          $endgroup$
          – Onta Ss
          Mar 9 at 3:27

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Cryptography Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcrypto.stackexchange.com%2fquestions%2f67873%2fwhat-does-the-symbol-w-t-mean-in-the-sha-256-specification%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?