// insights

Protecting identity-verification data: HSM key management for DVS-class PII

Contents

Most encryption programmes are designed for data that can be replaced. A leaked password gets reset. A compromised credit card gets reissued in a week. Identity-verification data breaks that model: a passport number, a driver licence number, a facial biometric template, the result of a criminal history check — none of these can be rotated by the person they describe. When an organisation that verifies identities loses this data, the damage compounds for years, and no incident-response playbook can claw it back. That asymmetry is why key management for identity-verification workloads deserves harder guarantees than the software keystores most estates default to, and why this chapter treats it as its own problem rather than a footnote to general PII handling.

One thing to be clear about before we start: this chapter describes publicly documented programs and generic reference patterns for organisations that handle this class of data. It is an architecture discussion, not a description of any particular gateway, accreditation or engagement.

Why identity-verification data is a different risk class

Three properties separate this data from ordinary personal information, and each one changes the engineering answer.

  • Irrevocability. You cannot rotate someone’s birth certificate. Document identifiers are reissued slowly, expensively and incompletely — and a biometric template is never reissued at all. A breach of this data has no remediation path that makes the victim whole, which means prevention controls carry weight that detection and response cannot pick up later.
  • Aggregation. A verification store is, by construction, a curated identity-theft kit: name, date of birth, document numbers and often a photo, pre-matched and pre-validated. Attackers do not need to assemble anything; the organisation has done it for them. The value density per record is far above a typical CRM leak.
  • Third-party trust. Police-check results and document-match outcomes are sourced from government systems under access agreements. Losing this data doesn’t just harm individuals — it breaches the conditions under which the organisation was allowed to touch the source systems at all. The blast radius includes the business model.

The practical consequence: “we encrypt at rest” is not a sufficient sentence for this data class. The question an assessor will actually ask is where the keys live, who can use them, and how you would prove both — and if the answer is a keystore file on the same server as the data, the encryption is largely decorative.

The Australian ecosystem, briefly

For readers outside this space, the publicly documented landscape looks like this. The Identity Verification Services Act 2023, supported by the Identity Verification Services Rules 2024, provides the legislative basis for the Commonwealth’s identity-verification facilities. The best known is the Document Verification Service (DVS), through which government and approved private-sector organisations check whether the details on an identity document match the record held by the issuing authority — the service returns a match/no-match answer rather than handing over the record, and it is used at enormous scale (over 140 million transactions in 2022, per the Attorney-General’s Department). A Face Verification Service operates under the same framework for biometric matching against government records.

Alongside that sits the accreditation world. The Trusted Digital Identity Framework (TDIF) set the accreditation bar for digital-identity providers until it was superseded in late 2024 by the accreditation scheme under the Digital ID Act 2024, whose Accreditation Rules require accredited entities to maintain a protective security capability, manage cyber-security risks, undergo annual assessments, and (for non-Commonwealth entities) comply with ISO/IEC 27001 or an equivalent framework. And for criminal history: organisations accredited by the Australian Criminal Intelligence Commission to submit Nationally Coordinated Criminal History Checks operate under strict access agreements, including compliance with the Australian Privacy Principles in their handling of police information.

Notice the design pattern in the DVS itself: match/no-match is data minimisation at the protocol level. The central service avoids becoming a honeypot — which means the risk pools at the edges, in the requesting organisations that collected the document details, stored the transaction records, and retained whatever their business process retained. If that is you, the hard problem was never the gateway. It is your own database.

What the regulatory picture asks of your key management

None of these instruments says “buy an HSM”. What they say, consistently, is control intent that becomes very hard to satisfy without one once the data class is this sensitive:

  • APP 11.1 of the Privacy Act requires “reasonable steps” to protect personal information — and reasonableness scales with sensitivity and harm. For irrevocable identifiers at aggregation, the bar for what is reasonable sits well above what it is for a mailing list, and the 2022 penalty amendments (up to the greater of $50 million, three times the benefit, or 30% of adjusted turnover for serious interferences with privacy) put a number on getting it wrong.
  • APP 11.2 requires destruction or de-identification once the information is no longer needed. For verification records that fall out of retention on a rolling schedule, “destroy” has to actually mean something across every backup and replica — which, as we’ll see, is a key-management problem wearing a records-management costume.
  • Accreditation-style assessment — whether under the Digital ID Act rules, an ACIC access agreement, or an ISO 27001 certification those schemes lean on — asks you to demonstrate the control, not assert it. “Who can use the key that decrypts the verification store?” needs an answer backed by evidence, with named roles and an audit trail.
  • The ISM, for systems that connect to government, brings its cryptography and key-management controls into scope, and IRAP assessors ask for the same demonstrable key-lifecycle properties. We’ve mapped that terrain in detail in our chapter on ISM cryptography controls and HSM capability.

Read together, the intent is: keys separated from data, use of keys attributable to identities, and a defensible story for destruction. Now for the patterns that deliver it.

Pattern one: envelope encryption with HSM-held KEKs

The foundation pattern. Data is encrypted with symmetric data-encryption keys (DEKs) that live with the application tier — but every DEK is stored wrapped by a key-encryption key (KEK) that lives inside an HSM partition, is generated there, and is marked non-exportable. The application never holds the KEK; it holds wrapped DEKs and asks the HSM to unwrap them at startup or on demand.

What this buys you is a clean severing of the failure modes. Compromise the storage layer — stolen backups, a snapshot copied out of a cloud tenancy, a decommissioned SAN tray — and the attacker holds ciphertext plus wrapped DEKs they cannot open. Compromise the application server and the attacker can use keys while resident, but cannot take them: there is nothing to exfiltrate that works anywhere else, and the window of misuse is bounded and logged. The KEK itself was generated inside the hardware boundary and has never existed anywhere you cannot point to. If you are new to the platform underneath this pattern, our Luna HSM design and operational guide covers the foundations.

Pattern two: per-dataset keys and crypto-shredding

Envelope encryption with one DEK for the whole estate misses the second half of the opportunity. Assign DEKs at the grain your retention policy runs at — per dataset, per cohort, per year of verification records, in some designs per individual — and destruction becomes a cryptographic operation instead of a forensic one. Destroy the DEK (or the KEK wrapping that dataset’s DEKs) and every copy of the data it protected becomes irrecoverable simultaneously: primary, replicas, the backup tapes in a vault, the snapshot nobody remembered. This is crypto-shredding, and for organisations facing APP 11.2-style destruction obligations across sprawling backup estates, it is the only version of “we destroyed it” that survives questioning — deleting rows from a database that has months of full backups demonstrably does not. (Whether crypto-shredding satisfies a specific legal destruction obligation is a question for your counsel; what it changes is that you finally have a mechanism worth asking them about.)

The grain decision is a real design exercise: finer grain means cleaner shredding and smaller blast radius, but more keys to manage, and key-count pressure eventually shapes your HSM partition design. That trade-off space — including when a dataset deserves its own partition rather than just its own key — is the subject of our chapter on Luna partition strategy; an identity-verification platform is precisely the kind of consumer that earns a dedicated partition with its own roles and policies.

Pattern three: hardware-backed evidence of key use

The pattern nobody budgets for and every assessor asks about. Application logs saying “we decrypted a record” are self-reported homework: they live on the same host an attacker would compromise, and they attest to what the application believes happened. An HSM gives you a second, independent ledger — key operations logged by the device itself, against partition roles with separate credentials, on hardware the application team does not administer. When the question is “show me every use of the key protecting police-check results in March”, the difference between grepping application logs and producing a device-held audit trail with role attribution is the difference between an assertion and evidence. Pair the device trail with disciplined role custody — Partition Security Officer with governance custodians, Crypto Officer with the platform team, ceremonies witnessed and recorded — and the “who can use this key” question has a one-line answer.

Where the HSM sits in a verification-gateway architecture

A generic reference shape for an organisation that verifies identities against external services and retains records of doing so:

  • An application tier collects document details and calls the external verification service through a gateway component in a controlled network zone. Transient verification payloads live in memory, not on disk.
  • A records store keeps what the business process legitimately retains — transaction outcomes, retained attributes, check results — encrypted under the envelope scheme, with DEKs assigned at retention grain.
  • A crypto service (often just a library plus the HSM client) is the only component that talks to the HSM, over an authenticated client link, from named client identities assigned only to the identity platform’s partition.
  • The HSM pair sits in a restricted security zone across two sites, HA-grouped, holding the KEKs in a partition dedicated to this workload — not shared with the CA, not shared with the privileged-access vault, so no other system’s credential can ever reach these keys.

Nothing exotic — deliberately so. The architecture’s job is to make the sensitive store useless without the hardware, keep the hardware behind its own role boundary, and leave an evidence trail at the join.

How software-managed keys fail the audit

A composite scenario, assembled from field patterns and community reports rather than any specific engagement. An organisation handling police-check-class data built its platform quickly and well, encryption included: AES everywhere, keys in a software keystore. Years later, facing an accreditation-style security assessment, the assessor asks the inevitable question — where is the key? The answer unravels over an afternoon: a keystore file on each application server, its passphrase in a config-management repository readable by the whole platform team, historical copies in every server backup since go-live, and — discovered during the assessment — a working copy on a former developer’s laptop image, because local environments had always used production-shaped config.

The finding wasn’t “encryption is weak”. The encryption was fine. The finding was that the organisation could not bound who had ever been able to obtain the key, could not attribute historical use of it, and could not truthfully claim destroyed data was unrecoverable while unknown key copies existed. Every one of those sentences is a key-custody failure, not a cryptography failure — and remediating it meant standing up hardware key storage, generating new KEKs inside it, re-wrapping every DEK in the estate, and rotating out data encrypted under keys whose history could not be established. Months of controlled change windows to buy back a property that generating the first KEK inside an HSM would have provided on day one.


Where this leaves you

You have the patterns — envelope encryption under hardware-held KEKs, keys at retention grain for real destruction, and a device-held evidence trail — and a reference shape to hang them on. The next problem is stubbornly concrete: in most estates the largest single concentration of this data is a SQL Server database, and SQL Server’s native answer, TDE with a certificate protector, keeps the key material on the same disk as the database it protects. Moving that protector into the HSM is exactly what the next chapter walks through, step by step, with EKM on a Luna HSM. The series so far lives at The Luna Field Guide.

// cryptographic hsm solutions
Running hardware you can’t afford to get wrong?

Securitribe designs, deploys and operates Thales Luna HSM estates — partitions, HA, key ceremonies and DR that stand up to audit.

Explore Cryptographic HSM SolutionsBook a strategy call →
// more insights

Keep reading