Re: constructing a specified hash function

bobic wrote:
Hi, all. Recently, I want to construct a specified hash function, which

y=h(x), x can be any string, and y must belong to [g^a mod p,g^{a+1}
mod p,...,g^b mod p], and no body knows the discrete logrithm of y
based on g. a,b are known.

How about h(x) = G * g^H(x), where G = g^a mod p and
H(x) = SHA256(x) mod (b-a)/ Does that do it? Note that you will
have to publish the values G and b-a, but you nobody needs to know
the discrete log of G to the base g, nor the discrete log of y to
the base x.

Out of curiousity, why do you want this hash function? Do you
have any particular security goals for it?

Relevant Pages

  • Re: Substrings and so on
    ... languages that treat strings as _opaque_, discrete objects is that you lose ... or otherwise not so discrete. ... that any particular string might be discrete is of lesser ... Learning which data structures are preferable means ...
  • Re: Lingo for layfolk?
    ... to communicate the concepts of 'continuous' and ... Users of a software package ... Discrete variable = countable variable ... Discrete = like beads on the string ...