All posts

Encryption Keys and Data Sovereignty: Why Key Location Matters

By Fola Oladipupo, Techera · · 4 min read

Share

Here's a scenario that catches organisations out. You move your payment database to a data centre in Lagos. The disks are encrypted. The data is in Nigeria. Job done?

Not quite. Encryption only protects data from people who don't have the key. If the key is managed by a service abroad, or by a provider who can use it without your involvement, then control over your data hasn't fully come home.

This is why key management belongs in every data residency conversation.

Why do encryption keys matter for data residency?

Encrypted data is unreadable without its key. That makes the key the real control point:

  • Whoever holds the key can read the data, wherever the data is stored.
  • Whoever can delete or disable the key can make the data unreadable, for everyone.
  • Where the key is held determines which country's laws and which organisation's staff can reach it.

So "where is our data?" has a companion question: where are our keys, and who controls them?

What are the main options for managing keys?

Provider-managed keys

The cloud or hosting provider creates, stores and rotates keys for you. It's the default for most services and the easiest to run.

Trade-off: you depend on the provider's controls, and you may not know exactly where keys are held or who can use them. For sensitive data under localisation rules, check carefully.

Customer-managed keys in a cloud KMS

You create and control keys in the provider's key management service (KMS), decide who can use them, and can disable or rotate them yourself. Usage is logged.

Trade-off: much more control, but keys still live in the provider's infrastructure. Check that the KMS is in the same Nigerian region as the data.

Bring your own key (BYOK)

You generate keys yourself, often in your own hardware, and import them into the provider's KMS.

Trade-off: you control where keys are created and keep a copy, but once imported, the provider's service still uses them.

Hold your own key (HYOK) or external key management

Keys stay in a system you run, such as your own hardware security module (HSM) or an external key manager, and the cloud service has to ask for them each time.

Trade-off: the strongest control, but more complex and costly to run, and if your key service goes down, so do the systems that depend on it.

Hardware security modules (HSMs)

HSMs are tamper-resistant devices designed to generate and protect keys. Payment systems already use them widely, for PIN processing for example. They can be on-premises, in a colocation facility or offered as a service.

Trade-off: high assurance, but they need specialist skills, careful high-availability design and a budget.

How do you choose?

Match the control to the sensitivity of the data:

Data Reasonable starting point
Payment transaction data, card data, core customer data Customer-managed keys in Nigeria, or HSM-backed keys you control
Other personal data Customer-managed keys in the same region as the data
Low-sensitivity data Provider-managed keys may be acceptable

Whatever you choose, record it: which data sets use which keys, where those keys are held, and who can use them.

What are the common mistakes?

  • Keys in a different region from the data. The data moves to Nigeria; the KMS key stays in Europe.
  • Secrets in code and config. Database passwords and API keys in source code or plain configuration files. Use a secrets manager such as HashiCorp Vault or your platform's equivalent.
  • No rotation. Keys that have never been rotated, and no tested process to do it.
  • Unlogged key use. No record of who used which key, when.
  • No recovery plan. Losing a key means losing the data. Back up keys securely, and test recovery.
  • Forgetting backups. Backups need encrypting too, with keys you control, and the backup keys must be recoverable when the primary system isn't.

What does good look like?

  • Every in-scope data store encrypted at rest, every connection encrypted in transit
  • Keys for sensitive data created and held under your control, in Nigeria where required
  • Access to keys limited, protected with multi-factor authentication, and logged
  • Rotation scheduled and tested
  • Secrets in a secrets manager, not in code
  • A documented, tested key recovery process

This article is general guidance, not legal advice. Confirm your obligations with your counsel and Data Protection Officer.

Frequently asked questions

If our data is encrypted, does it matter where it's stored?

Yes. Data localisation rules focus on where data is stored and managed, and encryption doesn't change that. Encryption adds protection, but its value depends on who controls the keys.

What's the difference between a KMS and an HSM?

A key management service (KMS) is software for creating, storing and controlling keys, usually offered by a cloud provider. A hardware security module (HSM) is a tamper-resistant device that protects keys in hardware. Many cloud KMS products are backed by HSMs.

Do we need our own HSM to comply with data localisation?

Not necessarily. Many organisations use customer-managed keys in a cloud KMS located in Nigeria. Your own HSM offers more control and is common in payment processing, but it costs more and needs specialist skills.

What is bring your own key (BYOK)?

BYOK means you generate encryption keys yourself and import them into your cloud provider's key management service. You control how keys are created and keep a copy, while the provider's services use the keys to encrypt your data.

How do we check our encryption and key controls?

Techera's free Data Residency Readiness Check includes questions on encryption and key control alongside location, flows and resilience. It takes about five minutes.

Found this useful? Share it

Was this article helpful?

Your answer helps us decide what to write next.

How ready is your data?

Free Techera Readiness Check · 16 questions · Instant score and your top gaps

Check your readiness

Keep reading