Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I understand that the word size is the internal "working package size" below the block size of a cryptographic hash function (and a block cipher), as each block is broken into words an than processed round-based. Does this size have any practical relevance when using that function? For instance do algorithms with 64b word size perform better on 64b machines? Or does aligning the message-to-hash at the word size have any impact?

share|improve this question
It is mainly a performance thing, although some algorithms can be bit-sliced to perform well on smaller word size processors, such as Keccak. SHA-512 can not be bit-sliced as far as I am aware, and has poor performance with 32-bit calculations. Be aware in these cases that a 32-bit processor can still perform 64-bit calculations if it has the appropriate instructions and registers. – Richie Frame Mar 10 '14 at 9:46
up vote 2 down vote accepted

Yes, the internal word size of a hash algorithm has some significance, pretty much for the reasons given in the question.

Algorithms with 64-bit word size have a (typically sizable) performance edge on 64-bit machines (more precisely: for large messages, and comparable implementations, the ratio of the number of bytes hashed in a given time over that for a comparable algorithm with 32-bit word size will likely be significantly higher using a 64-bit machine and making good use of the architecture, than this ratio is on a 32-bit machine). For this reason we have SHA-512/256, a 256-bit hash obtained by truncating to 256-bit a natively 512-bit hash with internal 64-bit word size: on a 64-bit machine, SHA-512/256 can be faster than SHA-256, a natively 256-bit hash with internal 32-bit word size. See this for more details.

And, on most machines, there is some (typically small) performance penalty if the message to hash is not aligned to the native word size.

share|improve this answer
For more real world performance numbers of SHA256 vs SHA512 see my chart at which compares performance on modern processors with optimized algorithms – Richie Frame Mar 11 '14 at 0:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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