You could reveal the hash letter-by-letter and stop as soon as a letter differs so there's more possibilities.
> 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.
You could write a script that does the hash comparison for you and simply outputs “Yes” or “No” for whether the hashes are identical.
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.
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?
I think the point is just that this is a misleading example of zero-knowledge proofs which are meaningful different cryptographically.