Re:Peter Todd (Bitcoin core dev) set up a SHA-1 “Pinata” and...
by nullc on Thursday February 23, 2017 @12:48PM
(#13715926)
Either by using interaction (with a ZKCP) or by using a two phase redemption and a covenant (https://blockstream.com/2016/11/02/covenants-in-elements-alp... which requires OP_CAT and friends which are disabled but could easily be reenabled after the segwit improvement to Bitcoin).
The script is just checking that the spender knows 2 pieces of data that are different but have the same SHA1 hash. I can't see a way to do that that can't be easily replayed by somebody else spending to a different address.
As soon as the transaction is broadcast, you reveal your 2 pieces of data that are different but have the same SHA1 hash.