News for hackers. Stuff that matters.
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.
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

Re:Confess your love with zero-knowledge by Liron on Friday June 03, 2022 @03:35PM (#31612678)
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.
Re:Confess your love with zero-knowledge by mbauman on Friday June 03, 2022 @03:57PM (#31612911)
You can similarly brute force mutual acquaintances in TFA
Re:Confess your love with zero-knowledge by xigoi on Friday June 03, 2022 @08:00PM (#31615355)
But why would you do it?
Re:Confess your love with zero-knowledge by kjeetgill on Friday June 03, 2022 @10:26PM (#31616331)
I think the point is just that this is a misleading example of zero-knowledge proofs which are meaningful different cryptographically.