4
$\begingroup$

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.

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

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.

|improve this answer|||||
$\endgroup$
  • 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$ – Mike Ounsworth Dec 8 '18 at 20:03

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.