Two Generals

It’s been a long while since I posted anything of interest other than fitness and running, so here’s something I found that isn’t fitness related.

Tom Scott (Twitter: @tomscott) posted this video about the Two Generals problem. Basically it centres around two generals and asks how they can synchronise communication to ensure they two something at the same time.

In multithreading computing, including back when I was learning Java, we had a synchronized keyword which ensure only one thread went through a block of text. But here, you want two threads to proceed at the same time. How do you ensure that? Turns out there’s no guaranteed way.

Even TCP requires a 3-way handshake aka the SYN, SYN-ACK, ACK (https://www.inetdaemon.com/tutorials/internet/tcp/3-way_handshake.shtml), but if any of those messages drops, the connection never establishes.

Of course you could just use the UDP method of “fire-and-forget” and say “Hey, General B, we’re going to attack at 8pm, catch up if you have to”, and have dropped packets (or casualties in the two generals problem)

This is an interesting thought experiment and one I hadn’t considered during my time learning parallel and threaded programming.

Oh well, you learn something new every day, I guess.

Getting into my Wife’s Beaver

The Lock Picking Lawyer on YouTube posted this on april 1st. It’s an April Fools joke, yes, but daaaamnn…. how many takes did it take to do this without laughing I don’t know.

If you’ve ever watched any Carry On films with their numerous innuendos, you’ll understand the references.

Not A One-Trick Pony….

Who knew that Gwyneth Paltrow could sing?

And damn well, too.

She’s one of a select few Hollywood actors who can do a pretty fine job of singing too. Some other notables include

Kate Winslet

Hugh Jackman — who spent time in Broadway, so he’s probably got a bit of an unfair advantage to those who started in acting initially, but still, he definitely knows how to belt out a song

Not to forget also, Joaquin Phoenix

Here’s a WatchMojo list I found while rummaging for videos. Who knew?

Sully

I stumbled across this trailer of the Sully movie — the one which tells the story about the famous Hudson River landing.

And this was a brilliant set of editing cuts. It gives you the tension from just a couple of seconds of shots each. If you haven’t watched the film yet, do it now

And here’s a video of the investigation

Twitter’s Security Screwup and New Privacy Concerns

There is a new story doing the round about how Twitter found that it had stored user’s password in the clear in an internal log. Whilst reading it, I got this email from Twitter:

While this isn’t the first time a big company has done this (Github for one also did this), it seems unbelievable that a big company like Twitter would get itself caught out by this basic, common sense security practice. Pretty much every YouTube video and article about correctly handling passwords will tell you not to store them in the clear and only store them as hashes (with salts, preferably). Hashing algorithms are meant to be really difficult or impossible to reverse, meaning you can’t (easily) use the hashes to determine the original passwords.

Some examples from a quick YouTube search — Tom Scott’s video’s really good btw :), although is comment about “using login using Twitter and let them store your password for you” is a bit ironic :P

The fact that Twitter has our unencrypted passwords on disk… does this mean Twitter has been saving our original passwords before hashing them?

More to the point – whilst Twitter are quick to point out that no-one at the company can see the masked password, they don’t mention who has (or had) access to the unmasked passwords in the internal log. Or for how long…

Twitter users who had their accounts on private may not have been as private as they initially thought….

 

%d bloggers like this: