A secure method for backing up and restoring data on a device
The BIP39, BIP32, and BIP44 standards are used to securely manage data backup and restoration within devices by integrating MCU and Secure Element, addressing security issues in existing methods and ensuring efficient, attack-resistant data integrity and confidentiality.
Patent Information
- Application Number
- FR2023003885
- Authority / Receiving Office
- FR · FR
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-04-18
- Publication Date
- 2024-10-25
AI Technical Summary
Existing data backup and restoration methods for devices lack security, particularly in handling private keys and application data, and often require complex trust hierarchies like PKI, which are vulnerable to attacks.
Implementing the BIP39, BIP32, and BIP44 standards to generate operation security keys using a mnemonic seed, ensuring secure backup and restoration within the device by integrating a Microcontroller Unit (MCU) and Secure Element, which manage lightly and highly secure data respectively, without the need for external backups, and utilizing encryption and key derivation functions to ensure data integrity and confidentiality.
Ensures secure and efficient backup and restoration of data, including private keys and application data, by eliminating the need for external backups and reducing vulnerability to attacks, while maintaining data integrity and confidentiality.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Title of the invention: A secure method of backing up and restoring data in a device
[0001] The present invention presents a method for secure backup and restoration of data in a device with specific data processing that implements the BIP39, BIP32 & BIP44 standards or similar implementations to initiate the generation of keys for securing the operations of the data backup / restoration. This concerns the data of several applications residing in the device. The backup of a previous device is necessary to allow its restoration in a new device.
[0002] The BIP39, BIP32 and BIP44 standards propose a method for restoring multiple keys from different applications that manage keys (e.g., wallets) within a device. This solution allows all these keys to be restored only by memorizing an initial seed that is represented by a list of words (e.g., 24 words). These words must be carefully kept by the user and used only in the context of a restoration in a new device.
[0003] This solution has an important advantage, which is to avoid moving the private keys outside the device. It completely eliminates the need for a backup and replaces it with simply storing the initial word list. It also eliminates the need for a hierarchical chain of trust (e.g., PKI) such as X.509 digital certificates (RFC 5280).
[0004] The present invention proposes to extend this solution to securely manage the backup / restoration of internal data within the device. This may be application data, configuration data or any other type of data that must be restored when migrating to a new device that must contain the same data as the first.
[0005] The device may contain two processors: a. The MCU (Microcontroller Unit) which manages communication with external devices and contains lightly secured data (LSD) related to applications and their metadata (MD). b. At least one Secure Element that manages secrets and associated applications and contains Highly Secure Data (HSD). The HSD can be encrypted and exported to the MCU, then they are called Exported Secure Data (ESD). ESD can also be imported and decrypted into the Secure Element.
[0006] The aforementioned processing units can be: a. in a single integrated circuit (e.g., System On Chip) in which the secure element is embedded. b. in two different integrated circuits communicating via a communication interface.
[0007] Several options are possible depending on the security requirements of the applications: a. We can have an MCU exposing a compliant security level. b. We may have an MCU incorporating a secure element. c. We may have a secure element that incorporates the functionality of a MCU.
[0008] A secure element can be: a. A separate chip that is removable or soldered onto a motherboard of a larger electronic device. b. A secure / tamper-resistant element integrated into a System On Chip (SoC), consisting of low-level hardware and software providing resistance against logical and physical attacks.
[0009] The hardware platform of the secure element comprises: a. At least one secure microprocessor with volatile and non-volatile memory, often a cryptoprocessor, and dedicated security hardware. The hardware platform is protected against tampering by providing protection against side-channel attacks (e.g., differential power analysis, differential fault attacks, and fault attacks (invasive or non-invasive). b. Security features providing: i. Facilities and protection for key management such as KDF (Key Derivation Function). ii. Random number generators that meet security requirements.
[0010] The characteristics and properties of Secure Elements are well listed in Global Platform Virtual Primary Platform (known as, VPP).
[0011] The purpose of the invention is to backup / restore LSD and ESD to / from any storage medium using a key system as defined in the BIP standards. The BIP39, BIP32 & BIP44 standards define the concept of Wallet which is an application managing keys such as Bitcoin Wallet, Ethereum Wallet and other cryptocurrency wallets.
[0012] We must first present a summary of the associated BIP standards before describing the invention itself.
[0013] The BIP39 standard describes the implementation of a mnemonic code or phrase mnemonic, which is a group of standard, easy-to-remember words, for generating an initial seed to diversify deterministic keys (see BIP standards references below).
[0014] It consists of two parts: generating the mnemonic and then converting it into a binary seed. A mnemonic code or phrase is superior for human interaction compared to handling raw binary or hexadecimal representations of a wallet's initial seed. The phrase can be written on paper or spoken over the phone. It is a way to carry a computer-generated random seed with a human-readable transcription.
[0015] The BIP32 and BIP44 standards describe Hierarchical Deterministic Wallets (i.e., "HD Wallets"). HD Wallets can generate a tree of nodes from an initial seed (as in BIP39) in a deterministic manner where some nodes are key pairs.
[0016] Blockchain is a technology that allows a set of transactions to be tracked in a decentralized, secure and transparent manner.
[0017] Node paths can be defined as in the BIP44 standard which assigns path prefixes for known wallets of different blockchains (e.g. Bitcoin, Ethereum, EBSI (European Blockchain Services Infrastructure) etc.). These standards allow the generation of many keys for different wallets of the blockchains. By providing the initial seed (represented by mnemonic words or other means), the same key tree can be generated in a new device.
[0018] In this invention, we use the BIP32 node structure to allocate new paths for backup / restore operations. This means that we benefit from the features associated with this standard (e.g., deterministic generation of key pairs).
[0019] Since the derived key tree is deterministic, we cannot use it directly for backup / restore operations. The encryption / decryption key must be ephemeral for each backup. [Fig.l] illustrates an example of a node tree as defined in the BIP32 standard.
[0020] A secure backup / restore must support the following security properties: a. Data integrity and confidentiality. b. Perfect Forward Secrecy (PFS) of data, i.e. cryptographic means that do not allow the reconstruction of past secrets from future secrets c. Anti-replay of data which can be conditional. d. Authenticity of data as proof of origin. e. Apply rules for the protection of privacy by design (known as Global Data Procedure Regulation) in the randomization procedure of the resulting data.
[0021] The secure backup / restore procedure can be applied to a single application or a group of applications.
[0022] In the secure backup / restore procedure we define the following notations: a. Y = encrypt[K](X): Function encrypting plaintext data X using a key from key set K. The encrypted data is Y. The encryption function may be based on the GCM block cipher as defined in NIST SP 800-38D Recommendations or eGCM as defined in the Global Platform OFL specification or any other cryptographic method supporting the security requirements. b. X = decrypt[K](Y): Function decrypting encrypted data Y using a key from key set K. The plaintext data is X. The decryption function may be based on the GCM block cipher as defined in NIST SP 800-38D Recommendations or eGCM as defined in the Global Platform OFL specification or any other cryptographic method supporting the security requirements. c. I = compute_icheck[K](X): Function generating the check code I using a key from the key set K on the plaintext data X. The check code is I. The function generating the check code can be based on an HMAC as defined in FIPS 198-1 or integrated into the encryption function like eGCM. d. verify_icheck[K](X, I): Function verifying check code I using a key from key set K on plain data X and the expected check code I. The function fails if the expected check code is different from the calculated code. e. S = sign[K](A): Function generating the signature of data A using the private key K. The signature is S. The function generating the signature can implement the B SI TR-03111 standard. f. verify[K](S, A): Function verifying the signature S of data A using the public key K. The verification fails if the calculated signature is wrong. The function verifying the signature can implement the BSI TR-03111 standard. g. C = generate_container(X, Y,...) : Function generating a C container containing a collection of data (X, Y, ...) according to a contextual structure. Container generation can be based on standards such as ASN.l (ISO / IEC 8824-1:2021), CBOR or JSON encoding rules. h. K = derive(ShS, SI): Function generating a key or a set of keys based on a shared secret (ShS) and a shared information (SI). As an example of KDF (Key Derivation Function), we can use the one defined in: i. BSI Technical Guideline TR-03111: Elliptic Curve Cryptography. Version 2.0. ii. BIP32 standard.
[0023] In the secure backup / restore procedure, we define the following terms: a. Key material: Data structure containing all the information defining a key (e.g., ECC domain, type, size).
[0024] The invocation sequence of the secure backup procedure is as follows in which each sequence number corresponds to the sequence number of [Fig.2]: 1. The user via the equipment user interface requests a secure backup on the device. 2. The secure backup application in the device asks for user consent (e.g., fingerprint verification, PIN verification, etc.) to generate the secure backup container (SBK). 3. User agrees to secure backup generation. 4. The backup application verifies the user's consent. 5. The secure Backup Application generates the Secure Backup Container (SBK). The SBK container is sent to the backup application within the User's Equipment. 6. The backup application wraps the SBK container into an XSBK container for the selected storage media. 7. User consent verification failed. The user is warned. 8. User consent verification failed. The user's device backup application is notified.
[0025] The device may generate a UUID (Universal Unique Identifier) as defined in RFC 4122 to identify the SBK in the storage medium. Said UUID may act as a pseudonym to search for the SBK within a discovery server acting as a repository of anonymous SBKs (GDPR support).
[0026] The device may generate a URI (Universal Resource Identifier) to identify the SBK in the storage medium. [Fig.2] illustrates the sequence related to the secure data backup procedure [Fig.3] illustrates the functional details of the secure data backup procedure
[0027] The secure backup procedure is as follows: a. Generate an initial seed as defined in BIP39 or using another means. b. Compute a deterministic private key (DPK) from the seed in the restore / backup application node as defined in BIP32. c. Calculate a random number R. d. Set a version number V as the current version number reflecting an ESD / LSD / MD fingerprint. It assumes that the version number is monotonic and is changed for each secure backup. e. Generate a container H containing at least: R, V. f. Derive two keys IM and EM using a derivation function with the H, DPK and IM, EM paths as parameters. g. Derive a private key (KAUTp) using a derivation function with H, DPK in the restore / backup / authentication application node as defined in BIP32. h. Collect metadata (MD) related to each ESD and LSD such as length, identification, version, etc. i. Generate a CDC container containing: ESD, LSD and MD j. Calculate an integrity check (IDC) of CDC using the data finishing the IM key. k. Generate EDC from CDC encryption using EM key. 1. Generate a container B containing H, EDC and IDC. m. Generate B's SIG signature using the private key KAUTp. n. Generate an SBK container containing SIG and B
[0028] The secure restore invocation sequence is as follows in which each sequence number corresponds to the sequence number of [Fig.4]: 1. The Restore Application collects the XSBK container from the storage media. 2. The restore application extracts the SBK container from XSBK. 3. The restore application transfers the SBK to the restore application of the device. 4. If the device is new, the user is prompted to enter the initial seed. 5. The user enters his data for the initial generation of seeds in the device. 6. The device prompts the user for consent. 7. The user accepts the secure restoration procedure. 8. The restore application in the device verifies the user's consent. 9. User consent verification is successful. The device restore application invokes the secure restore procedure. 10. The user is informed of the success of the secure restoration procedure. 11. The restore application is informed of the successful completion of the secure restore procedure. 12. The user is notified of the failure of a secure restoration procedure. 13. The restore application is informed of the failure of a restore procedure. secure catering. 14. The user is informed of the failure of the verification of the user's consent. 15. The restoration application is informed that a user's consent verification failed. [Fig.4] illustrates the secure data restoration invocation sequence [Fig.5] illustrates the secure restoration procedure.
[0029] The secure restoration procedure is detailed as follows: a. Generate an initial seed as defined in BIP39 or using another means. b. Compute a deterministic private key (PDK) from the seed in the restore / backup application node as defined in BIP32. c. Derive a private key (KAUTp) in the restore / backup / authentication application node as defined in BIP32 and calculate its public key (KAUTpu) d. Extract H, EDC, IDC and SIG from B e. Verify SIG using public key KAUTpu and B f. Extract version V from H g. Check that V is greater (or less depending on the direction of monotonicity (positive / negative) of the V version) than the current V version of the device. h. Derive two keys IM and EM from H and DPK i. Decrypt EDC using EM key j. Verify IDC using IM key material and EDC clear data. k. Install MD, ESD and LSD on the device.
[0030] To illustrate the need and advantages of this invention, we describe a device that can host multiple applications that can be distributed between a Secure Element and an MCU to meet different security levels. Each application is used for different purposes independently and in isolation. Among all these applications, the device hosts two applications as: a. The secure backup application that can backup all other applications b. The secure restore application that can restore all other applications from a secure backup.
[0031] In this device, we can host multiple blockchain wallets (Wallets), for example, a Bitcoin wallet, an Ethereum wallet, and possibly other additional wallets from different blockchains. Wallet applications rely on BIP standards for internal key generation and generally do not need to store additional data. Wallet keys are restored directly by providing the initial seed (e.g., represented by mnemonic words).
[0032] Another category of applications requires application data management and may also use other internal key generation mechanisms. We will take as an example the well-known and standardized FIDO2 application that provides a way to authenticate users without passwords securely while preserving privacy. Online services (e.g., websites) can use this standard by implementing the server side of the FIDO2 protocol. This protocol and applications replace username and passwords by using public key cryptography in a convenient way that also preserves user privacy.
[0033] The FIDO2 application in the device will generate authentication keys for each site the user wishes to log in to (in place of passwords) following the FIDO2 standard. For each key, the application must store associated data for the context of exchange between the FIDO2 application in the device and the remote site. In addition, additional data may need to be stored for each website for which keys have been generated (e.g., website URL, user nickname, etc.).
[0034] All this data is website dependent and cannot be regenerated from the initial seed. It is therefore clear that they must be backed up if we want to migrate to a new device and find the same FIDO2 application with the same data and keys that were generated for the different websites to which the user has subscribed.
[0035] Let us consider, as an example, that our device has three applications: a. A Bitcoin wallet, b. an Ethereum wallet and, c. an FID02 application.
[0036] For both wallets, we do not have any internal application data to backup as their keys will be restored when the initial seed (e.g., generated from mnemonic words) is introduced into a new device and the associated data can be retrieved from the relevant blockchain. For the FIDO2 application, however, we need a backup of the internal application data associated with each website for which the user went through a registration process that generated the associated authentication keys.
[0037] Any equipment such as a mobile phone or a desktop computer can communicate with the device using a dedicated reliable wireless interface such as Bluetooth, WIFI and NFC or a wired interface such as USB, Ethernet, etc. This equipment hosts an application that can trigger or be triggered to / from the device to transfer secure backup data to / from a storage medium.
[0038] The storage medium is selected either by the user when using the equipment application or by the device.
[0039] The above equipment does not need to be secured.
[0040] The secure backup / restore procedure offers the following advantages: a. The generated keys are known only to the element exposing the highest level of security (e.g., the secure element in the device). b. Secure Backup data can be stored securely on any external storage media. c. Any new genuine device that complies with the secure backup procedure can be restored (e.g., disaster recovery or cloning)
[0041] When the user wants to backup a device, he / she should follow the simple procedures below: a. Invoke the backup application on the user's equipment which: i. Establishes communication with the device. ii. Define the location of the storage media. b. The device will invoke the secure backup procedure and send the secure backup data to the device's backup application. c. The device backup application stores the backup data securely on the selected storage media.
[0042] When the user wants to migrate to a new device, he / she needs to follow the simple procedures below: a. Introduce the seed (represented by mnemonic words or other means) into the new device via a dedicated user interface on the device itself. b. Invoke the restore application on the user's equipment which: i. establishes communication with the device. ii. defined the location of secure backup data c. send it to the device, which will invoke the secure restore procedure. After this restore procedure, the new device will have the same keys and data for all its applications.
Claims
Claims
1. A method for cloning device data that uses the generation of one or more keys derived from a single seed without hierarchical chain of trust support, which is introduced into the device after its deployment in the field, and which implements BIP standards such as BIP32 & BIP44 or similar key derivation and hierarchical data structure; these deterministic derived keys are used for data authenticity proof (digital signature) and to generate ephemeral diversified keys which are then used to provide confidentiality (encryption), data integrity (integrity control) and versioning of the device's internal data and which are then used to protect and securely transmit a set of data related to the device's applications as a Secure Backup Container (SBK) to / from an insecure environment.
2. The method of claim 1, wherein the secure backup container is backed up outside the device on an external storage medium.
3. The method of claim 1, wherein the secure backup container is retrieved from a storage medium and sent to the device.
4. Method according to claim 1 and 2 wherein the confidentiality of the data is ensured by using a data encryption method with ephemeral keys; the integrity of the data is ensured by using an integrity control method using ephemeral keys; the authenticity of the data is ensured by a digital signature for proof of origin using a deterministic key.
5. A method according to claim 1 and 3 wherein the confidential data is decrypted using a data encryption method using ephemeral keys; the integrity of the data is verified using an integrity verification method using ephemeral keys; the authenticity of the data is verified by a digital signature for proof of origin using a deterministic key.
6. A method according to any preceding claim wherein the backup / restore procedure may be dispatched between a (lightly secure) MCU and a (highly secure) secure element.
7. The method of claim 1, wherein the security protocol ensures that the secure backup container appears as random data prohibiting data correlation to meet confidentiality-by-design requirements.
8. An application as defined in claims 2 and 3 which enforces user consent for backup and restore using user authentication mechanisms in the device such as fingerprint, PIN or equivalent means.
9. The method of claim 2 & 3 wherein the device provides a URI (Universal Resource Identifier) or URN (Universal Resource Name) to designate the storage destination.
10. A method according to claim 2 & 3 wherein the device provides a UUID (Unique Universal Identifier) for identification of the SBK regardless of the storage location.
