HSCP-R-019 · recipe · Security
Keep the inventory of encryption and keys, and compare it with the need of each piece of data
Written entry, version 0.2, checked on 2026-12-04.
At a glance
| Implements | HSCP-G-042 Scale encryption to the security need : Choose an encryption level and scope proportionate to the security need, facet “cryptographic inventory and review of gaps” |
|---|---|
| Case | Instantiates: applies an existing practice to a context. |
| Context | health software that stores and exchanges health data, often for several clients (facilities, practices), on an infrastructure it operates or entrusts to a hosting provider |
| Surfaces |
|
| Verification | review |
Scope: The recipe links each use of encryption to the need of the protected data and locates the keys. It does not choose algorithms in place of cryptography guides, and qualifies neither a hosting service nor a product against a certification.
Practices covered (1)
| Practice | What the tool checks | What remains for a human |
|---|---|---|
| HSCP-G-001 Manage the data lifecycle soberly | for each client, the list of its keys and of the places where each is held, which serves as proof of erasure by key destruction | check that the map is complete, and decide whether a restore test is needed |
When
The team can say that "everything is encrypted", but not what, with which key or where that key is held. A buyer asks how its patients' data is protected, a client leaves and expects proof that its data is no longer readable, an algorithm ages and the team needs to know where it is used. The inventory is drawn up before a production release, when a piece of data, a storage or a third party is added, and at each version.
How
- Classify data by security need. Three or four classes are enough, for example: health data linked to a patient, pseudonymised data, operating data (logs, metrics), public data. For each class, write down the expected encryption per layer: transit to the outside, transit between services, storage (database, files, backups), application-level encryption of a field or a document, and who holds the key. Also write down until when the data must remain confidential: this is what tells whether a future decryption of today's exchanges is a risk.
- Survey what exists. The exposed endpoints and their encryption configuration (protocol, key exchange, cipher suites, certificate and its expiry), surveyed with a configuration testing tool. The connections the product itself opens to third parties: hosting provider, national services, AI model through an API, remote MCP server, each with the library that carries it and what the other end accepts. The cryptography libraries, taken from the component inventory (HSCP-R-010). The encryption, hashing and signing calls in the code. The keys declared in the key manager and in the configuration.
- Keep the inventory, one line per use of encryption (model below). The line names the key by its identifier, never by its value, and gives every place where it is held: key manager, escrow, replicas, test environments, administration workstations.
- One key per client when the product serves several, for health data at rest. This makes it possible to render a single client's data unreadable, backups included, by destroying its keys (HSCP-R-008). The inventory then links each key to its client.
- Compare the need with what exists, in both directions. Missing or weak encryption is a gap to fix. Encryption without need is one too: encrypting the same data twice without gain, encrypting public data, encrypting operating metrics at the highest level. Each gap receives a dated decision: fix, accept with its reason, or remove.
- Write the migration plan for the algorithms and key sizes that are ageing, including the move to post-quantum cryptography. The inventory says where each algorithm is used and until when each piece of data must remain confidential; the order of migration and its verification are in HSCP-R-040.
- Review the inventory at each version, at each new piece of data, new storage or new third party, and at each key rotation or destruction.
Data model
| Field | Content |
|---|---|
donnee |
the protected data and its class |
couche |
external transit, internal transit, storage, backup, application level |
sens |
for transit: incoming (the product receives the connection) or outgoing (the product opens it to a third party) |
mecanisme |
protocol or algorithm, key exchange, key size, library and version |
cle |
identifier of the key (never its value), attached client if there is one |
emplacements_cle |
key manager, escrow, replicas, environments, workstations |
acces |
who or which service can use the key |
rotation |
last rotation, due date, destruction date where applicable |
confidentialite_jusqu_a |
year until which the data must remain confidential, taken from its class |
besoin |
encryption expected for the data class |
ecart |
none, missing, weakness, excess |
decision |
fix, accept (with the reason), remove, and its date |
Examples
Fictitious example of an inventory:
| Data | Layer | Mechanism | Key | Gap | Decision |
|---|---|---|---|---|---|
| Reports, linked to the patient | storage | volume encryption | key shared by the service | missing: no key per client | move to one key per client before the next end of contract |
| Reports, linked to the patient | backup | backup tool encryption | single key of the tool | missing: destroying a client key is not enough there | encrypt the backup per client, or purge row by row |
| Operating metrics | storage | application-level encryption on top of the volume | dedicated key | excess: double encryption of non-sensitive data | remove application-level encryption |
| Browser calls | external transit, incoming | recent secure protocol, hybrid exchange | public certificate | none | nothing to do |
| Record extracts sent to the AI model | external transit, outgoing | recent secure protocol, classical exchange | provider side | weakness: confidentiality beyond 2030, exchange not hybrid | ask the provider for a date |
Verification
- Review at each version: each use of encryption has its line, each line has a data class and a decision, no line contains a key value.
- Automated check: a configuration testing tool surveys, for each exposed endpoint and each outgoing connection, the protocol, the key exchange, the cipher suites and the certificate expiry, and the survey is compared with the inventory. An endpoint or a connection missing from the inventory, or whose configuration differs, is a gap.
- Review of keys: the key manager's list is compared with the inventory, and for a product that serves several clients, each health data key has a client.
Evidence produced
The data classification with the expected encryption and the confidentiality period per class, the dated inventory, the survey of exposed endpoints and outgoing connections compared with the inventory, the report of the review of gaps with its decisions.
Evidence items
Each item attests the recipe at a given date. Frequency given for a product in service.
- Written rule Classification of data by security need, with the expected encryption and the confidentiality period for each class and each layer
- Inventory Inventory of encryption: data, layer, direction of the connection, algorithm, key, places where the key is held, access, rotation
- Survey Survey of the encryption configuration of exposed endpoints and outgoing connections, compared with the inventory
- Written record Dated review of the gaps between need and what exists, with the decision taken for each
Own mappings
In addition to those of the practices:
| Identifier | What the recipe adds |
|---|---|
owasp_asvs_5.0.0/V11.1.2 |
an inventory that says, for each key, where it can be used and which data it protects |
owasp_asvs_5.0.0/V11.1.3 |
a survey of what exists, from the configuration, the components and the code |
owasp_asvs_5.0.0/V11.1.4 |
a migration plan for algorithms, post-quantum included, based on how long each piece of data must remain confidential |
rgesn_2024/1.7 |
an encryption level written down per data class, and the review of excesses |
gsf_patterns_v2.0.0/requirements/encrypt-what-is-necessary.md |
encryption decided according to the sensitivity of the data |
secnumcloud_v3.2/10.1.a |
at least one key per client for stored data |
reglement_exec_2024_2690/annexe1-p146 |
measures derived from the classification, and key management that covers destruction and logging |
Versions
| Version | Status | Date |
|---|---|---|
| 0.2 | Draft | 2026-12-04 |
| 0.1 | Draft | 2026-12-01 |
How to cite: “Health Software Common Practices”, HSCP-R-019, version 0.2, https://healthtechpractices.org/en/recettes/hscp-r-019/, under the CC BY-NC-SA 4.0 licence. Licence