--- title: Credential Backup Solutions --- # Credential Backup Solution 1 ## Cloning DNA Pattern **Short Description:** Alice clones a new Credential-Backup DNA with a unique network-id and save all her encrypted credential-data into it.(Creating a new network) And then asks her closed friends to install this new DNA. In the future she can re-join the Backedup DNA to recover her data. ![](https://i.imgur.com/XJVyllp.png =x750) ### Steps * hApp contains 2 DNAs. * **SSI-DNA** is the main DNA that contains all the credential-data and all hApp users are part of it. * **SSIBackup-DNA** which is the backup DNA for one user credentails. and up and run with close friends of an agent. * Alice creates a **Close Friend List** on the SSI-DNA. * Alice wants to backup data: * Alice should provide **12words** as secret-key of her backup.She should write these phrase on the paper and save it in the safe place.(like Metamask or any other Wallet). * Alice clone a new **SSIBackup-DNA** with the **network-id** which is the **Hash(12words)**. * Alice encrypt her credential-data with a **symetic-algorithm** using her **12words secret-keys**, and save them into **SSIBackup-DNA**. * Alice send message to her **close friends** to **install** SSIBackup-DNA with her **network-id**. * Alice's friends install a SSIBackup-DNA. And it is now live. * Alice want to restore data. * Alice join the **SSI-DNA** again with new AgentId. * Alice use her **12words** to re-generate the **network-id** * Alice install **SSIBackup-DNA** with her **network-id**. Actually she re-joins to her backup-data dna which is live by her friends. * Alice query the data from **SSIBackup-DNA** * Alice decrypt data with asymetric algorithm using **12words** secret-key and save data into **SSI-DNA** ### Pros * **GDPR friendly**: If friends delete the **SSIBackup-DNA** on their devices, the data will be deleted permenantly. * **Stand-alone DNA** for backup data. * Backup data is not connected to friends data. * New version or new changes to SSI-DNA doesn't effect SSIBackup-DNA. * Alice can easily restore her credential-backup on her **different devices**. * Friends can leave the main DNA but keep the backup DNA live on ther devices, for their friendship. * **Rely on Gossiping Protocol**: In this pattern, Holochain gossiping porotocol plays important role to gossip SSIBackup-DNA data to friends in different Off-line/On-line scenarios. ### Cons * More workload on Conductor and more Resources --- # Credential Backup Solution 2 ## Private entry on sourcechain **Short Description:** Alice asks her closed friends to save her encrypted credential-data backup into their Sourcechain as private entry. ![](https://i.imgur.com/sB4hZkl.png) ### Steps * hApp contains 1 DNA. * **SSI-DNA** is the main DNA that contains all the credential-data. * Alice creates a **Close Friend List** on the SSI-DNA. * Alice wants to backup data: * Alice should provide **12words** as secret-key of her backup. She should write these phrase on the paper and save it in the safe place.(like Metamask or any other Wallet) * Alice creates a **access-code** which is **Hash(12words)** * Alice encrypts her credential-data with a **symetic-algorithm** using her **12words secret-keys** * Alice send message to her close friends list to save a copy of her encrypted credentail-data to their private sourcechain with **access-code**. Alice ask them to just share this data with anybody who provide **access-code**. * Alice wants to restore data: * Alice re-join the **SSI-DNA** with new AgentId. * Alice should find and build the exact Close Friends List as before. * Alice use her **12words** to recover the **access-code** * Alice send message to her Close Friends List with **access-code** * Close Friends of Alice, should query their sourcechain and if **access-code** is valid, then return back the backup data to Alice. * Alice decrypts the data with asymetric-algorithm and her 12words secret-key * Alice restore the data. ### Pros * Single DNA implementation. Less workload on Conductor. * Backup footprint on DHT. * Creating a private entry on sourcechain to save a friend backup-data generates one Action on DHT. ### Cons * **GDPR challange:** Backup data sits on another agents sourcechain data history, and can not be deleted permanently. * Hard process and less secure of data-recovery: * Alice's friends require to identify her with new AgentId again to allow her to call remote function for recovery. * Or all agents should have a public and unrestricted function for recovery which is not secure. * Implementation is more complex.