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.

  • 2
    $\begingroup$ 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. $\endgroup$
    – forest
    Dec 8, 2018 at 13:55
  • $\begingroup$ @forest I see, should a mod move this to the math SE? $\endgroup$ Dec 8, 2018 at 16:21

1 Answer 1


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.

  • 1
    $\begingroup$ +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. $\endgroup$ Dec 8, 2018 at 20:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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