|
|
|
|
|
by 3eb7988a1663
361 days ago
|
|
This was sort-of the winning solution to an underhanded C contest to redact an image. Hazily remembered, but the winner used a trick where already black pixels got redacted to one color black and already white pixels got to an ever so slightly different black. Reversing the image would then make it trivial to read the original black-on-white text. |
|
The image was in PPM format, which stores the color components of the pixels as ASCII text (so a white pixel is stored as "255 255 255" and a black one is "0 0 0"). To redact the image, the code replaced every digit of the numbers with '0', so white became "000 000 000" and black stayed as "0 0 0". Both are black and indistinguishable if you're viewing the image, but you can tell them apart by looking at the file text.
Sadly the UCC homepage seems to have vanished, but I found this account from the author: http://notanumber.net/archives/54/underhanded-c-the-leaky-re...