6

Reading the Schnorr signature Wikipedia page, I stumbled upon the following statement:

All users agree on a cryptographic hash function $H:\{0,1\}^*\to\mathbb{Z}_q$.

What do these curly brackets mean here and how exactly is the hash function's input domain defined? Normally, you can use whatever input you want for a CHF/ PRF.

Paul Razvan Berg
  • 547
  • 1
  • 4
  • 13
  • 2
    This means that the domain input domain is an unlimited number of input bits that are either 0 or 1 (it's understood in context to refer to binary). Not sure this is really about crypto though. It seems this is just math. – forest Dec 08 '18 at 13:55
  • @forest I see, should a mod move this to the math SE? – Paul Razvan Berg Dec 08 '18 at 16:21

1 Answers1

8

This has little to do with cryptography or hash functions. It's slightly abused standard mathematical notation.

$\{0,1\}$ is the set consisting of $0$ and $1$, so the set of all single bits. For any set $S$, $S^n$ for any natural number $n$ refers to the set of $n$-tuples of Elements from $S$, e.g., $S^2 = S \times S$. So strictly speaking $\{0,1\}^n$ refers to the set of $n$-tuples of bits, however we generally call these "bitstrings of length $n$".

Finally, $\{0,1\}^*$ is defined as $$\{0,1\}^*=\bigcup_{n\in\mathbb{N}_0}\{0,1\}^n.$$ I.e. it refers to the (infinite) set of all finite length bitstrings.

Maeher
  • 6,818
  • 1
  • 33
  • 44
  • 1
    +1 though I would add that this notation is likely borrowed from regular expressions / automata theory where '*' (aka the Kleene star operator) means "Zero or more occurrences of the preceding symbol", and is well-defined over sets in the way you describe. – Mike Ounsworth Dec 08 '18 at 20:03