I am designing the truncating block of SHA3 algorithm , there its given that first we need to do the inversion per byte of the 1600 bit output and then truncating it to give 512 bits output.

Can any one briefly explain this whole step of SHA3.

  • $\begingroup$ You should read the NIST specification: nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.202.pdf $\endgroup$ – Raoul722 Apr 7 '16 at 6:44
  • $\begingroup$ Ya I have read it but i am not getting what inversion per byte is? $\endgroup$ – june Apr 7 '16 at 6:56
  • 3
    $\begingroup$ as someone who has implemented SHA-3 from scratch in code... I have no idea what byte inversion step you are talking about $\endgroup$ – Richie Frame Apr 7 '16 at 8:28

As far as I know, some people use the term inversion per byte for the conversion functions of section B1 of the standard, i.e. h2b and b2h, which convert from the unusual (i.e. different than as in SHA1, SHA2 ) NIST bit encoding to Hex bytes.

This is relevant only if you implement the API for hashing bit-string messages with non-zero bit length mod 8.

The concluding paragraph of the 'Conversion Functions' section of FIPS 202 is: The formal bit-reordering function that was specified in [12] for the KECCAK submission to the SHA-3 competition gives equivalent conversions when the message is byte-aligned, i.e., when n is a multiple of 8.

If you work with byte messages this whole stuff adds some confusion but is not really necessary (and therefore it is no surprise that is not met often in actual implementations.)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.