Secret Resolutions

It feels good to announce your goals — almost as good as it feels to actually achieve them. The research is clear: to keep your resolutions, keep them to yourself.

But if you must talk about them, then consider publishing cryptographic hashes of your resolutions instead. A hash is a “one-way” function that scrambles its input in a way that is difficult to reverse, but easy for a friend to verify once you tell them the original input.

Example

Suppose my resolution is “go to the gym”. I can enter it in this page, which will generate a random key like fc78a780d7f57717. Next, it will pass both my resolution and the key through a hash function, which mixes them together to produce the final value 93330a3c647a232c8de166b6. I can share this hash with my friends.

Once I accomplish my goal, I can reveal the key and the contents of my resolution. My friends can then run the hash function themselves in order to check that it produces the same value as the hash that I shared in the beginning of the year. You can try this out by plugging those values into the verifier.

Details for nerds

Instead of a plain hash function, I’m using HMAC-SHA256, truncated to the first 12 bytes (24 hex digits) so that five resolutions can fit comfortably in a tweet. A keyed hash makes it harder to brute-force short messages, and means that even if two people enter the same message, they will come up with different outputs. Keys are 8 bytes by default to keep them small and tidy, but if you have dark secrets, then you can increase their length:

All computations are performed locally on your device, and will not be sent anywhere.

Hashes of your resolutions. You can send these to your friends:

Your resolutions, along with the secret keys and links for verification. Keep these safe in your notes app: