Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

Does a pair of (hashing) functions for which

enter image description here

where neither g(x) nor f(x) are constants exists?

share|improve this question
Defining f as "take the last <output size of g> bytes of the input" works with arbitrary g. Another variant for f is "take everything except the last <output size of g> bytes of the input and feed it to g". –  CodesInChaos Feb 25 at 16:39
What are you trying to achieve? –  miniBill Feb 25 at 17:03
@CodesInChaos yes, it is obvious. But I am earching rather pair of "cyclic" hashing functions (it can be also ONE function : f(x) = f(x+f(x)), f(x) != x and f(x) is not constant) –  ts01 Feb 26 at 8:22
@miniBill A way to guarantee the integrity of message and its signature –  ts01 Feb 26 at 8:23
@miniBill for given message m and hash h(m) = x, there is function f which outputs f(m + x) = x. If you are asking for practical use, there is probably any. –  ts01 Feb 26 at 8:31

1 Answer 1

How about:

  • g(x)=x, f(x)=x/2
  • g(x)=x^2, f(x) = 1/4 * (sqrt(1+4*x)-1)^2
  • g(x)=x^n, f(x) = RootOf(Z^n+Z-x)^n
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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