Keys Not Included: recovering the signing keys for US driver's license barcodes
Unveiling a hidden cryptographic layer on US driver's licenses, this post meticulously reverse-engineers the signing keys for barcodes used by several states. It highlights a frustrating lack of transparency from ID vendors who implement robust security features for some states but keep them shrouded in secrecy for others, sparking discussions on public verification standards for critical identity documents.
The Lowdown
In a follow-up to his 'Insecure by Design' piece, the author delves into the cryptographic signatures found on US driver's license barcodes, revealing how some states employ digital signatures that are either publicly verifiable or completely opaque. The story navigates the technical journey of uncovering these hidden security features and the implications of their inconsistent implementation across the nation.
- AAMVA Standard & State-Specific Subfiles: Driver's licenses use a standard AAMVA PDF417 barcode format, but include 'jurisdiction-specific subfiles' (e.g.,
ZVfor Virginia,ZCfor California) where states can add proprietary data. - California's Transparent Approach: California, utilizing vendor IDEMIA, has a well-documented, publicly verifiable digital signature system using a W3C Verifiable Credential Barcode, publishing its public key and open-source verifier.
- Discovering CBN's Secret Signatures: The author discovered that Canadian Bank Note (CBN), another major ID vendor, also implements digital signatures for five states (NY, VA, NC, SC, WI) within their proprietary subfiles (
ZNB,ZVA, etc.), despite no public documentation. - Cryptographic Key Recovery: Through careful analysis of the Ascii85-encoded DER structure within the barcodes, the author identified ECDSA P-256 signatures. Utilizing the property of ECDSA to recover a public key given multiple signatures and the signed message, he successfully reconstructed the public keys for New York and Virginia.
- Reverse-Engineering the Signed Message: The critical challenge was determining the exact message payload signed. After extensive brute-forcing and AI assistance, it was discovered that the entire payload, including a zero-filled placeholder for the signature field itself, was signed.
- Public Verification Achieved: With the recovered keys and message construction, anyone can now verify the authenticity of driver's license barcodes from California, New York, and Virginia using the author's browser-based tool.
The core takeaway is that while the technology for secure, verifiable identity documents exists and is implemented by major vendors, its availability and transparency are inconsistent. Vendors like IDEMIA implement it openly for California but omit it or keep it secret for other states, while CBN has robust, hidden signatures that could be made public with minimal effort. This highlights a puzzling lack of standardization and transparency in a critical aspect of public identity security.