Re:Confess your love with zero-knowledge
by garaetjjte on Friday June 03, 2022 @03:30PM
(#31612612)
Doesn't work, because you can reasonably brute-force possible gifts.
[ Parent
| on HN ]
Re:Confess your love with zero-knowledge
by lights0123 on Friday June 03, 2022 @03:47PM
(#31612804)
You could reveal the hash letter-by-letter and stop as soon as a letter differs so there's more possibilities.
Re:Confess your love with zero-knowledge
by teaearlgraycold on Friday June 03, 2022 @11:03PM
(#31616557)
> stop as soon as a letter differs
Oops - you just exposed a timing attack side channel
Yeah I'm not sure what's the best protocol that's actually zero-knowledge here, but since we both trusted each other to only want to find out whether or not our gifts were the same, and otherwise to not spoil the surprise, this did the job.
Re:Confess your love with zero-knowledge
by kevinventullo on Friday June 03, 2022 @06:03PM
(#31614251)
You could write a script that does the hash comparison for you and simply outputs “Yes” or “No” for whether the hashes are identical.
Re:Confess your love with zero-knowledge
by soonerroadie on Friday June 03, 2022 @11:02PM
(#31616555)
You could just write a script that lets you write an input and your spouse writes an input and then compares the two inputs without showing them - no need for hashing at all.
Re:Confess your love with zero-knowledge
by 10000truths on Friday June 03, 2022 @04:06PM
(#31612999)
Sure, but the example is contrived, as it serves to illustrate the point in an easily digestible (heh) way. In real world applications, both the possible messages and the possible hashes would be way too large to brute force.
You can similarly brute force mutual acquaintances in TFA
But why would you do it?