Staking Claims with Scheduled Tweets
Twitter has a nifty new feature which allows you to schedule the publication of a Tweet. But, crucially, it doesn't let the reader know when the message was originally written.
How can you, as a publisher, prove that you wrote a scheduled Tweet at a specific time?
Here's one method.
- Write a Tweet which contains a timestamp - "This is my message 2020-08-17"
- Generate a hash of the message -
SHA256: BAE149775399E3AEBC9DEF9D4D4468C9217593B58B76655F479C9CEE4FF73CBA
- Post the hash to Twitter.
- Schedule your message as a reply to the hash.
Here's an example - check the dates:
Is this useful?
Probably not very useful. Here's a couple of ideas.
Post your prediction for something, without influencing it. For example, the results of an election.
A sort of Dead Man's Switch - a message to be sent when you're not available.
It isn't foolproof.
It's really easy to screw up a hash. My first couple of experiments didn't work because of errant whitespaces.
Modern hashes like SHA256 are probably resistant to collisions in Twitter's limited message space.
And, of course, a person can post two hashes - for contradictory messages - and only publish replies one of them.
Sam Sneddon says:
Modern hashes like SHA256 are probably resistant to collisions in Twitter’s limited message space.
By the pigeonhole principle, it’s clear to show that there are collisions (there are 2^256 possible SHA256 hashes and there are 0x10F7FF^280 possible tweets, therefore some must collide). That said, there are no known practical collision/preimage/second-preimage attacks on SHA256.
Gustavo Guevara says:
That’s a very interesting fact. I’m studying to understand the types of attack you’ve enumerated, but I’d like to know why have you defined the maximum number of permutations as 0x10F7FF? Thanks in advance.
hi mom says:
i dunno twittrr but it looks like messages are 280 utf8 code points long
Sam Sneddon says:
Yeah, they’re up to 280 scalar values long, and there are 0x10F7FF (i.e., 0x10FFFF code points minus the 0x800 surrogate code points, which cannot be encoded in UTF-8) possible values for them.
HN Front Page said on twitter.com:
Staking Claims with Scheduled Tweets L: shkspr.mobi/blog/2020/08/s… C: news.ycombinator.com/item?id=242511…
Raghav Toshniwal says:
I made something to make this easy: https://tweetencryptor.netlify.app/