# Self-Sovereign identity for consented and content-Based access to medical records using Blockchain

Marie Tcholakian, Karolina Gorna, Maryline Laurent, Hella Kaffel Ben Ayed, Montassar Naghmouchi

► To cite this version:

Marie Tcholakian, Karolina Gorna, Maryline Laurent, Hella Kaffel Ben Ayed, Montassar Naghmouchi. Self-Sovereign identity for consented and content-Based access to medical records using Blockchain. Security and communication networks, 2023, 2023, pp.1-11. 10.1155/2023/6025789. hal-04100562

HAL Id: hal-04100562

https://hal.science/hal-04100562

Submitted on 17 May 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>
# Self-Sovereign Identity for Consented and Content-Based Access to Medical Records using Blockchain

Marie Tcholakian¹, Karolina Gorna¹, Maryline Laurent¹,*, Hella Kaffel Ben Ayed², and Montassar Naghmouchi¹

¹Samovar, Télécom SudParis, Institut Polytechnique de Paris, Palaiseau, 91120, France

²Faculty of Science of Tunis, University of Tunis El Manar, Tunis, Tunisia

*Corresponding author: Maryline Laurent, maryline.Laurent@telecom-sudparis.eu

## Abstract

Electronic Health Records (EHRs) and Medical Data are classified as personal data in every privacy law, meaning that any related service that includes processing such data must come with full security, confidentiality, privacy and accountability. Solutions for health data management, as in storing it, sharing and processing it, are emerging quickly and were significantly boosted by the Covid-19 pandemic that created a need to move things online. EHRs makes a crucial part of digital identity data, and the same digital identity trends – as in self sovereign identity powered by decentralized ledger technologies like Blockchain, are being researched or implemented in contexts managing digital interactions between health facilities, patients and health professionals. In this paper, we propose a blockchain-based solution enabling secure exchange of EHRs between different parties powered by a self-sovereign identity (SSI) wallet and decentralized identifiers. We also make use of a consortium IPFS network for off-chain storage and attribute-based encryption (ABE) to ensure data confidentiality and integrity. Through our solution, we grant users full control over their medical data, and enable them to securely share it in total confidentiality over secure communication channels between user wallets using encryption. We also use DIDs for better user privacy and limit any possible correlations or identification by using pairwise DIDs. Overall, combining this set of technologies guarantees secure exchange of EHRs, secure storage and management along with by-design features inherited from the technological stack.

**Keywords**— self-sovereign identity, Electronic Health Records, healthcare, wallet, blockchain, accountability, consent, Content-Based Access to Medical Records

## 1 Introduction

EHRs and health related data have always been of interest to hackers due to their personal private nature, and Covid-19 was a landmark around the world in terms of health data collection, leading to more and more serious attacks. For instance, HIPAA reports healthcare data breaches [1] in the US on medical records that were reported to the US HHS' Office for Civil Rights (OCR) in January 2022. They observed an increase by 38.9% of healthcare data breaches in January 2022 compared to January 2020. These breaches affect thousands of records and millions of patients. Most of these breaches
occur at the network servers of healthcare providers. Ransomware, phishing, and unauthorized access are the causes of healthcare data breaches in January 2022. According to the studied breaches and other resources [2], we can identify the following threats targeting health data : 1) Impersonation where the attacker pretends to be legitimate to gain access to medical data reference. This can compromise the confidentiality and integrity of data. This may also bring into question the liability of the healthcare professionals with respect to the access and authorizations of which they are the object, 2) Malicious code injection attack may result in modifying the stored data which compromises medical data integrity, and 3) Authentication and Identity-based attacks that are among the most dangerous attacks on patient data. These threats target the authentication process allowing malicious users to be authenticated and afterward to transmit fake data.

To prevent these threats, the following functional and non-functional security requirements are identified [2]:

* Data confidentiality and integrity as medical records are considered confidential and tamper-proofed throughout their whole life cycle I.e., generation, storage, transmission, and processing.

* Accountability and non-repudiation to prevent participating entities from denying previous commitments or actions related to data processing.

* Strong identification via unique, global and permanent identifiers that can enable strong and secure authentication with a high level of assurance (LoA).

* Access control to provide restricted access to the medical records according to the requester's authorizations.

Traditional centralized access control systems suffer from single points of failure as their centralized servers can be unreachable in case of attacks, or lack of connectivity. The traditional PKI-based authentication solutions are inefficient. The level of complexity of the certificate path processing in a healthcare PKI infrastructure is one factor that affects the efficient adoption of the PKI technology in healthcare networks. Furthermore, they do not support control by the users [3]. Decentralization is then required to overcome the disadvantages and limitations of the existing centralized cloud-based healthcare systems. Despite the efforts on access control mechanisms for medical data and auditability in the digital healthcare ecosystem, there are still many open issues to address for the development of robust and user-centric access control mechanisms [2].

New models and mechanisms of digital identification, authentication and access control are needed for a healthcare ecosystem that is decentralized by nature and made of multiple stakeholders and has high requirements in terms of compliance to regulations and reliability.

The Self-Sovereign Identity model, SSI, defines a new approach to create and manage digital decentralized identity via blockchain-based identifiers and verifiable claims. It is a user-centric model that comes with less dependency on identity providers by allowing the users to register themselves and obtain controllable identifiers called DIDs that can be linked to claims in the form of a Verifiable Credential issued by an issuer. These credentials are fully controlled by the users and they are verifiable via blockchain without relying on the issuer, moreover they come with different privacy aware methods like zero-knowledge proofs and selective disclosure. A digital movement that recognizes that individuals should own and control their digital identity without relying on a third party is built around the model and many communities are being established studying different possible use-cases with different ambitions that range from simple identity wallets to building a full decentralized identity layer for the internet. Some studies on SSI in the healthcare sector are emerging. However, to the best of our knowledge, they are limited to surveys and prospective studies.

This paper addresses the access management of health records during their life-cycle. We address the problems of patient consent and authorizing access to their data, as well as the accountability of healthcare professionals and institutions that were granted access to this data. The access to the medical records is strengthened through a content-based access control ensured with a two level encryption scheme: symmetric AES encryption for privately storing medical records into the Inter-Planetary File System (IPFS), and Attribute-Based Encryption (ABE) of AES keys where the access
policy is written into the ABE cipher-text. As such, the consent by the user for affording access to the medical staff is translated into the patient asking for modifying the ciphertext policy, and each given consent is logged into the blockchain. The proposed SSI architecture is scalable and relies on an ID wallet which is provided to each patient and medical staff. The wallet embeds the attributes of the patients, e.g. name, surname, social security ID, payment features, or of the doctor, e.g. name, surname, official license number, hospital patient ID, doctor's medical department... These attributes are endorsed by the national health authority or the hospital itself.

The remainder of this paper is organized as follows: Section 2 summarizes the literature review and the related works to our addressed problem. Section 3 gives the background helpful for understanding the concepts and technologies underlying our solution. Section 4 presents our proposed architecture as well as our reference scenario, and in Section 5 discusses our architecture. Finally in Section 6 gives conclusions of our work.

# 2 Related Work

SSI systems rely on DLTs and the most common ones are based on a public or consortium blockchain network. Blockchain comes with built-in features like permanent tamper-proof transactions, decentralization and shared governance, and can be used to ensure the integrity of data. Many pilot projects based on blockchain technology are underway in various domains where security, trust and reliability of transactions among various entities are required [4]. Healthcare is one of these domains. In healthcare, Blockchain is used for maintaining and exchanging medical records and for management of the medical supply chain [5]. In [5], an illustrative healthcare Blockchain ecosystem architecture is presented. The question regarding the storage of medical information either “On-chain” or “Off-chain” is discussed considering the security, the availability and the performance features. Smart contracts are proposed as a mechanism to enforce a standardized data submission for blockchain transactions, enabling blockchain to act as an interoperable transaction layer for nationwide health systems either by storing on-chain publicly accessible data or by storing pointers for off-chain privately stored data on a given database. Various applications of Blockchain in healthcare are emphasized in [4]: 1) Health data exchange in a secure and reliable manner, 2) Sharing EHR for research purposes while maintaining subject/patient anonymity, 3) EHR interoperability for cooperation between various entities, 4) Efficient health insurance claim processing, and 5) Efficient and reliable drug and medical equipment supply. The paper [6] is a comprehensive systematic survey on the use of Blockchain technology and SSI in healthcare. The survey shows that Blockchain is a suitable alternative for EHR management. It facilitates users’ access to their health records. Although using Blockchain to manage health data can prevent data tampering, it cannot address entirely the privacy issues [4][3]. Furthermore, more mechanisms are required to empower patients by giving them full control over their EHR using SSI systems. [3] identifies the following requirements for the adoption of SSI in the field of healthcare: trust (integrity and control), transparency (no secret transmission of knowledge), ease of use, key recovery, security (only authorized access), access (maintenance, correction, and auditability), compliance with regulation, efficiency (no redundancy) and patient awareness (consensual private data sharing). The authors discuss the factors of SSI-based healthcare from the perspective of the stakeholders’ needs.

# 3 Background

## 3.1 Self-Sovereign Identity (SSI)

SSI concepts and principles evolved through multiple identity workshops and papers, starting from the paper “laws of identity” by Kim Cameron in 2005 to the blog post of Christopher Allen [7] in 2016 that coined the term SSI and set 10 principles for an SSI system. Supported by the Web of Trust Community [8], these principles are:
* **Existence:** Users must have an independent autonomous existence.

* **Control:** Users must control their identities.

* **Access:** Users must have access to their own data.

* **Transparency:** Systems and algorithms must be transparent.

* **Persistence:** Identities must be long-lived.

* **Portability:** Information and services about identity must be transportable.

* **Interoperability:** Identities should be as widely usable as possible.

* **Consent:** Users must agree to the use of their identity.

* **Minimization:** Disclosure of claims must be minimized.

* **Protection:** The rights of users must be protected.

SSI model, depicted in Figure 1, leverages user autonomy by eliminating registration authorities, and gives users full control over their identifiers and authentication material. Moreover, SSI eliminates the role of Identity Providers that are very influential in other identity models like the federated model and the user centric model [9].

<figure><img src="image_2.png" /><figcaption>Figure 1: Self-Sovereign Identity model, based on a decentralized ledger</figcaption></figure>

Beyond that, SSI enables to certify the authenticity of identities and personal identifiable information (known as attributes, e.g. date of birth, citizenship or university degrees) to service providers as some authorities are assumed to endorse identities and subset of attributes to users under the form of verifiable claims. Identities, attributes and verifiable claims are kept in a safe place within the digital wallet of their owner. An ID wallet holder can use his digital wallet, to authenticate or prove some attribute ownership with the credentials he has been issued by ID authorities, e.g. national health authority for social security number, prefecture for national ID and driving license. The holder is identified in the whole system using a global Decentralized Identifier, like the W3C DID standard.

## 3.2 Decentralized Identifiers: DID standard

Decentralized Identifiers, DID as an acronym, is a W3C standard that defines identifiers that satisfy the ten requirements for SSI systems. DIDs are decentralized, meaning that no centralized authorities are needed even for the registration, giving users full autonomy in registering and using their identifiers. Moreover, a DID is unique and permanent and directly controllable by its owner or controller, since DID standard supports delegation. Using public key cryptography, a DID is linked to a public key, meaning that the DID controller can cryptographically prove that they control the
DID, allowing for authentication and more importantly: linking the DID to a set of claims in the form of a Verifiable Credential. This means that DID are the core component of SSI systems that are based on the exchange of Credentials and enabled by a public or consortium DLT. Figure 2 depicts the relationship between a DID and private and public keys. Apart from that, a DID is discoverable and

<figure><img src="image_3.png" /><figcaption>Figure 2: Relationships between DID, Public keys and private keys [11]</figcaption></figure>

resolvable, meaning that we can reach out to the owner or controller for different interactions. DIDs are also used to create secure communication channels after mutual authentication and can be suited for private use by introducing pairwise DIDs that are used between two and only two parties, unlike anywise DIDs that are global and public and generally published on the ledger. A pairwise DID, or any other N-wise DID, is only resolvable by the designated entities, unlike anywise DIDs that are publicly resolvable [10].

These capacities make DIDs a very powerful standard that can empower true SSI platforms.

## 3.3 Attribute-Based Encryption

Attribute-Based Encryption (ABE) is an asymmetric encryption algorithm in which the secret key of a user and the ciphertext are relying on attributes. The users are characterized with a set of attributes, e.g. country of residence, a profession... For each of them, the users are assigned a secret which can be used to prove the validity of the related attributes. Decryption of ciphertext is only possible if there is a match between the attributes owned by the user and the attributes considered for the ciphertext. This ABE scheme builds on an authority which is in charge of generating users' secrets from its master key. Four algorithms are needed to satisfy the ABE scheme:

1. **Set up** takes as inputs a security parameter and a set of attributes $\Omega$ and outputs a master key $msk$ and some public parameters, e.g. a public key $pk$.

2. **Key generation** which, given a set of attributes $A$ and the master key $msk$, generates a set of related secret keys $sk_A$.

3. **Encryption** which, given a message $M$, the public key $pk$ and a policy $\phi$ (e.g. a Boolean formula) produces a ciphertext $C_{\phi}$.

4. **Decryption** which, from a secret key $sk_A$ and an encrypted message $C_{\phi}$, outputs either the message $M$ if $\phi(A)$ satisfies the policy $\phi$ or an error.

**Ciphertext-policy attribute based encryption (CP-ABE)**, as depicted in Figure 3, consists in defining an access policy in the message itself. A user can decrypt a message if the attributes associated with his attributes satisfies the access policy embedded within the ciphertext. For example,
if the whole set of attributes is defined as $\Omega = A, B, C, D$, a message is encrypted with the policy
$\phi = (A \land B) \lor D$, a user provided with the attribute $D$ and its related secret can decrypt the message,
whereas a user with the attributes $A, B$ cannot [12].

<figure><img src="image_4.png" /><figcaption>Figure 3: Ciphertext-policy Attribute-Based Encryption scheme [12]</figcaption></figure>

In addition, we assume there is an existing ABE reencryption scheme for enabling a semi-trusted
proxy to transform a ciphertext under an access policy $C_A$ to another ciphertext corresponding the
same plaintext, but under another access policy $C_B$, as depicted in Figure 4. The objective is that the
proxy performs the reencryption operation blindly. That is, the proxy is not provided with attributes
satisfying the policy of the ciphertext, and thus gets no information about the plaintext sent by Alice.
Only entities satisfying $C_B$ like Bob can decrypt the ciphertext. Any scheme, like the Ciphertext-
Policy Attribute-Based Proxy Re-Encryption (CP-ABPRE) proposed in [13], can be integrated in our
contribution. Attribute-Based Encryption is a recent mechanism and is not yet widely used, but many
applications of it are possible in particular to broadcast a symmetric key.

# 4 Our Security Architecture Combining SSI, IPFS and ABE

In this section, we present our proposal. We propose a SSI infrastructure to manage the identity
and access of involved entities to EHR. We encrypt EHR on two-levels using ABE and we store the
encrypted records and cryptographic key material on IPFS.

A concrete reference scenario is first introduced for illustrating the architecture in a healthcare
context, followed by the technical design with the full interactions between the patient, the hospital,
the doctor, the IPFS and the blockchain.

We assume for our architecture that health institutions act as issuers for both doctors and patients.
Health professionals (doctors, therapists ..) will have verifiable credentials issued to them by their
<figure><img src="image_5.png" /><figcaption>Figure 4: Ciphertext-policy Attribute-Based Proxy Re-Encryption [14]</figcaption></figure>

institutions and the supervising authorities and bodies. As for patients, verifiable credentials attesting to their identity can be obtained from the competent authorities and other credentials attesting to their attributes can be obtained from different health authorities and institutions. These attributes along with ABE secret keys will be later used for ABE decryption (cf. Section 3.2).

Verifiable credentials and ABE secret keys are stored on users wallets.

## 4.1 The Reference Scenario

We describe the following healthcare scenario, depicted in Figure 5. A patient arrives at a hospital or a healthcare institution, they perform a mutual authentication with the facility's servers where verifiable credentials are presented from patient's wallet. After successfully authenticating the patient's identity, the medical appointment can take place. EHR of the patient is edited after the appointment and is securely stored on the IPFS. Patients can consult their records and consent to grant authorization to access these records to the medical staff.

## 4.2 Solution Design

This subsection describes the underlying interactions between entities, for establishing a secure communication channel between two blockchain agents (patient and hospital, but also doctor and hospital) (cf. Section 4.2.1), for secure interactions and exchange of credentials, cryptographic material and EHR storage (cf. Section 4.2.2), for patients to modify access rights to their records (cf. Section 4.2.3), for letting an authorized doctor retrieve a patient's record (cf. Section 4.2.4), and for enabling emergency access to records in case the patient is physically or mentally unable to give their consent (cf. Section 4.2.5). Section 4.2.6 is a full-picture summary of this subsection.

### 4.2.1 Establishing a mutually authenticated channel between the hospital and the patient

The two actors in this interaction, both patient and hospital, both have general DIDs and verified credentials attesting to their identities and natures, as we have supposed in the beginning of this section. Through their agents, the hospital and the patient mutually authenticate themselves by exchanging
<figure><img src="image_6.png" /><figcaption>Figure 5: The reference scenario</figcaption></figure>

credentials. After this mutual authentication, they create pair-wise DIDs special for this relationship,
establishing a private secure channel.

Figure 6 describes this channel creation.

<figure><img src="image_7.png" /><figcaption>Figure 6: Establishing a mutually authenticated channel between the patient and the hospital
by creating pair-wise DIDs for this specific relationship</figcaption></figure>

More precisely, when the patient first arrives to the hospital, they undergo an initial authentication
process, as explained in Figure 7. The patient's agent sends an URL invitation with their global DID
to the hospital's agent along with any other verifiable credentials attesting to their identity. The
hospital agent verifies the DID and associated credentials by referring to the blockchain Ledger. The
patient does the same to achieve mutual authentication. Then the hospital generates a new pair-wise
DID2 H specific to this particular patient, which is sent to the patient and stored in the hospital's
wallet. Similarly, the patient generates a new DID2 P specific to this communication channel with the
hospital, which they send to the hospital and store on their wallet. The two agents have two pairwise
DIDs for their own communication. Finally, as a last step, the hospital issues an admission credential
for the patient which is stored on their wallet.
<figure><img src="image_8.png" /><figcaption>Figure 7: Establishing a secure mutually authenticated channel between the patient and the hospital</figcaption></figure>

### 4.2.2 Storing the Newly Issued Medical Record

The newly created EH record undergoes the various stages depicted in Figure 8. First, the record is hashed using the SHA-256 hash function. It is then truncated to the first 128 bits, which serve as the key for the symmetric AES encryption [15] of the record. Then, the encrypted record is stored in the IPFS storage capacity [16] and its hash value, known as the Content Identifier (CI), is added to the blockchain with the patient's DID. In the same way as for the secure storage record, after the AES key is encrypted with the asymmetric ABE algorithm (cf. Section 3.2), the encrypted AES key is stored in the IPFS and its hash value is added to the blockchain with the hash of the encrypted document. The patient is informed about the CID of the newly stored record.

### 4.2.3 Modifying the ABE Access Policy to Authorize Access to the EHR

After a medical consultation, the EHR of a patient needs to be modified by a doctor, which means the patient have to consent to give access to their EHR to the doctor. The hospital agent is requested to perform the elementary loop depicted in Figure 9. As a first step, the agent has to recover the ABE encrypted AES key by first retrieving the hash of the encrypted AES key from the blockchain thanks to the CID of the record, and then by getting the encrypted AES key value from the IPFS.

The resulting AES key is still encrypted with ABE. The hospital agent does not have the right attributes to decrypt the key and can only re-encrypt the AES key under a new policy including the newly considered attributes, by using the ABE re-encryption algorithm with the ABE re-encryption key provided by the patient (Section 3.2).

As such, doctors satisfying the new policy related to the medical record can access to the record. The agent then has to update the resulting encrypted AES key into the system by writing its new hash value to the blockchain along with the same CID and the newly encrypted AES key into the
<figure><img src="image_9.png" /><figcaption>Figure 8: Encryption and storage of a newly issued Electronic Health Record or medical data</figcaption></figure>

IPFS. Note that multiple occurrences of the CID into the blockchain refers to the successive policy modification consented by the patient with regard to his CID record.

<figure><img src="image_10.png" /><figcaption>Figure 9: Elementary loop</figcaption></figure>
4.2.4 Access to the EHR by healthcare professionals

As soon as a health care professional is granted access to the patient’s EHR CID, they need to get the hash of the encrypted AES key from the blockchain using the CID value. They should also be able to retrieve the encrypted AES key value from the IPFS. A health care professional is able to decrypt the AES key, as their ABE attributes (stored within their wallet) satisfy the ABE access policy associated with the encrypted AES key (cf. Section 3.2), thanks to the ABE policy which has been modified by the patient (cf. Section 4.2.3) to enable them to decrypt the AES key. After decrypting the AES key, they can retrieve from IPFS the full encrypted CID medical record, and then can decrypt it with the AES key. Note that a health care professional who does not belong to the same service, I.e. his attributes do not satisfy the ABE policy, won’t be able to decrypt the AES key and so won’t have access to the EHR.

4.2.5 Accountable Emergency Procedure

In case a patient is unconscious and is not able to give their consent to authorize a health care
professional to access their EHR, an emergency procedure can be used by the health care professionals.
Through an authenticated channel (cf. Section 4.2.1), the health care professional requests the Hospital
Emergency Server (a blockchain agent as well), to modify the policy for letting them access to the
patient's EHR CID. The resulting emergency loop is different from the elementary loop of Section
4.2.3 as the hospital emergency server provided with attributes satisfies any ABE policy associated to
any record. It is thus able to fully decrypt the AES key, and to encrypt that AES key with the same
policy increased with the attribute(s) owned by the requesting health care professional.

The server then has to report to the blockchain the emergency procedure over the CID record
requested by a requesting health care professional’s DID. In case of a later auditing procedure, it will
be possible to evaluate whether that emergency record access was abusive or legitimate.

Figure 10 depicts an emergency loop where a doctor requests access to the EHR of a patient incapable of giving their consent. The emergency server of the hospital performs an accountable procedure to grant access without consent of the patient however this access has to be later justified.

4.2.6 The Full Picture of the Interactions between Patients and Medical Entities

As depicted in Figure 11, at their arrival to the hospital, the patient retrieves an official ID credential
from their wallet and present it to the hospital as part of the mutual authentication process between
the two agents. Upon establishing a mutually authenticated channel and creating a pairwise DID for
this instance, an admission credential bound to the pairwise DID is issued by the hospital and sent to
the patient who stores it in their wallet (cf. Section 4.2.1). The admission credential is used to grant
access to the hospital spaces needed to complete the patient’s visit purpose.

Following the patient’s treatment, a medical record is created (X-Ray results, blood test results, analysis ..). The hospital performs the elementary loop (cf. Figure 9) to grant the record access to the patient. The hospital also suggests to the patient a list of doctors or health care professional that access might interest them or is needed for the patients treatment. A doctor or a health care professional needing access to a medical record makes a request to the hospital agent that later relays it to the patient’s agent. We assume that a mutually authenticated channel is similarly established between the doctor’s agent and the hospital’s agent.

When a patient grants access to a doctor upon receiving an access request from the hospital agent, the elementary loop is performed again to add the ABE attributes of the doctor to the access policy (procedure described in section 4.2.3). Subsequently, if the patient wishes to remove the access rights from a doctor, they make a request to the hospital agent that restarts the elementary loop and withdraws the doctor’s attributes.
<figure><img src="image_11.png" /><figcaption>Figure 10: Emergency loop</figcaption></figure>

<figure><img src="image_12.png" /><figcaption>Figure 11: Patient interactions with medical entities</figcaption></figure>

## 5 Analyzing the proposed Architecture

Our proposed architecture has three important pillars: SSI as an identity model, Blockchain and IPFS as infrastructure and hybrid AES and ABE encryption as an access policy that ensures data
privacy and confidentiality.

## 5.1 SSI as an identity model

The SSI model is suitable for healthcare use-cases since it is reasonable to give a patient full control over their identity and related data (EHR) in a context that allows for a portable identity and health data. This enables the patient to choose their healthcare providers and manage their EHR with a consented secure way. Moreover, the SSI model allows for portable identifiers and identities, meaning that it is indeed interoperable and very scalable since SSI relies on a decentralized ledger and that the DID standard is ledger agnostic and globally unique. These specifities mean that our architecture can work with any blockchain platform and that even when different healthcare networks choose different platforms, patients would still be able to move between these networks and move their data along with them.

On the downside, SSI requires secure user wallets and well designed blockchain agents. This sets higher standards and technological constraints on any SSI proposal since they are as good and strong as their wallet component. Moreover, user-awareness is needed to ensure that users can give their consent and manage their EHR data properly.

## 5.2 Blockchain and IPFS as infrastructure

Blockchain and IPFS are two decentralized infrastructure technologies. Blockchain provides a decentralized public ledger to register DID identifiers and hashes of issued credentials, all along with access transactions like in the case of emergency access procedure described in Section 4.2.5. Blockchain provides integrity and a permanent history that ensures accountability for any access to EHR data on the IPFS.

On the other hand, IPFS provides a decentralized storage platform for EHR data. IPFS overcomes the storage shortages of blockchain networks while maintaining the decentralization and public nature – meaning not owned and controlled by a single entity – all the same. Privacy however is not a built-in feature in IPFS systems since it is public and data is stored across scattered computers on the network. Meaning that privacy is a requirement that is added via anonymization of data and cryptography to encrypt the stored data. IPFS follows a content based file system, meaning that searching for data on IPFS includes requesting content from the network, receiving a response from nodes showing different versions of the requested content. This content is encrypted and possibly signed digitally, and the hashing ensures its integrity (IPFS is based on DHT).

Relying on a blockchain and IPFS ensures mitigation against Denial of Service (DoS) due to their decentralized nature and the distributed architecture of the infrastructure. However, decentralization comes at the cost of performance and throughput of the services since it takes longer to read and write data on such infrastructure, combined with an overhead of cryptography and hash functions used on both the blockchain and IPFS.

## 5.3 Hybrid AES and ABE encryption for access control

Encryption is more of a requirement than a luxury in our proposal. Storing data on IPFS, as specified in Section 5.2, we need encryption to ensure data privacy on a public or a consortium storage network. However, this encryption is also used for access control, and more specifically, since IPFS is a content based file system, we use ABE encryption for a content-based access control. We propose an AES and ABE hybrid encryption for our architecture, this means that a modified policy will only require the AES key to be ABE encrypted, making it more efficient.

ABE in our proposal provides a content-based access control, ensure mitigation against medical records leakage and unauthorized access. Granting access and revoking it is described in Section 4.2.3, however, one must be aware that a healthcare professional which access is removed is still able to decrypt a medical record previously stored on their hard drive.
# 6 Conclusions

Managing medical data and EHR is an important factor for the success of any digital health application and services. The design of new architectures capable of resisting newer types of attacks is essential for the adoption of digital health services.

Moreover, these architectures should be based on secure infrastructures that can guarantee data integrity and non-repudiation. As medical data and EHR are private and personal data, these architectures should take into account the privacy of the data and grant full control over it to the data subjects: the patients.

In this paper, we have proposed a self-sovereign healthcare architecture with an original fully distributed content-based access control. It combines several concepts and technologies that fit well with the spirit of the decentralized solution: blockchain, self-sovereign identity (SSI), hybrid encryption including attribute-based encryption and distributed storage system.

This architecture, once deployed with a smooth enrollment procedure, has the advantage of being scalable throughout hospitals and any medical institutions, with strengthened security thanks to high resistance against denial of service attacks and data leakage by using encryption and making use of the high availability and decentralization of blockchain technology.

# acknowledgements

Special thanks to Arthur Jovart for his technical support and for the chair BOPA (BOPA for augmented operating room) jointly mounted between Institut Mines-Telecom and AP-HP public hospitals of Paris for fruitful discussions.

# References

[1] Hipaa Healthcare Data Breach Report; 2022. [Online; accessed May 2022]. https://www.hipaajournal.com/january-2022-healthcare-data-breach-report/.

[2] Papaioannou, Maria Karageorgou, Marina Mantas, Georgios Sucas, Victor Essop, Ismael Rodriguez, Jonathan Lymberopoulos, Dimitrios. (2022). A Survey on Security Threats and Countermeasures in Internet of Medical Things (IoMT). Transactions on Emerging Telecommunications Technologies. 33. 10.1002/ett.4049.

[3] Mohammed Shuaib, Shadab Alam, Mohammad Shabbir Alam, Mohammad Shahnawaz Nasir, Self-sovereign identity for healthcare using blockchain, Materials Today: Proceedings, 2021, ISSN 2214-7853, https://doi.org/10.1016/j.matpr.2021.03.083.

[4] Shadab Alam, Mohammed Shuaib, Wazir Zada Khan, Sahil Garg, Georges Kadoum, M. Shamim Hossain, Yousaf Bin Zikria, Blockchain-based Initiatives: Current state and challenges, Computer Networks, Volume 198, 2021, 108395, ISSN 1389-1286, https://doi.org/10.1016/j.comnet.2021.108395.

[5] Krawiec, R. et al. Blockchain: opportunities for health care; 2016. [Online; accessed May 2022] https://www.colleaga.org/sites/default/files/4-37-hhs_blockchain_challenge_deloitte_consulting_llp.pdf.

[6] Siqueira, Alexandre da Conceição, Arlindo Rocha, Vladimir. (2021). Blockchains and Self-Sovereign Identities Applied to Healthcare Solutions: A Systematic Review.

[7] The Path to Self-Sovereign Identity. [Online; accessed May 2022]. http://www.lifewithalacrity.com/2016/04/the-path-to-self-sovereign-identity.html.

[8] The Web of Trust Github. Online; accessed May 2022]. https://github.com/WebOfTrustInfo/self-sovereign-identity.
[9] Digital identity management, (Ed. M. Laurent, S. Bouzefrane), collection ISTE Press, ISBN: 9781785480041, March 2015, (266 p.).

[10] Pairwise DIDs. [Online; accessed September 2022] https://identity.foundation/peer-did-method-spec/.

[11] SSI meetups, webinar presentation by Drummond Reed and Markus Sabadello (2020). [Online; accessed September 2022]. https://ssimeetup.org/decentralized-identifiers-dids-fundame ntals-identitybook-info-drummond-reed-markus-sabadello-webinar-46/.

[12] Mogos G. Ciphertext-Policy Attribute-Based Encryption using Quantum Multilevel Secret Sharing Scheme. Journal of Computer Science 2018.

[13] K. Liang, L. Fang, W. Susilo and D. S. Wong. A Ciphertext-Policy Attribute-Based Proxy Re-encryption with Chosen-Ciphertext Security. 2013 5th International Conference on Intelligent Networking and Collaborative Systems, Xi'an, China, 2013, pp. 552-559, doi: 10.1109/INCoS.2013.103.

[14] Assessment report on cryptographic technologies, protocols and mechanisms; 2022. [Online; accessed May 2022]. https://ec.europa.eu/research/participants/documents/downloadPublic? documentIds=080166e5b1649a9f&appId=PPGMS.

[15] Daemen J, Rijmen V, AES Proposal: Rijndael. [Online; accessed May 2022]. https://www.cs.m iami.edu/home/burt/learning/Csc688.012/rijndael/rijndael_doc_V2.pdf.

[16] IPFS Documentation. [Online; accessed May 2022]. https://docs.ipfs.io/.