‹ BackHN Continuity

Thread

Keys Not Included: recovering the signing keys for US driver's license barcodes

289 points · 152 comments · Ryan5453

  1. dmurray · · focus · HN ↗
    This is a great investigation but I have two small nits:

    > the ZNB field is not empty and not garbage: it contains a well-formed 71-byte DER ECDSA signature, correctly Ascii85-encoded, with the right prefix and a plausible length. But it fails the cryptographic check instantly, because it was signed with somebody else's key.

    Seems doubtful! I expect the forgers used a real signature from another card instead, so it has the right key but the wrong data. Reverse engineering the process as the author did and making up their own key wouldn't be of any value to the forgers.

    > I built a little demo to check the signatures across California, New York, and Virginia: take a picture of the barcode and check it here.

    This is not wrong, but should come with a little warning. A real verifier needs to additionally check the encoded data matches the human-readable data on the front of the card.

    1. crote · · focus · HN ↗
      > A real verifier needs to additionally check the encoded data matches the human-readable data on the front of the card.

      I mean, not really? Only the machine-readable part is signed, so it should be treated as the sole source of truth. Besides, only an idiot forger would put different data in the human-readable part - it would be the easiest way to get caught!

      1. dmurray · · focus · HN ↗
        But if the forger claims his name is John Smith (or his date of birth is xx/xx/2004) he will edit the human-readable part.

        If he pairs the edited human-readable part with a real barcode copied from a real license in someone else's name, then anyone inspecting the license will see the documentation matches his claim, and if they also use this site to check for fake barcodes it will confirm the barcode was really issued by the California DMV.

      2. gmueckl · · focus · HN ↗
        It depends entirely on the purpose of the forgery. Some grocery stores do ID checks by looking at the front of the ID. Others just run the ID across a scanner and the employees are so rushed they don't read it or check the picture. Similar things happen e.g. at bars or casinos. Incomplete forgeries can get you far enough under the right circumstances.
      3. dfox · · focus · HN ↗
        You are assuming that the forgers care about the machine readable part at all. Vast majority of forged EU ID cards I have seen are trivially recognizable by the fact that the MRZ contains something that kinda-sorta matches the human readable part, but is syntactically invalid and has wrong checksums.
        1. hedora · · focus · HN ↗
          I imagine a good forger would add wear marks to the barcode so it doesn’t scan for a plausible reason.
      4. andylynch · · focus · HN ↗
        I quite like the way passports touch on this - the electronic part has a password; that password is made up of info from the printed data page - so you need both sets of information to validate it.
        1. Ryan5453 · · focus · HN ↗
          The ICAO standard for passport chips is really well done. Especially since you can read the photo from the chip itself.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.