This article is more than **1 year old**

# Dev gives HBO free math tips to nail Game of Thrones pirate leakers

## An easy* way to ID a million leakers

Developer Bruno Cauet has offered HBO a series of mathematical equations that could have tracked the Game of Thrones season five leaker, or even killed the leak completely.

The massively popular series thought to be HBO's most profitable production was rocked over the weekend when a leaker, thought to be a translator with an advanced copy in hand, published the first four episodes which made its way to public Bittorrent trackers.

It appears that the multi-million dollar episodes were protected by a mere watermark in the bottom left corner of the video, promptly blurred by the leaking group.

The watermark is pretty much useless, Cauet reckons. Instead, credits and scenes could have been minutely extended, with a different time-tweak for anyone getting an advanced copy. Anyone planning a leak would need at least two sources to identify scene adjustments.

"The idea is very simple: make each copy unique in a non-visible way," Cauet says in a post.

Credits could be shortened by a frame, which would be easy, but also easy to defeat by cutting it out.

"Next iteration would be changing the length of each scene by a few milliseconds (a frame)," he says. For a very generous one million unique recipients HBO would need four variations of each of the 18 scenes that make up an episode.

In case an eagle-eyed leaker (or their pirate handlers) might spot that the total length of the episode was longer or shorter by up to 18 frames, Cauet offers two responses. The owner could either shorten or extend the credits, or implement this "self-compensating" math:

Distribute the changes so all files have the expected length. Let's see (for fun) what it gives (suppose \(k \equiv 2 \pmod 1\)):

Let \(C_k(s, K) =\) \(\#\{(c_i)_{(i ≤ s)} \mid 0 ≤ c_i ≤ k - 1, \sum_{i=1}^s c_i = K\}\) the set of all sequences of \(s\) posive elements below \(k\) which sum to \(K\).

How do we pick \(K\)? We want the sum of the centered \(c_i\) to be 0, so

$$ \sum_{i=1}^s c_i - \frac{k -1}{2} = 0 \\ \sum_{i=1}^s c_i = \sum_{i=1}^s \frac{k - 1}{2} \\ \sum_{i=1}^s c_i = \frac{k \times (k + 1)}{4} - \frac{s}{2} = K \\ $$ We first pick the offset of the first scene:

$$ C_k(s, K) = C_k(s - 1, K) + C_k(s - 1, K - 1) + \cdots + C_k(s - 1, K - k + 1) \\ C_k(s, K) = \sum_{i=0}^{min(K, k - 1)} C_k(s - 1, K - i) \\ $$ And the terminal cases are

$$ C_k(0, 0) = 1 \\ C_k(0, K) = 0 \quad if \, K ≠ 0 $$ With \(C_k(s, \frac{k \times (k + 1)}{4} - \frac{s}{2}) = n\) we can get \(k\) from \(s\) and \(n\).

Steganography can be, and is, used to hide identification markings within video, along with audio that can resist transcoding, where file formats are converted.

"Anti-piracy organisations and film houses have historically refused this author's repeat efforts to discuss even general information about the effectiveness of tracking mechanisms", he says.

Thompson security bod Jan Jao who develops movie protection gear for Technicolor told *NPR* back in 2006 that each frame of a movie using his software can be watermarked.

But pirates boast about eliminating tricky mass watermarks. The pirates behind the first screener copy to be leaked for the 2012 The Hobbit movie say they spent days blurring 300,000 watermarks which are dotted in 20 spots around the screen.

"Firstly there were watermarks, starting with small numbers counting from 0 to 9 randomly hardcoded in the video, and that during the whole movie, popping up mainly in the centre eye of the video half lucent. Some kind of weird code for identifying, don't know, can't blur them only when they appear, would be around 300,000 of them so made small constant blur spots over the 20 spots where they randomly appear, now they are gone, won't effect the viewing hardly seeable unless you are searching for it on purpose (sic)."

Another watermark revealed the "exact details" of the leaker, adding that it was "a big risk going out with this movie, hope you appreciate my work".

Cauet has advice for Game of Thrones fans too: "I think that binge-watching the first four episodes is a stupid idea that will make you ache for a month waiting for the fifth episode". ®

88