NZ Herald
  • Home
  • Latest news
  • Herald NOW
  • Video
  • New Zealand
  • Sport
  • World
  • Business
  • Entertainment
  • Podcasts
  • Quizzes
  • Opinion
  • Lifestyle
  • Travel
  • Viva
  • Weather

Subscriptions

  • Herald Premium
  • Viva Premium
  • The Listener
  • BusinessDesk

Sections

  • Latest news
  • New Zealand
    • All New Zealand
    • Crime
    • Politics
    • Education
    • Open Justice
    • Scam Update
  • Herald NOW
  • On The Up
  • World
    • All World
    • Australia
    • Asia
    • UK
    • United States
    • Middle East
    • Europe
    • Pacific
  • Business
    • All Business
    • MarketsSharesCurrencyCommoditiesStock TakesCrypto
    • Markets with Madison
    • Media Insider
    • Business analysis
    • Personal financeKiwiSaverInterest ratesTaxInvestment
    • EconomyInflationGDPOfficial cash rateEmployment
    • Small business
    • Business reportsMood of the BoardroomProject AucklandSustainable business and financeCapital markets reportAgribusiness reportInfrastructure reportDynamic business
    • Deloitte Top 200 Awards
    • CompaniesAged CareAgribusinessAirlinesBanking and financeConstructionEnergyFreight and logisticsHealthcareManufacturingMedia and MarketingRetailTelecommunicationsTourism
  • Opinion
    • All Opinion
    • Analysis
    • Editorials
    • Business analysis
    • Premium opinion
    • Letters to the editor
  • Politics
  • Sport
    • All Sport
    • OlympicsParalympics
    • RugbySuper RugbyNPCAll BlacksBlack FernsRugby sevensSchool rugby
    • CricketBlack CapsWhite Ferns
    • Racing
    • NetballSilver Ferns
    • LeagueWarriorsNRL
    • FootballWellington PhoenixAuckland FCAll WhitesFootball FernsEnglish Premier League
    • GolfNZ Open
    • MotorsportFormula 1
    • Boxing
    • UFC
    • BasketballNBABreakersTall BlacksTall Ferns
    • Tennis
    • Cycling
    • Athletics
    • SailingAmerica's CupSailGP
    • Rowing
  • Lifestyle
    • All Lifestyle
    • Viva - Food, fashion & beauty
    • Society Insider
    • Royals
    • Sex & relationships
    • Food & drinkRecipesRecipe collectionsRestaurant reviewsRestaurant bookings
    • Health & wellbeing
    • Fashion & beauty
    • Pets & animals
    • The Selection - Shop the trendsShop fashionShop beautyShop entertainmentShop giftsShop home & living
    • Milford's Investing Place
  • Entertainment
    • All Entertainment
    • TV
    • MoviesMovie reviews
    • MusicMusic reviews
    • BooksBook reviews
    • Culture
    • ReviewsBook reviewsMovie reviewsMusic reviewsRestaurant reviews
  • Travel
    • All Travel
    • News
    • New ZealandNorthlandAucklandWellingtonCanterburyOtago / QueenstownNelson-TasmanBest NZ beaches
    • International travelAustraliaPacific IslandsEuropeUKUSAAfricaAsia
    • Rail holidays
    • Cruise holidays
    • Ski holidays
    • Luxury travel
    • Adventure travel
  • Kāhu Māori news
  • Environment
    • All Environment
    • Our Green Future
  • Talanoa Pacific news
  • Property
    • All Property
    • Property Insider
    • Interest rates tracker
    • Residential property listings
    • Commercial property listings
  • Health
  • Technology
    • All Technology
    • AI
    • Social media
  • Rural
    • All Rural
    • Dairy farming
    • Sheep & beef farming
    • Horticulture
    • Animal health
    • Rural business
    • Rural life
    • Rural technology
    • Opinion
    • Audio & podcasts
  • Weather forecasts
    • All Weather forecasts
    • Kaitaia
    • Whangārei
    • Dargaville
    • Auckland
    • Thames
    • Tauranga
    • Hamilton
    • Whakatāne
    • Rotorua
    • Tokoroa
    • Te Kuiti
    • Taumaranui
    • Taupō
    • Gisborne
    • New Plymouth
    • Napier
    • Hastings
    • Dannevirke
    • Whanganui
    • Palmerston North
    • Levin
    • Paraparaumu
    • Masterton
    • Wellington
    • Motueka
    • Nelson
    • Blenheim
    • Westport
    • Reefton
    • Kaikōura
    • Greymouth
    • Hokitika
    • Christchurch
    • Ashburton
    • Timaru
    • Wānaka
    • Oamaru
    • Queenstown
    • Dunedin
    • Gore
    • Invercargill
  • Meet the journalists
  • Promotions & competitions
  • OneRoof property listings
  • Driven car news

Puzzles & Quizzes

  • Puzzles
    • All Puzzles
    • Sudoku
    • Code Cracker
    • Crosswords
    • Cryptic crossword
    • Wordsearch
  • Quizzes
    • All Quizzes
    • Morning quiz
    • Afternoon quiz
    • Sports quiz

Regions

  • Northland
    • All Northland
    • Far North
    • Kaitaia
    • Kerikeri
    • Kaikohe
    • Bay of Islands
    • Whangarei
    • Dargaville
    • Kaipara
    • Mangawhai
  • Auckland
  • Waikato
    • All Waikato
    • Hamilton
    • Coromandel & Hauraki
    • Matamata & Piako
    • Cambridge
    • Te Awamutu
    • Tokoroa & South Waikato
    • Taupō & Tūrangi
  • Bay of Plenty
    • All Bay of Plenty
    • Katikati
    • Tauranga
    • Mount Maunganui
    • Pāpāmoa
    • Te Puke
    • Whakatāne
  • Rotorua
  • Hawke's Bay
    • All Hawke's Bay
    • Napier
    • Hastings
    • Havelock North
    • Central Hawke's Bay
    • Wairoa
  • Taranaki
    • All Taranaki
    • Stratford
    • New Plymouth
    • Hāwera
  • Manawatū - Whanganui
    • All Manawatū - Whanganui
    • Whanganui
    • Palmerston North
    • Manawatū
    • Tararua
    • Horowhenua
  • Wellington
    • All Wellington
    • Kapiti
    • Wairarapa
    • Upper Hutt
    • Lower Hutt
  • Nelson & Tasman
    • All Nelson & Tasman
    • Motueka
    • Nelson
    • Tasman
  • Marlborough
  • West Coast
  • Canterbury
    • All Canterbury
    • Kaikōura
    • Christchurch
    • Ashburton
    • Timaru
  • Otago
    • All Otago
    • Oamaru
    • Dunedin
    • Balclutha
    • Alexandra
    • Queenstown
    • Wanaka
  • Southland
    • All Southland
    • Invercargill
    • Gore
    • Stewart Island
  • Gisborne

Media

  • Video
    • All Video
    • NZ news video
    • Herald NOW
    • Business news video
    • Politics news video
    • Sport video
    • World news video
    • Lifestyle video
    • Entertainment video
    • Travel video
    • Markets with Madison
    • Kea Kids news
  • Podcasts
    • All Podcasts
    • The Front Page
    • On the Tiles
    • Ask me Anything
    • The Little Things
  • Cartoons
  • Photo galleries
  • Today's Paper - E-editions
  • Photo sales
  • Classifieds

NZME Network

  • Advertise with NZME
  • OneRoof
  • Driven Car Guide
  • BusinessDesk
  • Newstalk ZB
  • Sunlive
  • ZM
  • The Hits
  • Coast
  • Radio Hauraki
  • The Alternative Commentary Collective
  • Gold
  • Flava
  • iHeart Radio
  • Hokonui
  • Radio Wanaka
  • iHeartCountry New Zealand
  • Restaurant Hub
  • NZME Events

SubscribeSign In
Advertisement
Advertise with NZME.
Home / New Zealand

Making a hash of it: The lowdown on Inland Revenue and your data

RNZ
15 Sep, 2024 10:37 PM7 mins to read

Subscribe to listen

Access to Herald Premium articles require a Premium subscription. Subscribe now to listen.
Already a subscriber?  Sign in here

Listening to articles is free for open-access content—explore other articles or learn more about text-to-speech.
‌
Save

    Share this article

Cellphone ban and patch laws | Focus Morning Bulletin September 16, 2024
Mount Albert Grammar hails cellphone ban, Waiheke Island vineyard’s $600,000 fine and the new gang patch law causing an uproar.
Video Player is loading.
Current Time 0:00
/
Duration 0:00
Loaded: 0%
0:00
Stream Type LIVE
Remaining Time -0:00
 
1x
    • Chapters
    • descriptions off, selected
    • captions settings, opens captions settings dialog
    • captions off, selected

      This is a modal window.

      Beginning of dialog window. Escape will cancel and close the window.

      Text
      Text Background
      Caption Area Background
      Font Size
      Text Edge Style
      Font Family

      End of dialog window.

      This is a modal window. This modal can be closed by pressing the Escape key or activating the close button.

      Watch: Aerial footage shows scale of Auckland supermarket blaze

      UP NEXT:

      Autoplay in
      3
      Disable Autoplay
      Cancel Video
      Mount Albert Grammar hails cellphone ban, Waiheke Island vineyard’s $600,000 fine and the new gang patch law causing an uproar.
      NOW PLAYING • Cellphone ban and patch laws | Focus Morning Bulletin September 16, 2024
      Mount Albert Grammar hails cellphone ban, Waiheke Island vineyard’s $600,000 fine and the new gang patch law causing an uproar.
      Opinion

      By Phil Pennington of RNZ

      ANALYSIS

      The encrypted details of hundreds of thousands of taxpayers are being given by Inland Revenue to Facebook, Instagram, LinkedIn and Google for targeted advertising — but how good is the encryption?

      Inland Revenue and its controlling minister, Simon Watts, say it is a lock.

      “This process is irreversible,” Watts told RNZ on Monday.

      Advertisement
      Advertise with NZME.
      Advertisement
      Advertise with NZME.

      Many others demur. They say it is easily reversible — and one software developer built us something to show how.

      Overseas, the objectors include the US Federal Trade Commission and the European Data Protection Supervisor. Closer to home, various software consultants contacted RNZ after the story ran to express their concerns.

      “I was absolutely stunned that this is happening and I think there is a very clear privacy breach going on here,” one emailed.

      Advertisement
      Advertise with NZME.

      Discover more

      • Inland Revenue to spend $29 million on chasing tax ...
      • Revealed: IRD's new approach to claw back mounting ...
      • Opinion: My battle to claw back $1500 from IRD – there's ...

      “The IRD seem to be saying: we have a secure method (hashed data) to communicate with data-hungry multinational tech organisations who make money by building products based on the data they can collect about you. Clearly, that’s a bad argument,” another said.

      A third, ex-hacker Adam Boileau, was blunt about sharing details with organisations that already had billions of data points to start with.

      “Using hashing or other data aggregation in this context is, sadly, just a technological sleight-of-hand trick to bamboozle,” he said.

      One of Inland Revenue’s defences for choosing to use what was arguably the best-bang-for-buck approach to targeted advertising that tax money could buy — after all, papers show it spent only about $400,000 with Facebook this way in the past six years — was a technical one: “Hashing is a type of cryptographic security method that turns identifiers into randomised code and cannot be reversed so identities are protected,” it said.

      “For example, john.doe@ird.govt.nz may come out hashed as wLKziR/6RoXDv1MDaXLH1UNUC9nIVr97jrTnL4TcxsM=. Meta, for example, uses this hashed information and compares it to its own hashed information to build custom audiences.”

      ‘Cannot be reversed’ — really?

      Maybe 15 years ago (or whenever exactly it was that Inland Revenue started down this route — online marketer Jack Yan said it was an early adopter), “cannot be reversed” carried weight.

      But times, and tech, change.

      After the RNZ story revealed the practice, one software developer set out of his own volition to do some tyre-kicking.

      “To prove how ineffective hashing is for anonymising a finite set of values, I created a simple programme that converts any hashed (encrypted) NZ landline [phone] number back to the original (unencrypted) number,” he told RNZ.

      How long does it take?

      Advertisement
      Advertise with NZME.

      “0.15 seconds.”

      He called his programme the SHA256 Generator: SHA stands for standard hash algorithm, and SHA256 is the algorithm Facebook uses and was introduced along with three other hashing algorithms globally over 20 years ago.

      Here is the consultant’s DIY recipe for reversing irreversible hashing: First, generate a list of all possible phone numbers for each area code. “For example, for the South Island, 03 000 0000 to 03 999 9999.”

      Next, generate a SHA256 hash each. The Generator will do that for you super-quick.

      Store it in a database. Then when a hash lands and you think it might be a phone number, ask the database.

      “This is a well-known technique for attacking hashed values,” the consultant said.

      Advertisement
      Advertise with NZME.

      As you might imagine, someone streamlined and packaged up this approach, calling it “the rainbow table”.

      “A rainbow table attack is a password-cracking method that uses a special table (a “rainbow table”) to crack the password hashes in a database,” a tech website said.

      Boileau, the technical editor at Risky.biz, does weekly podcasts on security news. He compared hashing to a meat grinder for lumps of data.

      “You can’t tell by looking at a hash sausage which bits of the pig went in.”

      A cyberattacker who stole a file of passwords had to attempt to decode the hashes, “to put the sausage into the grinder, turn the handle backwards, and get a pig out”, he said.

      “Instead of this folly, what we — I spent 20 years as a professional hacker — do is just hash every word in the dictionary and see if we get a match.”

      Advertisement
      Advertise with NZME.

      Surely that takes ages?

      No. “Using the power of modern 3D gaming graphics equipment, we can do this at speeds of hundreds of billions of words per second. The maths for both are basically the same.

      If you know something about the nature of the data that has been hashed, then the reversing gets even easier. For instance, if it is probably info on gender, dates of birth, phone numbers or credit cards, then simply computing a hash for every possible phone number or credit card “is trivial, mere seconds or minutes of compute”.

      “Ultimately, there is no easy way to share data with someone or an organisation you don’t trust, especially if that organisation already has billions of data points to start with,” Boileau said.

      “If they want to correlate or investigate to de-anonymise data, they can do so.”

      They can. But do Facebook and Google and LinkedIn want to? What is in it for them if they already have your name, date of birth, address, phone, and email contact?

      Advertisement
      Advertise with NZME.

      “Look at the kinds of adverts that are being posted, which are targeted at specific people by the IRD,” Daniel Wilson, a lecturer in the School of Computer Science at Auckland University, said.

      ‘Sensitive stuff’

      Inland Revenue said it targeted ads at people with an income tax or GST debt due, or a student loan debt due, or needing a Working for Families update.

      “What happens if the aim of IRD is successful and someone clicks on one of the IRD adverts dished up by Facebook?” Wilson said.

      “Facebook, for instance, keeps track of your ad activity.” (You can check that out by going to “menu”, then “Recent Ad Activity”.)

      “So if I click on the IRD ‘sort out your income tax debt’ advert, that is logged ... giving information to Meta that, for instance, I am likely to have an income tax debt is pretty sensitive stuff.

      “This is in a different league from Meta knowing that I am a fan of, say, popular science books.”

      Advertisement
      Advertise with NZME.

      Inland Revenue offered other defences, including this was both within the law and an effective way to get tax revenue back.

      It also stressed it trusted the tech companies to do the right thing, including deleting the taxpayer’s info quickly after use.

      Wilson said Inland Revenue might think deletion limited its responsibility.

      “But in the broader system context, if IRD is successful in their aim of getting a client to click on a specific ad that indicates a particular tax liability, this information is logged and, in the current environment, is free to be used by social media companies for activities like training AI systems,” he said.

      “Social media organisations would not have been able to collect this specific kind of information without IRD’s targeted advertising campaigns.”

      Where is the regulator in this?

      The Office of the Privacy Commissioner told RNZ it did not have a general position on hashing, but could look at developing one if need be. The US Federal Trade Commission and European regulators saw the need years ago.

      Advertisement
      Advertise with NZME.

      One emailer said the commissioner needed to find out more about Inland Revenue, and conjured the slippery slope. “Up until a few years ago there was a red line that health data should not go offshore. That has been gradually whittled down.”

      Another said Inland Revenue might be sailing close to the wind. They discussed how the Google Adwords Customer Match feature allowed a customer like Inland Revenue to upload a list of details to Google to target individuals directly with advertising.

      One of the terms of service conditions was that the advertiser had to have a privacy policy that allowed them to share customer data with advertisers and third parties.

      The emailer said they did not believe Inland Revenue had acquired “the knowing, uncoerced consent for this usage of my private information” as required under the Privacy Act.

      Inland Revenue defended hashing — then, after the RNZ story ran, said it would take another look “to ensure it is still safe to use”.

      But when was it last safe?

      Advertisement
      Advertise with NZME.



      Sign up to The Daily H, a free newsletter curated by our editors and delivered straight to your inbox every weekday.

      Save

        Share this article

      Latest from New Zealand

      New Zealand

      'A let-down': Iwi challenges DoC, minister over ski field deals

      18 Jun 09:18 AM
      New Zealand

      Police investigating after body found in Christchurch carpark

      18 Jun 09:17 AM
      New ZealandUpdated

      Numbers revealed for tonight's $25m Powerball jackpot

      18 Jun 08:23 AM

      Jono and Ben brew up a tea-fuelled adventure in Sri Lanka

      sponsored
      Advertisement
      Advertise with NZME.
      Recommended for you
      'A let-down': Iwi challenges DoC, minister over ski field deals
      New Zealand

      'A let-down': Iwi challenges DoC, minister over ski field deals

      18 Jun 09:18 AM
      Police investigating after body found in Christchurch carpark
      New Zealand

      Police investigating after body found in Christchurch carpark

      18 Jun 09:17 AM
      Numbers revealed for tonight's $25m Powerball jackpot
      New Zealand

      Numbers revealed for tonight's $25m Powerball jackpot

      18 Jun 08:23 AM
      'Terrible lie': Defence counters claims in mushroom murder trial
      World

      'Terrible lie': Defence counters claims in mushroom murder trial

      18 Jun 08:02 AM
      Tom Cruise, Dolly Parton to be awarded honorary Oscars
      Entertainment

      Tom Cruise, Dolly Parton to be awarded honorary Oscars

      18 Jun 07:26 AM

      Latest from New Zealand

      'A let-down': Iwi challenges DoC, minister over ski field deals

      'A let-down': Iwi challenges DoC, minister over ski field deals

      18 Jun 09:18 AM

      They allege the Crown ignored Treaty obligations by not engaging with them.

      Police investigating after body found in Christchurch carpark

      Police investigating after body found in Christchurch carpark

      18 Jun 09:17 AM
      Numbers revealed for tonight's $25m Powerball jackpot

      Numbers revealed for tonight's $25m Powerball jackpot

      18 Jun 08:23 AM
      Premium
      Has Tory Whanau's experience put women off running for mayor?

      Has Tory Whanau's experience put women off running for mayor?

      18 Jun 07:26 AM
      Help for those helping hardest-hit
      sponsored

      Help for those helping hardest-hit

      NZ Herald
      • About NZ Herald
      • Meet the journalists
      • Newsletters
      • Classifieds
      • Help & support
      • Contact us
      • House rules
      • Privacy Policy
      • Terms of use
      • Competition terms & conditions
      • Our use of AI
      Subscriber Services
      • NZ Herald e-editions
      • Daily puzzles & quizzes
      • Manage your digital subscription
      • Manage your print subscription
      • Subscribe to the NZ Herald newspaper
      • Subscribe to Herald Premium
      • Gift a subscription
      • Subscriber FAQs
      • Subscription terms & conditions
      • Promotions and subscriber benefits
      NZME Network
      • The New Zealand Herald
      • The Northland Age
      • The Northern Advocate
      • Waikato Herald
      • Bay of Plenty Times
      • Rotorua Daily Post
      • Hawke's Bay Today
      • Whanganui Chronicle
      • Viva
      • NZ Listener
      • Newstalk ZB
      • BusinessDesk
      • OneRoof
      • Driven Car Guide
      • iHeart Radio
      • Restaurant Hub
      NZME
      • About NZME
      • NZME careers
      • Advertise with NZME
      • Digital self-service advertising
      • Book your classified ad
      • Photo sales
      • NZME Events
      • © Copyright 2025 NZME Publishing Limited
      TOP
      search by queryly Advanced Search