what does 'word' mean in hash terminology

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

>-)
Posts: 527
Joined: Tue Apr 24, 2012 1:10 am UTC

what does 'word' mean in hash terminology

Postby >-) » Sat Jul 13, 2013 5:41 pm UTC

i've searched through the wikipedia pages on hashes and sha-2 for 'word', but i've still no idea what it means when the article says word size or 64-bit words. there is one line that sayd
"first word of the input message "abc" after padding is 0x61626380"
but isn't abc itself a word?

so what does word mean?

User avatar
Thesh
Made to Fuck Dinosaurs
Posts: 6568
Joined: Tue Jan 12, 2010 1:55 am UTC
Location: Colorado

Re: what does 'word' mean in hash terminology

Postby Thesh » Sat Jul 13, 2013 5:45 pm UTC

Each block will be broken up into a smaller number of pieces to be operated on; the size of these pieces is the word size. SHA-256 is optimized for a 32-bit processor, so it has a word-size of 32-bits. SHA-512 is optimized for a 64-bit processor, so it has a word-size of 64 bits.
Summum ius, summa iniuria.

User avatar
phlip
Restorer of Worlds
Posts: 7569
Joined: Sat Sep 23, 2006 3:56 am UTC
Location: Australia
Contact:

Re: what does 'word' mean in hash terminology

Postby phlip » Sat Jul 13, 2013 6:12 pm UTC

It's not so much a hashing term, or a cryptology term, but a general computing term.

Code: Select all

enum ಠ_ಠ {°□°╰=1, °Д°╰, ಠ益ಠ╰};
void ┻━┻︵​╰(ಠ_ಠ ⚠) {exit((int)⚠);}
[he/him/his]

Tirian
Posts: 1891
Joined: Fri Feb 15, 2008 6:03 pm UTC

Re: what does 'word' mean in hash terminology

Postby Tirian » Sun Jul 14, 2013 5:51 am UTC

>-) wrote:but isn't abc itself a word?


In the theory of formal languages, abc is a word. In the theory of computerized cryptology, it is not.

User avatar
Xanthir
My HERO!!!
Posts: 5400
Joined: Tue Feb 20, 2007 12:49 am UTC
Location: The Googleplex
Contact:

Re: what does 'word' mean in hash terminology

Postby Xanthir » Sun Jul 14, 2013 1:27 pm UTC

What phlip said, but if you don't want to follow the link, it's just the number of bytes that the processor in question prefers working with. For 32-bit processors, the word size is 32 bits, or 4 bytes; for 64-bit processors, the word size is 64 bits, or 8 bytes; etc.
(defun fibs (n &optional (a 1) (b 1)) (take n (unfold '+ a b)))

>-)
Posts: 527
Joined: Tue Apr 24, 2012 1:10 am UTC

Re: what does 'word' mean in hash terminology

Postby >-) » Mon Jul 15, 2013 10:44 pm UTC

ok, i understand. thanks!

DeGuerre
Posts: 51
Joined: Mon Feb 04, 2008 6:41 am UTC

Re: what does 'word' mean in hash terminology

Postby DeGuerre » Tue Jul 16, 2013 2:33 am UTC

Xanthir wrote:What phlip said, but if you don't want to follow the link, it's just the number of bytes that the processor in question prefers working with. For 32-bit processors, the word size is 32 bits, or 4 bytes; for 64-bit processors, the word size is 64 bits, or 8 bytes; etc.

That's how it works in practice, but just to expand on that point, the field of analysis of algorithms has a slightly richer definition.

I'm not going to define it formally, but the general idea is that if N is the problem size (e.g. number of elements in the hash table, number of elements to be sorted, number of nodes/edges in the graph, or whatever), then there is a number (which we will call the word size) w = Θ(log N), such that any operation on w consecutive bits of memory takes O(1) time.

The big-Theta condition means that if N is the size of the problem, then you should be able to represent the number N using a constant number of words. (If you can't do that, then a lot of analyses break!) The "any operation" condition seems a little odd, but it makes sense when you think about it. Any function which maps a constant number of words to a constant number of words could (in principle) be implemented with a (possibly big) lookup table or (perhaps custom) circuit/CPU instruction, and hence can be thought of as a constant-time operation. The constant may be large on real-world machines, but it's constant nonetheless.


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 11 guests