Message Boards Message Boards


Does a (cryptographic?) function satisfying these 3 constraints exist?

Posted 6 months ago
2 Replies
0 Total Likes
  1. f(program,state)=hash. hash is unique for every pair of (program,state). f, program and state are public. Maybe state can be made private.

  2. f^−1(hash) does not exist, and there is no function g, g(hash)=(program,state). Meaning, there is no other way to obtain the hash but by using f.

  3. verify(program,state,hash)=true, if f(program,state)=hash. False otherwise.

2 Replies

Rohit is right. Another option, you can use HMAC

Posted 6 months ago

Wouldn't any cryptographic hash work?

f[program_, state_] := Hash[program <> state, "SHA512", "HexString"];
verify[program_, state_, hash_] := f[program, state] == hash;

hash = f["Hello", "World"]
verify["Hello", "World", hash]
(* True *)
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract