A secure storage method and system based on trusted embedded device and FTP
By using a combination of trusted embedded devices and FTP in secure storage, the isolation and scalability problems of secure storage in multi-user scenarios in the existing technology are solved, and persistent secure storage and fine-grained management of data are achieved. The risk of memory attacks is avoided.
Patent Information
- Application Number
- CN202210492880.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-07
- Publication Date
- 2024-09-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
When existing secure storage technologies face multi-user scenarios, software-based disk encryption technology lacks isolation and scalability. Hardware drives have limited key management capabilities, cannot achieve fine-grained secure storage, and have performance overhead and memory overhead. Attack risk; while hardware-based full-disk encryption technology has poor scalability in multi-user scenarios and lacks security protection mechanisms.
Adopt a secure storage method based on trusted embedded devices and FTP, connect to external storage devices through hardware interfaces, use trusted embedded devices to provide encrypted partition management and software encryption functions, realize the isolation of the host environment and storage devices, and use The remote attestation mechanism enhances authentication and authorization and supports fine-grained secure storage management.
It achieves persistent secure storage of data, provides flexibility and isolation, prevents memory attacks, supports fine-grained secure storage in multi-user scenarios, and the encrypted partition function is scalable to ensure the security of data on external storage devices.
Smart Images

Figure CN114840863B
Abstract
Description
Technical Field
[0001] The invention belongs to the field of secure and reliable storage of computer systems, and in particular relates to a secure storage method and system based on a trusted embedded device and FTP. Background Art
[0002] With the development of Internet information technology, massive amounts of data are constantly being stored and used by various forms of computer systems and information devices. For individuals, some data and files may involve personal privacy; for enterprises, a lot of data may involve intellectual property rights and trade secrets; even for countries, some data contains important national information, and leakage may pose a threat to national security. Since these security-sensitive data are usually of high value, they can easily become targets of attack or theft by hackers and criminals.
[0003] Secure storage is an important technology used to protect sensitive data. It usually contains two basic security attributes: first, data is encrypted and protected so that data is only stored in ciphertext form. Any attack can only obtain ciphertext (a bunch of garbled characters for attackers). The security based on encryption algorithm can ensure that ciphertext will not leak any information of plaintext data; second, data access is authenticated and authorized. Only users with legal credentials can decrypt and use these sensitive data, preventing illegal access by other users or malicious users. Therefore, important sensitive data can be protected through secure storage technology.
[0004] Methods for achieving secure storage usually include methods based on OTP (One-Time Programmable) and methods based on disk encryption. OTP is a special type of non-volatile memory NVM (Non-Volatile Memory), such as the eFuse technology invented by IBM in 2004. It can only be programmed once, and once programmed, it is permanently valid and cannot be tampered with. Due to the limited storage space of OTP, it is usually used to securely store the most core data such as encryption keys. Only the trusted root code on the system can access OTP for secure operations. Therefore, the method based on OTP is mainly suitable for the secure storage protection of a small amount of core data such as encryption keys. The method based on disk encryption mainly encrypts the data to be protected using an encryption algorithm and then stores it on the disk. The amount of data protected is determined by the storage space of the disk, which is suitable for the secure storage of large amounts of data.
[0005] There are usually two technical methods for secure storage based on disk encryption: software and hardware. Software-based disk encryption technology can usually integrate encryption algorithms at the application layer (such as PGP, OpenSSL), file system layer (such as ecryptfs, fscrypt) or block subsystem layer (such as BitLocker), and encrypt the data to be stored when passing through the corresponding layer of the storage architecture before storing it. Hardware-based disk encryption technology usually implements a special hardware module in the controller of the storage device, which automatically encrypts all data written to the storage device; when you want to read the data, the user enters the legal credential data through the physical security path, and the special hardware in the storage device controller automatically decrypts the data. The representative technologies of hardware-based disk encryption are mainly self-encrypting drives (SED) and TCG Opal, among which TCG Opal is a set of self-encrypting drive specifications developed by the International Trusted Computing Organization. TCG Opal provides a hierarchical structure of security management standards to protect data from theft and tampering by illegal personnel (unauthorized personnel who can access storage devices or host systems). TCG Opal uses hardware encryption technology to encrypt the entire drive, so if the drive or the host using the drive is stolen or lost, users do not have to worry about their data being illegally accessed and leaked.
[0006] Although the above-mentioned secure storage technologies have been applied to a certain extent, some shortcomings have been exposed as the research deepens. For software-based disk encryption technology, encryption and decryption are completed in the host environment where the data is used, without any isolation protection mechanism. The encryption and decryption keys are also located in the DRAM memory of the host environment, which is very vulnerable to various memory attacks. Once the keys are leaked, all data stored on the disk will be threatened. In addition, this method usually relies on complex configurations, and the performance overhead brought by encryption is unacceptable for many application scenarios. For TCG Opal, a full-disk encryption technology based on hardware drives, the keys and encryption and decryption operations are placed in the hardware drive of the storage device, which can achieve isolation from the host memory environment to a certain extent. In addition, the encryption is automatically completed by the hardware drive, which is completely transparent to the user. Its disadvantage is that the key management capability of the hardware drive is limited, and it is impossible to implement fine-grained secure storage. Especially in the face of multi-user scenarios, the scalability is poor. In addition, the hardware drive itself lacks a security protection mechanism, and the corresponding password operations are difficult to audit. Summary of the invention
[0007] The purpose of the present invention is to draw on the flexibility of software encryption technology and the isolation of hardware driver encryption technology, and propose a new secure storage solution based on a trusted embedded device and FTP mechanism. The solution can meet the flexibility and isolation requirements while maintaining the persistent secure storage of data. Specifically, the solution is embodied in the following aspects: first, an external storage device is connected to a trusted embedded device through a hardware interface, and at the same time, based on the trusted embedded device, the external storage device is configured as a secure storage device with encryption protection, which is isolated from a host environment (the host refers to any machine that uses an FTP client function to use secure data, which can be a PC or a server), and the key will not be threatened by host memory attacks; secondly, a trusted embedded device is constructed based on trusted computing technology, and the trusted embedded device has an independent software running environment, which can realize flexible software encryption and secure storage management functions, and has stronger scalability; finally, the trusted embedded device is connected to the host environment through FTP, and the data in the secure storage device can be operated very conveniently (such as display, upload, download, modify, etc.). At the same time, in order to ensure the security of the FTP connection, the remote proof mechanism of the trusted computing is extended to the authentication system of the FTP, and only the authenticated user can obtain the FTP access authority using the authenticated device.
[0008] The present invention is a secure storage method based on a trusted embedded device and FTP, and its construction principle and steps are as follows:
[0009] 1) Customize trusted embedded devices, use trusted cryptographic modules as the root of trust for trusted embedded devices, and use trusted computing technology based on trusted cryptographic modules to complete system trusted boot on trusted embedded devices, so that trusted embedded devices have a trusted computing environment;
[0010] 2) connecting an external storage device to the trusted embedded device, using the encrypted partition management subsystem to initialize the external storage device as an encrypted partition, and associating the encrypted partition with a randomly generated key file sskeyfile, using the trusted cryptographic module trust root to encrypt and store the sskeyfile in the trusted embedded device, ensuring that only the trusted cryptographic module can decrypt the sskeyfile, and that the encrypted partition can be opened and used only when the correct sskeyfile is successfully decrypted and obtained;
[0011] 3) Modify the FTP client and FTP server so that FTP can support remote authentication function and secure storage management function of encrypted partition, deploy the FTP client on the host environment, deploy the FTP server in the trusted embedded device, and bind the root directory of the FTP server to the encrypted partition. After binding, all operations on FTP are responded to in the file system corresponding to the encrypted partition; that is, after binding, the files transmitted by the FTP client will be stored in the encrypted partition by default, and the FTP client can also download files directly from the encrypted partition;
[0012] 4) The host environment can use the modified FTP client to complete security operation requests (such as secure display of data, secure upload of data, secure download of data, secure modification of data, etc.). After the FTP client and the server complete remote authentication, the FTP server authorizes the FTP client to access the encrypted partition, and the trusted embedded device uses the modified FTP server to complete the corresponding security operation response.
[0013] Furthermore, the method of the present invention includes a trusted embedded device configuration stage, an FTP transformation and deployment stage, and a secure storage use stage, which are specifically described as follows:
[0014] 1. Trusted embedded device configuration phase:
[0015] a) Customize or select an embedded device with an Ethernet port, an external IO interface, and a trusted cryptographic module. The Ethernet port enables it to communicate with the host environment through FTP, and the external IO interface enables it to connect to an external storage device (such as connecting an external large-capacity hard disk through a USB port). The trusted cryptographic module can provide a trusted root and hardware cryptographic algorithm interface for the trusted embedded device;
[0016] b) When the trusted embedded device system starts, the cryptographic algorithm and measurement verification function are built into the boot firmware to form a secure boot firmware, measure and verify the embedded operating system kernel image, and start the embedded operating system kernel and embedded system application in a secure manner to ensure the credibility of the embedded device kernel and system application;
[0017] c) connecting the external storage device to the trusted embedded device through the external IO interface, configuring the external storage device as an encrypted partition, randomly generating a key file sskeyfile, and associating the encrypted partition with the sskeyfile;
[0018] d) Use the trusted cryptographic module to generate a key protection key kpk (key protection key), use kpk to encrypt the key file sskeyfile to generate a sskeyfile.enc file, and store the sskeyfile.enc file in the file system of the embedded device, and delete the plaintext sskeyfile file (to prevent unauthorized use of sskeyfile);
[0019] e) The key protection key kpk is protected by the trusted password module. Only users with access rights to the trusted password module and a valid access password pwd_tcmkey can use the kpk key;
[0020] f) The legitimate user or administrator enters the correct access password pwd_tcmkey and uses the kpk key based on the trusted cryptographic module to decrypt the sskeyfile.enc file to obtain sskeyfile, uses sskeyfile to open the encrypted partition and mount it to the specified path of the embedded device file system (such as / media / secure), and writes the UUID (universally unique identifier) value of the encrypted partition to the specified path corresponding to the encrypted partition;
[0021] g) Legitimate users or administrators run the check program to verify and check external storage devices, encrypted partitions, mounted file systems, trusted cryptographic modules, UUID (Universal Unique Identifier) identifiers, etc. through software programs to ensure that the various software and hardware configurations that secure storage relies on are normal;
[0022] h) After the check operation in step 1.g) passes, the legitimate user or administrator restores the secure storage configuration to the initial state, that is, closes the encrypted partition and deletes the sskeyfile.
[0023] 2.FTP transformation and deployment phase:
[0024] a) Modify the FTP server: it only saves the hash value of the legitimate user (i.e. hash(pwd_user)) as the login verification data; add an authentication interface, which can sign the integrity status of the device where the server is located, and can verify the signature data submitted by the client; add an encrypted partition management interface, which can open or close the encrypted partition after verifying the management password (pwd_ss) of the encrypted partition by verifying the access rights of the securely stored encrypted partition; different users can correspond to different encrypted partitions and management passwords;
[0025] b) Modify the FTP client: After performing hash calculation on the password pwd_user entered by the user, use the hash(pwd_user) value to connect to the modified FTP server; add an authentication interface to sign the integrity status of the device where the client is located and verify the signature data submitted by the server; add an encrypted partition management interface to allow users to open or close their encrypted partitions by entering the management password (pwd_ss) of the corresponding encrypted partition;
[0026] c) A trusted third party generates a public-private key pair (sk_ftps, pk_ftps) for the FTP server and a public-private key pair (sk_ftpc i ,pk_ftpc i );
[0027] d) Deploy the server: Deploy the modified FTP server on the embedded device in step 1, and install the FTP server public and private key pair (sk_ftps, pk_ftps) in step 2.c) and the public key pk_ftpc of all legitimate FTP client users. i It is also deployed on embedded devices, so that the modified FTP server can complete one-way or two-way authentication functions based on the authentication interface;
[0028] e) Deploy the client: Deploy the modified FTP client on the host environment that uses the secure storage function. Deploy the FTP server public key pk_ftps in step 2.c) on the host environment. The public and private key pairs (sk_ftpc i ,pk_ftpc i ) are deployed on the host environment, and the private key is protected by the method chosen by each user;
[0029] f) The integrity status described in step 2.b) refers to a value that can represent the security status of the hardware and software environment of the device system where it is located, which can be selected by the administrator according to the actual application scenario. For example, this integrity status can be the process status, memory status, network connection status, etc. of the system operation;
[0030] g) The one-way authentication described in step 2.d) refers to the client authenticating the server, or the server authenticating the client; the two-way authentication refers to the client and the server completing mutual authentication; the specific method to be selected depends on the actual application scenario; the authentication refers to the prover using its private key to sign the integrity status based on the public key algorithm, and the verifier using the public key to check the legitimacy of the signature and the credibility of the integrity status.
[0031] 3. Secure storage and use stage:
[0032] a) FTP user login: The user enters the password pwd_user, and the FTP client calculates hash (pwd_user) as the user credential to log in to the FTP server. After successful login, the file root directory accessible to the FTP server is temporarily empty;
[0033] b) FTP secure storage authentication: One-way authentication or two-way authentication is completed based on the key generated and configured in step 2. The authentication function uses remote attestation technology. The FTP client needs to use its private key to sign the environment integrity status value and send it together with the integrity list to the FTP server. The receiver uses the corresponding public key for verification and ensures that the integrity list itself meets the security requirements.
[0034] c) Open FTP secure storage: After passing the authentication in step 3.b), the user enters the encrypted partition management password pwd_ss. After the FTP server verifies the legitimacy of the management password, it uses the trusted password module to decrypt the key file sskeyfile, then opens the encrypted partition and mounts it to the specified path corresponding to the FTP server;
[0035] d) FTP secure storage use: After opening the encrypted partition in step 3.c), users can perform remote FTP operations (such as display, upload, download, modify, etc.) on the data and files in the secure storage path;
[0036] e) FTP secure storage is closed: After completing the secure storage usage operation in step 3.d), the user enters the encrypted partition management password pwd_ss. After the FTP server verifies the legitimacy of the management password, it unmounts the FTP server root path, closes the encrypted partition, and deletes sskeyfile.
[0037] Corresponding to the above method, the present invention also provides a secure storage system based on a trusted embedded device and FTP, the architecture of which is as follows: Figure 1 Specifically, it includes:
[0038] Trusted cryptographic module, responsible for providing root of trust and cryptographic functions for trusted embedded devices;
[0039] The external storage device is connected to the trusted embedded device through a hardware interface. The trusted embedded device configures it as a secure storage device and is responsible for providing storage space for the secure storage system.
[0040] The trusted environment construction subsystem is responsible for providing secure boot, trusted cryptographic module driver, trusted software stack and cryptographic algorithm functions for trusted embedded devices; secure boot means taking the trusted cryptographic module as the root of trust to ensure the integrity of each component started during the startup process of the trusted embedded device; the trusted cryptographic module driver and trusted software stack are dependent components that can present the security functions of the trusted cryptographic module to the system software; the cryptographic algorithm provides hashing, encryption and decryption, signature verification and other functions;
[0041] The encrypted partition management subsystem is responsible for configuring the external storage device as an encrypted partition and provides four functions: encrypted partition initialization, encrypted partition check, encrypted partition opening, and encrypted partition closing;
[0042] The modified FTP server, in addition to providing common server-side FTP functions (i.e. processing client requests for display, upload, download, and modification), adds a server-side authentication subsystem and a server-side secure storage subsystem; the server-side authentication subsystem implements dual authentication of the FTP client, i.e. password authentication based on hash values and remote attestation authentication based on integrity status, and can also sign the integrity status of the trusted embedded device system environment so as to pass the verification of the client authentication subsystem; the server-side secure storage subsystem is responsible for the secure management of the opening and closing of the encrypted partition, and binds the FTP server root path to the encrypted partition;
[0043] In addition to providing common client FTP functions (i.e. sending display, upload, download, modify, etc. requests to the server), the modified FTP client adds a client authentication subsystem and a client security storage subsystem; the client authentication subsystem provides the server with a hash value of the user password and signs the integrity status of the host environment so that it can pass the verification of the FTP server authentication subsystem. The client authentication subsystem is also responsible for verifying the legitimacy of the server's signature and the credibility of the server's integrity status; the client security storage subsystem provides the management password corresponding to the user's encrypted partition, and can open or close the encrypted partition corresponding to the user on the server.
[0044] The advantages of the present invention are as follows:
[0045] 1. Compared with software-based disk encryption secure storage technology, the present invention moves the encryption partition function from the host environment to an isolated trusted embedded device, so that the encryption key that secure storage relies on is no longer located in the RAM memory of the host environment, ensuring that the use of secure storage and the key protection of secure storage are isolated from each other, preventing various memory attacks on the secure storage usage environment; at the same time, by modifying FTP, while adding remote proof authentication function to provide security, it ensures that the present invention is as convenient and easy to use as local operation of encrypted disks.
[0046] 2. The present invention also provides better flexibility and scalability. Through the encrypted partition management subsystem and the modified FTP function, it can be easily expanded to multi-user safe use. Each user can correspond to their own encrypted partition key file and encrypted partition path without interfering with each other. Compared with TCG Opal, a full-disk encryption technology based on hardware drivers, the keys of the present invention are no longer solidified in the hardware. The trusted embedded device provides a safe and reliable software environment and password functions, supports key update / revocation, replacement of cryptographic algorithms and other management functions, and can achieve more fine-grained secure storage functions. The trusted password module can provide hardware-level key protection for encrypted partitions.
[0047] 3. The present invention ensures the persistent and secure storage of data in an external storage device by encrypting the partition. Without the support of the management password and the decryption function of the trusted password module, even if the external storage device is stolen or lost, the attacker cannot obtain the data stored in the external storage device. In addition, the present invention supports the dual authentication functions of password hashing and remote proof by modifying FTP, so that the access to data has stronger authentication and authorization function support. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is an architectural diagram of the secure storage system based on a trusted embedded device and FTP of the present invention.
[0049] Figure 2 It is a flow chart of the use of the secure storage method based on the trusted embedded device and FTP of the present invention. DETAILED DESCRIPTION
[0050] The following takes an ordinary PC device as a host environment (an entity using secure storage) and a Raspberry Pi equipped with a TCM security chip as a trusted embedded device (an entity providing secure storage) as an example to illustrate the specific implementation of the present invention:
[0051] The present invention proposes a secure storage method based on a trusted embedded device and FTP. For those skilled in the art, the method can be referred to to design and implement a corresponding secure storage system.
[0052] The secure storage method based on a trusted embedded device and FTP in this embodiment, wherein the use process of secure storage is as follows: Figure 2 As shown, the specific steps include:
[0053] 1. Following sub-step a) of step 1 of the invention content, the Raspberry Pi has an Ethernet port and a USB interface. The Ethernet port can be connected to the PC host environment through a network cable, and the mobile hard disk can be connected as an external storage device through the USB interface. The trusted cryptographic module adopts a TCM security chip that complies with the national standard of "Trusted Computing Cryptographic Support Platform Function and Interface Specification".
[0054] 2. Follow sub-step b) of step 1 of the invention content, use the SM3 (SM3 cryptographic hash algorithm standard) algorithm that complies with my country's commercial cryptographic algorithm standards as the measurement algorithm, and use the SM2 (SM2 public key cryptography algorithm standard) that complies with China's commercial cryptographic algorithm standards as the signature verification algorithm (the SM2 algorithm uses the parameters recommended by the State Cryptography Administration) to measure and verify the Raspberry Pi Linux kernel image.
[0055] 3. Follow sub-steps c) to h) of step 1 of the invention content, use / dev / urandom of the Raspberry Pi Linux system to provide a random byte stream to generate a key file sskeyfile, call the key creation interface of the TCM security chip to generate a kpk key (SM4 key), use SM4 (SM4 block cipher algorithm) that complies with my country's commercial cryptographic algorithm standards, and call the encryption interface of TCM to encrypt sskeyfile; at the same time, by using the cryptsetup tool provided by the Raspberry Pi Linux system to configure the USB-connected mobile hard disk as an encrypted partition, the external storage device is converted into a secure storage device, and bound to the key file sskeyfile, after opening and checking the availability of the encrypted partition, close the encrypted partition, delete the sskeyfile file, and only save the sskeyfile.enc file encrypted by TCM.
[0056] 4. Follow step 2 of the invention content, use open source ftp as the baseline ftp function, expand the ftp.Client class and the ftp.Server class respectively to complete the transformation of the ftp client and server functions, add remote certification and secure storage functions, the transformed ftp client is ssftpClient, and the transformed ftp server is ssftpServer; the hash algorithm for the user password adopts SM3, the signature mechanism in the remote certification adopts SM2, and the secure storage is opened and closed using an access control authorization method based on the management password; deploy ssftpClient on the host environment of the PC device, and deploy ssftpServer on the Raspberry Pi device. Both public and private key pairs use the SM2 key pair, the server key pair of the Raspberry Pi device is (sk_ftps, pk_ftps), and the client key pair of the PC device host environment is (sk_ftpc, pk_ftpc).
[0057] 5. Following sub-step a) of step 3 of the invention content, the user enters the user name name_user and login password pwd_user, and initiates an FTP request req_ftp (such as display, upload, download or modify ftp functions); ssftpClient calculates the hash value hpwd=SM3(pwd_user) of the login password, and sends (name_user, hpwd, req_ftp) together to ssftpServer; after ssftpServer verifies the legitimacy of name_user and hpwd, if the verification is successful, the user can call the trusted storage service of the server through the client.
[0058] 6. Follow sub-step b) of step 3 of the invention and select a two-way authentication process: ssftpServer generates a random challenge value N_s using a random number algorithm and sends it to ssftpClient; ssftpClient obtains a value Mc representing the integrity status of its host environment, and uses its private key to complete the signature calculation to obtain a signature value Vc, i.e., V_c = Sig(sk_ftpc, N_s | M_c); ssftpClient also generates a random challenge value N_c and sends it together with V_c and M_c to ssftpServer; ssftpServer first verifies whether the signature is legal, i.e., R1 = Verify(pk_ftpc, N_s | M_c). If R1 is True, indicating that the signature is legal, then continue to use the standard integrity check. The integrity status value is compared with M_c to ensure that the host environment of ssftpClient is trustworthy. Any verification failure will terminate the connection. After all verifications are successful, ssftpServer will similarly calculate the signature value representing the integrity status of the Raspberry Pi device, that is, V_s=Sig(sk_ftps,N_c|M_s), and send V_s and M_s together to ssftpClient. ssftpClient first verifies whether the signature is legal, that is, R2=Verify(pk_ftps,N_c|M_s). If R2 is True, it means that the signature is legal, then continue to use the standard integrity status value to compare M_s to ensure that the embedded device environment where ssftpServer is located is trustworthy. If all verifications are passed, continue, otherwise terminate the connection.
[0059] 7. Following sub-step c) of step 3 of the invention content, the user enters the encrypted partition management password pwd_ss and initiates an encrypted partition opening request req_ssopen; ssftpClient calculates the hash value hss=SM3(pwd_ss), and sends the hash value hss and req_ssopen together to ssftpServer; ssftpServer processes the req_ssopen request, and after verifying the legitimacy of hss, calls the encrypted partition function secptt_open(name_user, hss) to open the encrypted partition corresponding to the user, and uses the encrypted partition as the ftp root directory path of the authenticated user; the secptt_open function requests TCM to decrypt sskeyfile before opening the encrypted partition.
[0060] 8. Following sub-step d) of step 3 of the invention content, after the encrypted partition corresponding to the user is opened, ssftpServer completes the corresponding FTP operation processing (such as display, upload, download or modification and other FTP functions) according to the FTP request req_ftp, and generates an FTP response rsp_ftp; ssftpClient determines whether the FTP request is successful according to rsp_ftp, and presents the result to the user.
[0061] 9. Follow sub-step e) of step 3 of the invention content. After the FTP request processing of the encrypted partition is completed, the user enters the encrypted partition management password pwd_ss and initiates an encrypted partition closing request req_ssclose; ssftpClient calculates the hash value hss=SM3(pwd_ss), and sends the hash value hss and req_ssclose together to ssftpServer; ssftpServer processes the req_ssclose request, and after verifying the legitimacy of hss, calls the encrypted partition function secptt_close(name_user, hss) to close the encrypted partition corresponding to the user, so that any FTP request cannot access the data of the encrypted partition again unless the user initiates a login, authentication and secure storage request again; the secptt_close function will automatically delete the sskeyfile file and only retain its encrypted version sskeyfile.enc.
[0062] Another embodiment of the present invention provides a secure storage system based on a trusted embedded device and FTP, wherein the architecture formed by each module is as follows: Figure 1 As shown, specifically including:
[0063] Based on the host environment of ordinary PC, SM2 and SM3 password algorithms and modified FTP client ssftpClient are deployed for users to use the secure storage function; in addition to providing common client FTP functions (i.e. sending display, upload, download, modify and other requests to the server), ssftpClient also adds a client authentication subsystem and a client secure storage subsystem; the client authentication subsystem provides the server with the hash value of the user password and the signature value of the integrity status of the host environment so that it can pass the verification of the server authentication subsystem. The client authentication subsystem is also responsible for verifying the legitimacy of the server's signature and the credibility of the server's integrity status; the client secure storage subsystem provides the management password corresponding to the user's encrypted partition, and can open or close the encrypted partition corresponding to the user on the server;
[0064] The trusted embedded device based on TCM and Raspberry Pi is equipped with a TCM security chip and an external mobile hard disk, and is deployed with a trusted environment construction subsystem, an encrypted partition management subsystem and a modified FTP server ssftpServer; the TCM security chip is responsible for providing the trusted root and password functions for the trusted embedded device; the external mobile hard disk connected via USB is responsible for providing storage space for the secure storage system; the trusted environment construction subsystem is responsible for providing secure boot, TCM hardware driver, trusted software stack and SM2, SM3, SM4 cryptographic algorithm functions for the trusted embedded device; secure boot means using TCM as the root of trust to ensure the integrity of each component started during the startup process of the trusted embedded device; the TCM driver and trusted software stack are the software supporting the TCM security chip, providing a command interface for the system software to use the TCM trusted function; the cryptographic algorithm provides SM3 hashing, SM4 encryption and decryption, SM2 signature verification and other functions; the encrypted partition management subsystem is responsible for using cry The ptsetup tool configures the external mobile hard disk as an encrypted partition. The specific process is implemented by four functions: the encrypted partition initialization function secptt_init, the encrypted partition check function secptt_check, the encrypted partition opening function secptt_open and the encrypted partition closing function secptt_close; ssftpServer, in addition to providing common server-side FTP functions (i.e. processing client display, upload, download, modification and other requests), adds a server-side authentication subsystem and a server-side secure storage subsystem; the server-side authentication subsystem implements dual authentication of the client, i.e. password authentication based on hash values and remote attestation authentication based on integrity status, and can also sign the integrity status of the embedded device system environment so as to pass the verification of the client authentication subsystem; the server-side secure storage subsystem is responsible for the secure management of the opening and closing of the encrypted partition, and binds the FTP server root path to the encrypted partition.
[0065] For the specific implementation of the above modules, please refer to the description of the specific methods above.
[0066] Although the specific embodiments of the present invention are disclosed for the purpose of illustration, the purpose is to help understand the content of the present invention and implement it accordingly, those skilled in the art will understand that various substitutions, changes and modifications are possible without departing from the spirit and scope of the present invention and the appended claims. Therefore, the present invention should not be limited to the content disclosed in the best embodiment, and the scope of the present invention is subject to the scope defined in the claims.
Claims
1. A secure storage method based on a trusted embedded device and FTP, the steps comprising: 1) Using a trusted cryptographic module as a trusted root of trust for a trusted embedded device to complete a system trusted boot on the trusted embedded device, so that the trusted embedded device has a trusted computing environment; wherein the trusted embedded device includes a trusted cryptographic module, an FTP server, and an encrypted partition management subsystem; 2) connecting an external storage device to the trusted embedded device, using the encrypted partition management subsystem to initialize the external storage device as an encrypted partition, and associating the encrypted partition with a randomly generated key file sskeyfile, using the trusted root to encrypt and store the sskeyfile in the trusted embedded device; binding the root directory of the FTP server to the encrypted partition; 3) The FTP client is deployed on the host environment, and the host environment uses the FTP client to send a security operation request to the FTP server; after the FTP client and the FTP server complete remote authentication, the FTP server authorizes the FTP client to access the encrypted partition, and the trusted embedded device uses the FTP server to respond to the received security operation request.
2. The method according to claim 1, characterized in that: A trusted third party generates a public-private key pair (sk_ftps, pk_ftps) for the FTP server and a public-private key pair (sk_ftpc i ,pk_ftpc i ) ; the FTP server's public and private key pair (sk_ftps, pk_ftps) and the legitimate user's public key pk_ftpc i Stored on the trusted embedded device; the public key pk_ftps of the FTP server and the public and private key pair (sk_ftpc i ,pk_ftpc i ) is deployed on the host environment.
3. The method according to claim 2, characterized in that The method for the FTP client and the FTP server to complete remote authentication is as follows: user i enters the login password pwd_user through the FTP client, and the FTP client calculates hash(pwd_user) as the user credential to log in to the FTP server; the FTP client uses the private key of user i to sign the environment integrity status value, and sends the signature and the integrity list to the FTP server, and the FTP server uses the public key of user i to verify the received information.
4. The method according to claim 3, characterized in that The method by which the trusted embedded device uses the FTP server to respond to the received security operation request is: 41) The FTP client sends the encrypted partition management password pwd_ss entered by the user to the FTP server. After the FTP server verifies the legitimacy of pwd_ss, it uses the trusted password module to decrypt and obtain the key file sskeyfile, and then uses the key file sskeyfile to open the encrypted partition and mount it to the specified path corresponding to the FTP server; 42) User i performs remote operations on the data in the encrypted partition through the FTP client; after the remote operation is completed, the FTP client sends the encrypted partition management password pwd_ss entered by the user to the FTP server. After the FTP server verifies the legitimacy of pwd_ss, it unmounts the path specified by the FTP server, closes the encrypted partition, and deletes sskeyfile.
5. The method according to claim 1, characterized in that The trusted embedded device is an embedded device with a network port, an external IO interface and a trusted cryptographic module; when the trusted embedded device is started, the embedded operating system kernel image of the trusted embedded device is measured and verified through the built-in secure boot firmware, and the embedded operating system kernel and embedded system application are started in a secure manner to ensure the credibility of the embedded device kernel and system application.
6. The method according to claim 1, characterized in that The remote authentication completed by the FTP client and the FTP server is two-way authentication or one-way authentication; the one-way authentication refers to the FTP client authenticating the FTP server or the FTP server authenticating the FTP client; the two-way authentication refers to the mutual authentication between the FTP client and the FTP server.
7. The method according to claim 1, characterized in that The FTP server stores the verification data of legitimate users for remote authentication of access users; the FTP server is provided with an authentication interface for signing the integrity status of the device where the FTP server is located and verifying the signature data submitted by the FTP client; the FTP server is provided with an encrypted partition management interface for opening the encrypted partition after verifying the encrypted partition management password pwd_ss; The FTP client performs hash calculation on the password pwd_user input by the user, and sends the hash value hash(pwd_user) as the verification data to the FTP server; an authentication interface is set in the FTP client to sign the integrity status of the device where the FTP client is located, and to verify the signature data submitted by the FTP server; An encrypted partition management interface is set in the FTP client to receive an encrypted partition management password input by a user.
8. The method according to claim 1, characterized in that Different users have different encrypted partitions and encrypted partition management passwords.
9. The method according to claim 1, characterized in that: In step 1), the trusted computing technology is used based on the trusted cryptographic module to complete the system trusted boot on the trusted embedded device, so that the trusted embedded device has a trusted computing environment.
10. A secure storage system based on a trusted embedded device and FTP, characterized in that: It includes a host and a trusted embedded device; wherein the trusted embedded device includes a trusted password module, an FTP server and an encrypted partition management subsystem, and an FTP client is deployed on the host; The trusted cryptographic module is used to provide a trusted root and cryptographic functions for a trusted embedded device; The trusted embedded device is used to connect to an external storage device, use the encrypted partition management subsystem to initialize the external storage device as an encrypted partition, associate the encrypted partition with a randomly generated key file sskeyfile, and use the trusted cryptographic module trusted root to encrypt and store the sskeyfile in the trusted embedded device; bind the root directory of the FTP server to the encrypted partition; The FTP client is used to send a security operation request to the FTP server; after the FTP client and the FTP server complete remote authentication, the FTP server authorizes the FTP client to access the encrypted partition, and the trusted embedded device uses the FTP server to respond to the received security operation request.
Citation Information
Patent Citations
Method for constructing virtual environment trust
CN101350044A
Digital rights management system for transfer of content and distribution
CN103366102A
Industrial control system safe support framework and data safe transmission and storage method thereof
CN104991526A
Safety login method based on domestic cryptographic algorithm
CN105162808A
Cited By
Implementation method and system for secure operating system of power embedded device
CN119989312A
