Category Archives: General

Hacking QR codes

QR codes are becoming quite popular, especially in advertising.

Photo by infovore

But QR codes have a security flaw – it’s not too difficult to turn one QR code into another with just a bit of OHP film and some Tippex.

Obviously I don’t support vandalism so I’ll be using this fake Google poster that I made as an example.

You will need:

  • A mobile phone with a QR code scanning application. I used Barcode Scanner.
  • The free GIMP image manipulation software.
  • Clear overhead projector (OHP) film.
  • Tippex (or some way of printing in white).

Scan your target QR code and use the free QR code generator to generate a copy of the original code. You will also need to generate the QR code that you want to replace it with.


The target QR code is on the left and the replacement QR code is on the right.

Open both images in GIMP. Copy the replacement QR code into a new layer on top of the target QR code and change the layer mode to “Grain Extract”.

The grey areas are the areas where the two images overlap; there’s quite a lot of grey here because a lot of the information contained in the two codes is the same.* Black and white areas indicate differences between the two images; black pixels appear where the original is white and the replacement is black and vice versa.

Select the grey areas and remove them from the image, and then invert the colour so that black pixels appear where the original is white and the replacement is black; and white pixels appear where the original is black and the replacement is white.

The chequered areas indicate that the image is transparent. It is important that all the images you save during this process are saved as PNGs which, unlike JPEGs, are lossless and support transparency.

Now you need to print your overlay (at the same size as the original) onto transparent OHP film. The vast majority of printers are unable to print in white ink, but as it’s only the contrast between black and white that is important, you can replace the white with yellow for printing.

 
The overlay, ready for printing, is on the left, and the result of overlaying on the right.

If you’re using opaque yellow ink (most printers aren’t able to do this) then your overlay is ready. Otherwise you will need to replace the yellow pixels with white by using a correction fluid such as Tippex.

Now all you need to do is place your overlay on top of the original QR code to create your new replacement QR code. If you know what you’re doing you can download the GIMP .XCF file I created in the course of this post.

* Both codes have the same position and alignment indicators, the same version and timing information, and both contain the same “http://www.” data.

UK Energy Mix

A lot of people get confused between the electricity they use and the energy they use.

It’s easy to forget that the majority of people use natural gas for heating (e.g. a gas-fired central heating system) and cooking and petrol for transport; electricity only makes up a small part of the mix.

The graph below shows how the UK’s “energy mix” has changed over the last forty years.

Electrification peaked between 1994 and 1998, the same time that nuclear power was at it’s peak in the UK. Greater electrification would be a benefit to the environment as electricity is a low-carbon fuel, especially when nuclear and renewables make a large contribution to the fuel mix. Also the “Dash for Gas” in the ’90s is clearly visible as a very marked increase in the size of the blue section.

Passive Institutional Controls

The storage of nuclear waste is a long term problem, on the scale of tens of thousands of years.  Regular warning signs are no use on a timescale this long: paper rots, metal rusts and paint peels. Changes in language and technology make leaving a lasting warning to future societies complicated.

The Waste Isolation Pilot Plant (WIPP) is a US nuclear waste disposal site in New Mexico. During its operational life it will dispose of thousands of tons of nuclear waste and must therefore “steward” this waste for the following 10000 years.

During its design phase the creators of WIPP embarked on a plan to create “Passive Institutional Controls” (PICs), warning signs that would last and make sense for at least ten thousand years. The WIPP operators convened a panel to decide on PICs, that included material scientists, linguists, archaeologists, geomorphologists, anthropologists as well as members of other academic disciplines.

Amongst the ideas that were considered:

  • The use of standard symbols should be avoided, considering how quickly their meanings change. The panel gave the example of the swastika, a Hindu symbol first used in 4000 BCE, that gained an entirely different meaning after being appropriated by the Nazi Party (and its predecessor, the German Workers Party) nearly six thousand years later. Instead, symbols based on concepts that are universal to all humans, such as facial expressions, should be used.

  • Berms of earth should be created around the site. These berms should be at least ten metres tall to resist erosion, and contain materials designed to give them “different dielectric, radar reflective, and magnetic properties” to aid better detection by aircraft and satellites.
  • Everything on site should be constructed from heavy and irregularly shaped pieces, making their removal and reuse both difficult and not worthwhile. The materials used should be very cheap as to discourage people from removing them from the site for resale or recycling.
  • An ‘information room’, lit by sunlight and containing information about the site and the materials stored there, in the seven official languages of the United Nations and the local Navajo language, should be constructed on the surface at the site. It should also contain a map of other known nuclear waste disposal sites so as to create a relationship between these places. The walls of the information room should be constructed from a series of stacked plates so that as the top layer erodes, a new layer containing identical information is revealed.

  • All of the marker stones should contain blank space designed to be used by far-future generations to write in their own language.
  • The site should be surrounded by imposing granite monoliths, 7½ metres high and make use of “menacing earthworks” or a “field of thorns” and use irregular shapes and/or patterns  to put visitors at unease and give them a threatening and unsafe impression. “Perfect” shapes such as circles, arches and regular polygons should be avoided.

  • ‘Musical instruments’ powered by the wind could be built, which would ‘play’ dissonant sounds, again with the intent of unnerving and unsettling visitors.
  • Star charts should be used to show how the stars will be positioned when the site is safe to investigate; these dates should be included not only in the western Gregorian calendar but also in the Chinese, Jewish and Islamic calendars.

Not all of the recommendations were approved for inclusion in the final suggestion. The berms were still part of the plan but the “scary landscape” idea was nixed, with the exception of using imposing monoliths to mark the site; and an “Information Center” that is open to the sky was included.

The ‘Hot Cell’ is is “an existing reinforced concrete 40-by-70 foot structure with walls 4.5 feet thick. Its foundation extends 30 feet below grade, and the roof is 60 feet above grade. The Hot Cell will remain after closure as an ‘archeological remnant’, effectively serving the function of an additional permanent marker.”

The buried storage room would be accessible only by a cone-shaped hole, designed to be large enough to allow a person access but not large enough to allow someone to remove ‘artefacts’ from the site.

The construction of markers is due to begin in 2036 after an extensive evaluation process.