Sensitive data storage method, device and equipment and readable storage medium

By performing byte order disruption and byte content conversion of sensitive data in sensitive data storage, and combining newly generated random numbers to form the original sequence, the defects of random number key storage and management in the prior art are solved, and sensitive data storage with high security and high reliability are achieved.

CN119885270APending Publication Date: 2025-04-25DONGFENG AUTOMOBILE ELECTRONICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411969558.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing sensitive data encryption technology that uses random numbers as keys has major flaws in key storage and management. The loss of random number keys will lead to the inability to decrypt sensitive data and storing the key itself.

Method used

By performing byte order disruption and byte content conversion on sensitive data during writing, the original sequence is formed in combination with newly generated random numbers and written to the storage medium. When reading, byte content and byte order restore are performed, random numbers are stripped away to obtain sensitive data, avoiding the need to use random number keys during the decryption process.

Benefits of technology

Improve the reliability of sensitive data storage, and enhance the security of data encryption by leveraging the unpredictability of random numbers, while avoiding the storage risk of random number keys.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119885270A_ABST
    Figure CN119885270A_ABST
Patent Text Reader

Abstract

The invention provides a sensitive data storage method, device and equipment and a readable storage medium, and the method comprises the steps that an original sequence is generated based on a writing instruction of sensitive data, and the original sequence comprises the sensitive data and a newly generated random number; performing byte order disruption on the original sequence to obtain a first sequence; performing byte content conversion on the first sequence to obtain a second sequence; writing the second sequence into a storage medium; obtaining a second sequence from the storage medium based on a reading instruction of the sensitive data; performing byte content reduction on the second sequence to obtain a third sequence; performing byte sequence reduction on the third sequence to obtain a fourth sequence; and outputting the subsequence representing the sensitive data in the fourth sequence. According to the method and the device, the security of data encryption can be improved by utilizing the unpredictability of the random number, and the random number does not need to be stored for data decryption, so that the reliability of sensitive data storage is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data storage technology, and in particular to a sensitive data storage method, device, equipment and readable storage medium. Background Art

[0002] With the rapid development of information technology, the value of data has become increasingly prominent. At the same time, the security protection of sensitive data has become a crucial issue. Among the many data encryption technologies, using random numbers as keys to encrypt sensitive data is a common method. This method is based on the unpredictability of random numbers and can improve the security of data encryption.

[0003] In the prior art, when a random number is used as a key to encrypt sensitive data, it is usually necessary to store the random number key used in the encryption process. This is because in the decryption stage, the same random number key as that used in encryption must be used to correctly restore the ciphertext to the original sensitive data. For example, in some data storage systems, the random number key and the encrypted data are stored in different fields of the same database, or in another storage medium associated with them.

[0004] However, this method has significant problems. Once the stored random number key is lost, the sensitive data cannot be decrypted, and the storage of the random number key itself also faces security risks. Therefore, the existing sensitive data encryption technology that uses random numbers as keys has major defects in key storage and management. Summary of the invention

[0005] The present application provides a sensitive data storage method, apparatus, device and readable storage medium, which can not only improve the security of data encryption by utilizing the unpredictability of random numbers, but also eliminate the need to store random numbers for data decryption, thereby improving the reliability of sensitive data storage.

[0006] In a first aspect, an embodiment of the present application provides a sensitive data storage method, the sensitive data storage method comprising:

[0007] Generate an original sequence based on a write instruction of the sensitive data, wherein the original sequence includes the sensitive data and a newly generated random number;

[0008] The byte order of the original sequence is disrupted to obtain a first sequence;

[0009] Performing byte content conversion on the first sequence to obtain a second sequence;

[0010] writing the second sequence to a storage medium;

[0011] Retrieving a second sequence from the storage medium based on a read instruction of the sensitive data;

[0012] Perform byte content restoration on the second sequence to obtain a third sequence;

[0013] Restoring the byte order of the third sequence to obtain a fourth sequence;

[0014] Output the subsequence representing the sensitive data in the fourth sequence.

[0015] Furthermore, in one embodiment, the original sequence further includes a first characteristic value, which is a hash value of a chip ID of a storage medium to which the sensitive data is to be written;

[0016] The step of outputting the subsequence representing sensitive data in the fourth sequence comprises:

[0017] If the subsequence representing the first characteristic value in the fourth sequence is the same as the second characteristic value, the reading is judged to be successful and the subsequence representing the sensitive data in the fourth sequence is output; otherwise, the reading is judged to be failed, wherein the second characteristic value is the hash value of the chip ID of the storage medium where the second sequence is located.

[0018] Furthermore, in one embodiment, after the step of determining that the reading is successful and outputting the subsequence representing the sensitive data in the fourth sequence, the following step is further included:

[0019] Generate an update sequence, wherein the update sequence includes a subsequence representing sensitive data in the fourth sequence, a newly generated random number, and a second characteristic value;

[0020] The byte order of the update sequence is disrupted to obtain a fifth sequence;

[0021] Performing byte content conversion on the fifth sequence to obtain a sixth sequence;

[0022] The sixth sequence is overwritten into the storage medium as a new second sequence.

[0023] Furthermore, in one embodiment, the step of converting the byte content of the first sequence to obtain the second sequence includes:

[0024] Performing a preset operation on the first sequence to obtain a seventh sequence;

[0025] Using the first characteristic value as a key, an XOR operation is performed on the seventh sequence to obtain a second sequence, wherein the first characteristic value is a hash value of a chip ID of a storage medium into which sensitive data is to be written;

[0026] The step of performing byte content restoration on the second sequence to obtain a third sequence comprises:

[0027] An eighth sequence is obtained by performing an XOR operation on the second sequence using the second characteristic value as a key, wherein the second characteristic value is a hash value of a chip ID of a storage medium where the second sequence is located;

[0028] The third sequence is obtained by performing an inverse operation of the preset operation on the eighth sequence.

[0029] Furthermore, in one embodiment, the step of performing a preset operation on the first sequence to obtain the seventh sequence includes:

[0030] When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the seventh sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the seventh sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence;

[0031] When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the seventh sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the seventh sequence, and the middle byte of the first sequence is used as the last byte of the seventh sequence, where y is any positive integer in the range of [1, (N-1) / 2];

[0032] The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises:

[0033] When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the third sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the third sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence;

[0034] When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the third sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the third sequence, and the last byte of the eighth sequence is used as the middle byte of the third sequence, where q is each positive integer in the range of [1, (M-1) / 2].

[0035] Furthermore, in one embodiment, the step of performing a preset operation on the first sequence to obtain the seventh sequence includes:

[0036] The sum of the maximum value and the minimum value in the first sequence is used as the first reference value, and the difference between the first reference value and each byte of the first sequence is used as each byte of the seventh sequence;

[0037] The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises:

[0038] The sum of the maximum value and the minimum value in the eighth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the eighth sequence is taken as each byte of the third sequence.

[0039] Furthermore, in one embodiment, the step of performing a preset operation on the first sequence to obtain the seventh sequence includes:

[0040] When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the ninth sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the ninth sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence;

[0041] When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the ninth sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the ninth sequence, and the middle byte of the first sequence is used as the last byte of the ninth sequence, where y is any positive integer in the range of [1, (N-1) / 2];

[0042] The sum of the maximum value and the minimum value in the ninth sequence is used as the first reference value, and the difference between the first reference value and each byte of the ninth sequence is used as each byte of the seventh sequence;

[0043] The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises:

[0044] When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the tenth sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the tenth sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence;

[0045] When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the tenth sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the tenth sequence, and the last byte of the eighth sequence is used as the middle byte of the tenth sequence, where q is a positive integer in the range of [1, (M-1) / 2];

[0046] The sum of the maximum value and the minimum value in the tenth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the tenth sequence is taken as each byte of the third sequence.

[0047] In a second aspect, an embodiment of the present application further provides a sensitive data storage device, the sensitive data storage device comprising a write preparation module, a sequence operation module, a content operation module, a write execution module, a read preparation module and a read execution module;

[0048] The write preparation module is used to generate an original sequence based on the write instruction of the sensitive data, and send the original sequence to the sequential operation module, wherein the original sequence includes the sensitive data and the newly generated random number;

[0049] The sequence operation module is used to disrupt the byte order of the original sequence to obtain a first sequence, and send the first sequence to the content operation module;

[0050] The content operation module is used for performing byte content conversion on the first sequence to obtain a second sequence, and sending the second sequence to the write execution module;

[0051] The write execution module is used to write the second sequence into the storage medium;

[0052] The read preparation module is used to obtain the second sequence from the storage medium based on the read instruction of the sensitive data, and send the second sequence to the content operation module;

[0053] The content operation module is further used to perform byte content restoration on the second sequence to obtain a third sequence, and send the third sequence to the sequence operation module;

[0054] The sequential operation module is further used to restore the byte order of the third sequence to obtain a fourth sequence, and send the fourth sequence to the read execution module;

[0055] The read execution module is used to output a subsequence representing sensitive data in the fourth sequence.

[0056] In a third aspect, an embodiment of the present application further provides a sensitive data storage device, which comprises a processor, a memory, and a sensitive data storage program stored in the memory and executable by the processor, wherein when the sensitive data storage program is executed by the processor, the steps of the above-mentioned sensitive data storage method are implemented.

[0057] In a fourth aspect, an embodiment of the present application further provides a readable storage medium, on which a sensitive data storage program is stored, wherein when the sensitive data storage program is executed by a processor, the steps of the above-mentioned sensitive data storage method are implemented.

[0058] In this application, when writing, the sensitive data is encrypted in two dimensions: byte order disruption and byte content conversion. The sensitive data is mixed with the newly generated random number to form an original sequence. The byte order disruption and byte content conversion are performed successively, and the result is written to the storage medium. When reading, the byte content is first restored to obtain the mixed and disrupted sensitive data and random numbers, and then the byte order is restored to strip the random numbers to obtain the sensitive data. Random numbers are not required during the reading process, so random numbers do not need to be stored during the writing process, avoiding the risk of loss of random number keys leading to the inability to decrypt sensitive data and leakage of stored random number keys. Through this application, the unpredictability of random numbers can be used to improve the security of data encryption, and there is no need to store random numbers for data decryption, thereby improving the reliability of sensitive data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 This is a flowchart of a sensitive data storage method in one embodiment of the present application;

[0060] Figure 2 This is an operational diagram of a sensitive data storage method in one embodiment of the present application;

[0061] Figure 3 This is a schematic diagram of the operation of a sensitive data storage method in another embodiment of the present application;

[0062] Figure 4 This is a schematic diagram of the operation of byte content conversion and byte content restoration in an embodiment of the present application;

[0063] Figure 5 This is a schematic diagram of the operation of byte content conversion and byte content restoration in another embodiment of the present application;

[0064] Figure 6 This is a schematic diagram of the functional modules of a sensitive data storage device in one embodiment of the present application;

[0065] Figure 7 This is a schematic diagram of the hardware structure of the sensitive data storage device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0066] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0068] In a first aspect, an embodiment of the present application provides a sensitive data storage method.

[0069] Figure 1 A schematic diagram of a process for storing sensitive data in an embodiment of the present application is shown. Figure 2 A schematic diagram of the operation of a sensitive data storage method in an embodiment of the present application is shown.

[0070] Reference Figure 1 and Figure 2 In one embodiment, the sensitive data storage method comprises the following steps:

[0071] S1. Generate an original sequence based on a write instruction of sensitive data, where the original sequence includes the sensitive data and a newly generated random number.

[0072] Specifically, a random number is temporarily generated after receiving a write instruction, and the random number generation algorithm is used to ensure that the random number generated each time is different. The original sequence contains at least sensitive data and random numbers, and may also contain other content.

[0073] It should be noted that Figure 2 The random numbers constituting the original sequence are referred to as first random numbers, which are distinguished from the second random numbers generated again after reading in other embodiments below, indicating that the two are different.

[0074] Optionally, the number of bytes of the random number may be the same as or different from the sensitive data.

[0075] S2. Disorder the byte order of the original sequence to obtain a first sequence.

[0076] Specifically, after the byte order is disrupted, the first sequence contains each byte in the original sequence, and the order of the bytes changes.

[0077] It should be noted that scrambling the byte order follows certain rules. The most basic requirement is to be able to distinguish bytes belonging to sensitive data and bytes belonging to random numbers from the first sequence according to the rules, and to restore the arrangement order of sensitive data. It is not required to restore the arrangement order of random numbers.

[0078] It can be understood that since random numbers are mixed in, the unpredictability of random numbers can be used to improve the security of data encryption compared to directly scrambling the byte order of sensitive data.

[0079] S3. Convert the byte content of the first sequence to obtain a second sequence.

[0080] Specifically, after byte content conversion, the second sequence does not include some bytes in the first sequence, and other bytes that do not exist in the first sequence are added.

[0081] S4. Write the second sequence into a storage medium.

[0082] Specifically, the sensitive data write instruction specifies which storage medium the sensitive data is to be written into, and the second sequence replaces the sensitive data in writing into the storage medium.

[0083] S5. Obtain a second sequence from the storage medium based on the read instruction of the sensitive data.

[0084] Specifically, upon receiving the read instruction, a second sequence corresponding to the sensitive data is found from the storage medium.

[0085] It should be noted that, for the same sensitive data, after being written to a certain storage medium, it may be copied to other storage media, so the storage medium targeted by the read instruction is not necessarily the same as the storage medium used for writing.

[0086] S6. Perform byte content restoration on the second sequence to obtain a third sequence.

[0087] Specifically, byte content restoration is the inverse operation of byte content conversion, but the third sequence is not necessarily the same as the first sequence, because byte content conversion may rely on some external factors. When the external factors change, the third sequence will be different from the first sequence.

[0088] S7. Restore the byte order of the third sequence to obtain a fourth sequence.

[0089] It should be noted that even if the third sequence is the same as the first sequence, the fourth sequence is not necessarily the same as the original sequence, because it is not required to restore the arrangement order of the random numbers.

[0090] S8. Output a subsequence representing sensitive data in the fourth sequence.

[0091] Specifically, if the third sequence is the same as the first sequence, the subsequence representing the sensitive data in the fourth sequence is the same as the sensitive data; if the third sequence is different from the first sequence, the subsequence representing the sensitive data in the fourth sequence is different from the sensitive data, and it cannot be used normally.

[0092] Therefore, in this embodiment, when writing, the sensitive data is encrypted in two dimensions: byte order disruption and byte content conversion. The sensitive data is mixed with the newly generated random number to form an original sequence. The byte order disruption and byte content conversion are performed successively, and the result is written to the storage medium. When reading, the byte content is first restored to obtain the mixed and disrupted sensitive data and random numbers, and then the byte order is restored to strip the random numbers to obtain the sensitive data. The random numbers do not need to be used during the reading process, so the random numbers do not need to be stored during the writing process, avoiding the risk of the loss of the random number key causing the inability to decrypt the sensitive data and the leakage of the stored random number key. Through this embodiment, the unpredictability of random numbers can be used to improve the security of data encryption, and there is no need to store random numbers for data decryption, thereby improving the reliability of sensitive data storage.

[0093] Figure 3 It shows a schematic diagram of the operation of a sensitive data storage method in another embodiment of the present application;

[0094] Reference Figure 3 ,Further, in one embodiment, the original sequence also includes a first characteristic value, and the first characteristic value is a hash value of a chip ID of a storage medium to which the sensitive data is to be written;

[0095] The step of outputting the subsequence representing sensitive data in the fourth sequence comprises:

[0096] If the subsequence representing the first characteristic value in the fourth sequence is the same as the second characteristic value, the reading is judged to be successful and the subsequence representing the sensitive data in the fourth sequence is output; otherwise, the reading is judged to be failed, wherein the second characteristic value is the hash value of the chip ID of the storage medium where the second sequence is located.

[0097] In this embodiment, the hash value of the chip ID of the storage medium to which the sensitive data is to be written is also mixed into the original sequence, recorded as the first characteristic value. According to the rule of byte order scrambling, it is also necessary to be able to distinguish the bytes belonging to the first characteristic value and restore the arrangement order of the first characteristic value. The chip ID is a unique identifier that comes with the chip and can be queried when needed. The chip IDs of different chips are different. The hash operation converts the chip ID into a fixed-length sequence while maintaining its uniqueness for subsequent processing.

[0098] Specifically, if the subsequence representing the first characteristic value in the fourth sequence is different from the second characteristic value, it either means that there is a problem in the process of restoring the byte content and the byte order, in which case the subsequence representing the sensitive data in the fourth sequence is different from the sensitive data and cannot be used normally, or it means that the second sequence in the current storage medium is not directly obtained based on the write instruction of the sensitive data, but is copied from other storage media, which poses a security risk, so it is judged that the reading fails, and the subsequence representing the sensitive data in the fourth sequence is not output. Through this embodiment, the reliability and security of data reading can be improved.

[0099] Further, in one embodiment, continue to refer to Figure 3 , after the step of determining that the reading is successful and outputting the subsequence representing the sensitive data in the fourth sequence, the method further includes:

[0100] Generate an update sequence, wherein the update sequence includes a subsequence representing sensitive data in the fourth sequence, a newly generated random number, and a second characteristic value;

[0101] The byte order of the update sequence is disrupted to obtain a fifth sequence;

[0102] Performing byte content conversion on the fifth sequence to obtain a sixth sequence;

[0103] The sixth sequence is overwritten into the storage medium as a new second sequence.

[0104] In this embodiment, when the reading is successful, the newly generated random number ( Figure 3 The second random number in the storage medium) and the second characteristic value are the hash values ​​of the chip ID of the storage medium where the second sequence is located, and then the byte order is disrupted and the byte content is converted to obtain the sixth sequence. Since the second random number is different from the first random number, the sixth sequence must be different from the second sequence. Through this embodiment, the second sequence is updated after each successful reading of sensitive data, and dynamic defense is achieved, making it difficult for attackers to infer the original form of encryption keys or sensitive data by repeatedly reading and analyzing encrypted data.

[0105] Figure 4 A schematic diagram of the operations of byte content conversion and byte content restoration in an embodiment of the present application is shown.

[0106] Reference Figure 4 Further, in one embodiment, the step of converting the byte content of the first sequence to obtain the second sequence includes:

[0107] Performing a preset operation on the first sequence to obtain a seventh sequence;

[0108] Using the first characteristic value as a key, an XOR operation is performed on the seventh sequence to obtain a second sequence, wherein the first characteristic value is a hash value of a chip ID of a storage medium into which sensitive data is to be written;

[0109] The step of performing byte content restoration on the second sequence to obtain a third sequence comprises:

[0110] An eighth sequence is obtained by performing an XOR operation on the second sequence using the second characteristic value as a key, wherein the second characteristic value is a hash value of a chip ID of a storage medium where the second sequence is located;

[0111] The third sequence is obtained by performing an inverse operation of the preset operation on the eighth sequence.

[0112] In this embodiment, an XOR operation using the first characteristic value as a key is used as the last step of byte content conversion, and an XOR operation using the second characteristic value as a key is used as the first step of byte content restoration, thereby ensuring that the second sequence can only be successfully read in the storage medium where the sensitive data was originally written, and cannot be successfully read in other copied storage media, thereby improving the security of data storage.

[0113] It should be noted that byte content conversion and byte content restoration may only include an XOR operation, that is, the preset operation and its inverse operation are directly output, the seventh sequence is the same as the first sequence, and the eighth sequence is the same as the third sequence.

[0114] Furthermore, in one embodiment, the step of performing a preset operation on the first sequence to obtain the seventh sequence includes:

[0115] When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the seventh sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the seventh sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence;

[0116] When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the seventh sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the seventh sequence, and the middle byte of the first sequence is used as the last byte of the seventh sequence, where y is any positive integer in the range of [1, (N-1) / 2];

[0117] The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises:

[0118] When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the third sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the third sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence;

[0119] When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the third sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the third sequence, and the last byte of the eighth sequence is used as the middle byte of the third sequence, where q is each positive integer in the range of [1, (M-1) / 2].

[0120] In this embodiment, during the byte content conversion process, the first sequence is first converted into the seventh sequence by scrambling the character bits, and then the seventh sequence is converted into the second sequence by an XOR operation. During the byte content restoration process, the second sequence is first converted into the eighth sequence by an XOR operation, and then the eighth sequence is converted into the third sequence by inverse character bit conversion, which increases the complexity of the data and makes cracking more difficult.

[0121] By way of example, assuming that the number of bytes of the first sequence and the eighth sequence is 48 bytes, the upper 4 bits of the first byte of the first sequence are combined with the lower 4 bits of the 48th byte to form the first byte of the seventh sequence, the lower 4 bits of the first byte of the first sequence are combined with the upper 4 bits of the 48th byte to form the second byte of the seventh sequence, the upper 4 bits of the second byte of the first sequence are combined with the lower 4 bits of the 47th byte to form the third byte of the seventh sequence, the lower 4 bits of the second byte of the first sequence are combined with the upper 4 bits of the 47th byte to form the fourth byte of the seventh sequence, ..., the upper 4 bits of the 24th byte of the first sequence are combined with the lower 4 bits of the 25th byte to form the 47th byte of the seventh sequence, and the lower 4 bits of the 24th byte of the first sequence are combined with the upper 4 bits of the 25th byte to form the 48th byte of the seventh sequence.

[0122] The high 4 bits of the first byte of the eighth sequence are combined with the low 4 bits of the second byte to form the first byte of the third sequence, the low 4 bits of the first byte of the eighth sequence are combined with the high 4 bits of the second byte to form the 48th byte of the third sequence, the high 4 bits of the third byte of the eighth sequence are combined with the low 4 bits of the fourth byte to form the second byte of the third sequence, the low 4 bits of the third byte of the eighth sequence are combined with the high 4 bits of the fourth byte to form the 47th byte of the third sequence, ..., the high 4 bits of the 47th byte of the eighth sequence are combined with the low 4 bits of the 48th byte to form the 24th byte of the third sequence, and the low 4 bits of the 47th byte of the eighth sequence are combined with the high 4 bits of the 48th byte to form the 25th byte of the third sequence.

[0123] By way of example, assuming that the number of bytes of the first sequence and the eighth sequence is 47 bytes, the upper 4 bits of the first byte of the first sequence are combined with the lower 4 bits of the 47th byte to form the first byte of the seventh sequence, the lower 4 bits of the first byte of the first sequence are combined with the upper 4 bits of the 47th byte to form the second byte of the seventh sequence, the upper 4 bits of the second byte of the first sequence are combined with the lower 4 bits of the 46th byte to form the third byte of the seventh sequence, the lower 4 bits of the second byte of the first sequence are combined with the upper 4 bits of the 46th byte to form the fourth byte of the seventh sequence, ..., the upper 4 bits of the 23rd byte of the first sequence are combined with the lower 4 bits of the 25th byte to form the 45th byte of the seventh sequence, the lower 4 bits of the 23rd byte of the first sequence are combined with the upper 4 bits of the 25th byte to form the 46th byte of the seventh sequence, and the 24th byte of the first sequence is used as the 47th byte of the seventh sequence.

[0124] Combine the high 4 bits of the first byte of the eighth sequence with the low 4 bits of the second byte to form the first byte of the third sequence, combine the low 4 bits of the first byte of the eighth sequence with the high 4 bits of the second byte to form the 46th byte of the third sequence, combine the high 4 bits of the third byte of the eighth sequence with the low 4 bits of the fourth byte to form the second byte of the third sequence, combine the low 4 bits of the third byte of the eighth sequence with the high 4 bits of the fourth byte to form the 45th byte of the third sequence, ..., combine the high 4 bits of the 45th byte of the eighth sequence with the low 4 bits of the 46th byte to form the 23rd byte of the third sequence, combine the low 4 bits of the 45th byte of the eighth sequence with the high 4 bits of the 46th byte to form the 25th byte of the third sequence, and use the 47th byte of the eighth sequence as the 24th byte of the third sequence.

[0125] Furthermore, in one embodiment, the step of performing a preset operation on the first sequence to obtain the seventh sequence includes:

[0126] The sum of the maximum value and the minimum value in the first sequence is used as the first reference value, and the difference between the first reference value and each byte of the first sequence is used as each byte of the seventh sequence;

[0127] The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises:

[0128] The sum of the maximum value and the minimum value in the eighth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the eighth sequence is taken as each byte of the third sequence.

[0129] In this embodiment, during the byte content conversion process, the first sequence is first converted into the seventh sequence through a difference operation, and then the seventh sequence is converted into the second sequence through an XOR operation. During the byte content restoration process, the second sequence is first converted into the eighth sequence through an XOR operation, and then the eighth sequence is converted into the third sequence through an inverse difference operation, which increases the complexity of the data and makes cracking more difficult.

[0130] For example, assuming that the decimal representation of the first sequence is 5, 4, 2, 9, 6, 3, the maximum value in the first sequence is 9, the minimum value is 2, and the first reference value is 11, the decimal representation of the seventh sequence is 6, 7, 9, 2, 5, 8. Assuming that the eighth sequence is the same as the seventh sequence, the maximum value in the eighth sequence is 9, the minimum value is 2, and the second reference value is 11, which is equal to the first reference value. The decimal representation of the third sequence is 5, 4, 2, 9, 6, 3, which is the same as the first sequence.

[0131] Figure 5 A schematic diagram of the operations of byte content conversion and byte content restoration in another embodiment of the present application is shown.

[0132] Reference Figure 5 Further, in one embodiment, the step of performing a preset operation on the first sequence to obtain the seventh sequence includes:

[0133] When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the ninth sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the ninth sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence;

[0134] When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the ninth sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the ninth sequence, and the middle byte of the first sequence is used as the last byte of the ninth sequence, where y is any positive integer in the range of [1, (N-1) / 2];

[0135] The sum of the maximum value and the minimum value in the ninth sequence is used as the first reference value, and the difference between the first reference value and each byte of the ninth sequence is used as each byte of the seventh sequence;

[0136] The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises:

[0137] When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the tenth sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the tenth sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence;

[0138] When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the tenth sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the tenth sequence, and the last byte of the eighth sequence is used as the middle byte of the tenth sequence, where q is a positive integer in the range of [1, (M-1) / 2];

[0139] The sum of the maximum value and the minimum value in the tenth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the tenth sequence is taken as each byte of the third sequence.

[0140] In this embodiment, during the byte content conversion process, the first sequence is first converted into the ninth sequence by word bit scrambling, and then the ninth sequence is converted into the seventh sequence by difference operation, and finally the seventh sequence is converted into the second sequence by XOR operation. During the byte content restoration process, the second sequence is first converted into the eighth sequence by XOR operation, and then the eighth sequence is converted into the tenth sequence by inverse difference operation, and finally the tenth sequence is converted into the third sequence by inverse word bit scrambling, which increases the complexity of the data and makes cracking more difficult.

[0141] In a second aspect, an embodiment of the present application also provides a sensitive data storage device.

[0142] Figure 6 A schematic diagram of the functional modules of a sensitive data storage device in one embodiment of the present application is shown.

[0143] Reference Figure 6 ,In one embodiment, the sensitive data storage device includes a write preparation module 10, a sequence operation module 20, a content operation module 30, a write execution module 40, a read preparation module 50 and a read execution module 60;

[0144] The write preparation module 10 is used to generate an original sequence based on the write instruction of the sensitive data, and send the original sequence to the sequential operation module 20, wherein the original sequence includes the sensitive data and the newly generated random number;

[0145] The sequence operation module 20 is used to disrupt the byte order of the original sequence to obtain a first sequence, and send the first sequence to the content operation module 30;

[0146] The content operation module 30 is used to perform byte content conversion on the first sequence to obtain a second sequence, and send the second sequence to the write execution module 40;

[0147] The write execution module 40 is used to write the second sequence into the storage medium;

[0148] The reading preparation module 50 is used to obtain the second sequence from the storage medium based on the sensitive data reading instruction, and send the second sequence to the content operation module 30;

[0149] The content operation module 30 is further used to perform byte content restoration on the second sequence to obtain a third sequence, and send the third sequence to the sequence operation module 20;

[0150] The sequence operation module 20 is further used to restore the byte order of the third sequence to obtain a fourth sequence, and send the fourth sequence to the read execution module 10;

[0151] The read execution module 60 is used to output the subsequence representing the sensitive data in the fourth sequence.

[0152] Furthermore, in one embodiment, the original sequence further includes a first characteristic value, which is a hash value of a chip ID of a storage medium to which the sensitive data is to be written;

[0153] The read execution module 60 is used to judge that the read is successful and output the subsequence representing the sensitive data in the fourth sequence if the subsequence representing the first characteristic value in the fourth sequence is the same as the second characteristic value, otherwise judge that the read fails, wherein the second characteristic value is the hash value of the chip ID of the storage medium where the second sequence is located.

[0154] Further, in one embodiment, the read execution module 60 is further configured to send the subsequence representing sensitive data in the fourth sequence to the write preparation module 10 after determining that the read is successful;

[0155] The write preparation module 10 is further used to generate an update sequence and send the update sequence to the sequential operation module 20, wherein the update sequence includes a subsequence representing sensitive data in the fourth sequence, a newly generated random number, and a second characteristic value;

[0156] The sequence operation module 20 is further used to disrupt the byte order of the update sequence to obtain a fifth sequence, and send the fifth sequence to the content operation module 30;

[0157] The content operation module 30 is further used to perform byte content conversion on the fifth sequence to obtain a sixth sequence, and send the sixth sequence to the write execution module 40;

[0158] The write execution module 40 is further configured to write the sixth sequence as a new second sequence into the storage medium.

[0159] Furthermore, in one embodiment, the content operation module 30 is used to:

[0160] Performing a preset operation on the first sequence to obtain a seventh sequence;

[0161] Using the first characteristic value as a key, an XOR operation is performed on the seventh sequence to obtain a second sequence, wherein the first characteristic value is a hash value of a chip ID of a storage medium into which the sensitive data is to be written;

[0162] An eighth sequence is obtained by performing an XOR operation on the second sequence using the second characteristic value as a key, wherein the second characteristic value is a hash value of a chip ID of a storage medium where the second sequence is located;

[0163] The third sequence is obtained by performing an inverse operation of the preset operation on the eighth sequence.

[0164] Furthermore, in one embodiment, the content operation module 30 is used to:

[0165] When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the seventh sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the seventh sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence;

[0166] When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the seventh sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the seventh sequence, and the middle byte of the first sequence is used as the last byte of the seventh sequence, where y is any positive integer in the range of [1, (N-1) / 2];

[0167] When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the third sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the third sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence;

[0168] When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the third sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the third sequence, and the last byte of the eighth sequence is used as the middle byte of the third sequence, where q is each positive integer in the range of [1, (M-1) / 2].

[0169] Furthermore, in one embodiment, the content operation module 30 is used to:

[0170] The sum of the maximum value and the minimum value in the first sequence is used as the first reference value, and the difference between the first reference value and each byte of the first sequence is used as each byte of the seventh sequence;

[0171] The sum of the maximum value and the minimum value in the eighth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the eighth sequence is taken as each byte of the third sequence.

[0172] Furthermore, in one embodiment, the content operation module 30 is used to:

[0173] When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the ninth sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the ninth sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence;

[0174] When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the ninth sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the ninth sequence, and the middle byte of the first sequence is used as the last byte of the ninth sequence, where y is any positive integer in the range of [1, (N-1) / 2];

[0175] The sum of the maximum value and the minimum value in the ninth sequence is used as the first reference value, and the difference between the first reference value and each byte of the ninth sequence is used as each byte of the seventh sequence;

[0176] When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the tenth sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the tenth sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence;

[0177] When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the tenth sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the tenth sequence, and the last byte of the eighth sequence is used as the middle byte of the tenth sequence, where q is a positive integer in the range of [1, (M-1) / 2];

[0178] The sum of the maximum value and the minimum value in the tenth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the tenth sequence is taken as each byte of the third sequence.

[0179] Among them, the functional implementation of each module in the above-mentioned sensitive data storage device corresponds to each step in the above-mentioned sensitive data storage method embodiment, and its functions and implementation processes are no longer repeated here one by one.

[0180] In a third aspect, an embodiment of the present application provides a sensitive data storage device, which may be a personal computer (PC), a laptop computer, a server, or other device with data processing capabilities.

[0181] Figure 7 A schematic diagram of the hardware structure of a sensitive data storage device involved in an embodiment of the present application is shown.

[0182] Reference Figure 7In an embodiment of the present application, the sensitive data storage device may include a processor, a memory, a communication interface, and a communication bus.

[0183] The communication bus may be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0184] Communication interfaces include input / output (I / O) interfaces, physical interfaces, and logical interfaces, which are used to interconnect devices within sensitive data storage devices, as well as interfaces used to interconnect sensitive data storage devices with other devices (such as other computing devices or user devices). Physical interfaces can be Ethernet interfaces, optical fiber interfaces, ATM interfaces, etc.; user devices can be display screens (Display), keyboards (Keyboard), etc.

[0185] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0186] The processor may be a general-purpose processor, which may call the sensitive data storage program stored in the memory and execute the sensitive data storage method provided in the embodiment of the present application. For example, the general-purpose processor may be a central processing unit (CPU). The method executed when the sensitive data storage program is called may refer to the various embodiments of the sensitive data storage method of the present application, which will not be described in detail here.

[0187] Those skilled in the art will understand that Figure 7 The hardware structure shown in the figure does not constitute a limitation on the present application, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0188] In a fourth aspect, an embodiment of the present application also provides a readable storage medium.

[0189] The readable storage medium of the present application stores a sensitive data storage program, wherein when the sensitive data storage program is executed by a processor, the steps of the sensitive data storage method as described above are implemented.

[0190] Among them, the method implemented when the sensitive data storage program is executed can refer to the various embodiments of the sensitive data storage method of the present application, and will not be repeated here.

[0191] It should be noted that the serial numbers of the above-mentioned embodiments of the present application are only for description and do not represent the advantages or disadvantages of the embodiments.

[0192] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices. The terms "first", "second" and "third" are used to distinguish different objects, etc., and do not represent a sequence, nor do they limit "first", "second" and "third" to different types.

[0193] In the description of the embodiments of the present application, "exemplary", "for example" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a specific way.

[0194] In the description of the embodiments of the present application, unless otherwise specified, “ / ” means or, for example, A / B can mean A or B; the “and / or” in the text is merely a description of the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, “multiple” refers to two or more than two.

[0195] In some processes described in the embodiments of the present application, multiple operations or steps that appear in a specific order are included, but it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or in parallel, and the sequence number of the operation is only used to distinguish the different operations, and the sequence number itself does not represent any execution order. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in sequence or in parallel, and these operations or steps may be combined.

[0196] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD) as described above, and includes a number of instructions for a terminal device to execute the methods described in each embodiment of the present application.

[0197] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A sensitive data storage method, characterized in that: The sensitive data storage method comprises: Generate an original sequence based on a write instruction of the sensitive data, wherein the original sequence includes the sensitive data and a newly generated random number; The byte order of the original sequence is disrupted to obtain a first sequence; Performing byte content conversion on the first sequence to obtain a second sequence; writing the second sequence to a storage medium; Retrieving a second sequence from the storage medium based on a read instruction of the sensitive data; Perform byte content restoration on the second sequence to obtain a third sequence; Restoring the byte order of the third sequence to obtain a fourth sequence; Output the subsequence representing the sensitive data in the fourth sequence.

2. The sensitive data storage method according to claim 1, characterized in that: The original sequence also includes a first characteristic value, which is a hash value of a chip ID of a storage medium to which the sensitive data is to be written; The step of outputting a subsequence representing sensitive data in the fourth sequence comprises: If the subsequence representing the first characteristic value in the fourth sequence is the same as the second characteristic value, the reading is judged to be successful and the subsequence representing the sensitive data in the fourth sequence is output; otherwise, the reading is judged to be failed, wherein the second characteristic value is the hash value of the chip ID of the storage medium where the second sequence is located.

3. The sensitive data storage method according to claim 2, characterized in that: After the step of determining that the reading is successful and outputting the subsequence representing the sensitive data in the fourth sequence, the following step is further included: Generate an update sequence, wherein the update sequence includes a subsequence representing sensitive data in the fourth sequence, a newly generated random number, and a second characteristic value; The byte order of the update sequence is disrupted to obtain a fifth sequence; Performing byte content conversion on the fifth sequence to obtain a sixth sequence; The sixth sequence is overwritten into the storage medium as a new second sequence.

4. The sensitive data storage method according to any one of claims 1 to 3, characterized in that: The step of converting the byte content of the first sequence to obtain the second sequence comprises: Performing a preset operation on the first sequence to obtain a seventh sequence; Using the first characteristic value as a key, an XOR operation is performed on the seventh sequence to obtain a second sequence, wherein the first characteristic value is a hash value of a chip ID of a storage medium into which the sensitive data is to be written; The step of performing byte content restoration on the second sequence to obtain a third sequence comprises: An eighth sequence is obtained by performing an XOR operation on the second sequence using the second characteristic value as a key, wherein the second characteristic value is a hash value of a chip ID of a storage medium where the second sequence is located; The third sequence is obtained by performing an inverse operation of the preset operation on the eighth sequence.

5. The sensitive data storage method according to claim 4, characterized in that: The step of performing a preset operation on the first sequence to obtain the seventh sequence comprises: When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the seventh sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the seventh sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence; When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the seventh sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the seventh sequence, and the middle byte of the first sequence is used as the last byte of the seventh sequence, where y is any positive integer in the range of [1, (N-1) / 2]; The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises: When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the third sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the third sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence; When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the third sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the third sequence, and the last byte of the eighth sequence is used as the middle byte of the third sequence, where q is each positive integer in the range of [1, (M-1) / 2].

6. The sensitive data storage method according to claim 4, characterized in that: The step of performing a preset operation on the first sequence to obtain the seventh sequence comprises: The sum of the maximum value and the minimum value in the first sequence is used as the first reference value, and the difference between the first reference value and each byte of the first sequence is used as each byte of the seventh sequence; The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises: The sum of the maximum value and the minimum value in the eighth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the eighth sequence is taken as each byte of the third sequence.

7. The sensitive data storage method according to claim 4, characterized in that: The step of performing a preset operation on the first sequence to obtain the seventh sequence comprises: When the number of bytes in the first sequence is an even number, the upper 4 bits of the xth byte of the first sequence are combined with the lower 4 bits of the xth byte from the end to form the 2x-1th byte of the ninth sequence, and the lower 4 bits of the xth byte of the first sequence are combined with the upper 4 bits of the xth byte from the end to form the 2xth byte of the ninth sequence, where x is any positive integer in the range of [1, N / 2], and N is the number of bytes in the first sequence; When the number of bytes in the first sequence is an odd number, the upper 4 bits of the yth byte of the first sequence are combined with the lower 4 bits of the yth last byte to form the 2y-1th byte of the ninth sequence, the lower 4 bits of the yth byte of the first sequence are combined with the upper 4 bits of the yth last byte to form the 2yth byte of the ninth sequence, and the middle byte of the first sequence is used as the last byte of the ninth sequence, where y is any positive integer in the range of [1, (N-1) / 2]; The sum of the maximum value and the minimum value in the ninth sequence is used as the first reference value, and the difference between the first reference value and each byte of the ninth sequence is used as each byte of the seventh sequence; The step of performing an inverse operation of a preset operation on the eighth sequence to obtain a third sequence comprises: When the number of bytes in the eighth sequence is an even number, the upper 4 bits of the 2p-1th byte of the eighth sequence are combined with the lower 4 bits of the 2pth byte to form the pth byte of the tenth sequence, and the lower 4 bits of the 2p-1th byte of the eighth sequence are combined with the upper 4 bits of the 2pth byte to form the pth byte from the end of the tenth sequence, where p is any positive integer in the range of [1, M / 2], and M is the number of bytes in the eighth sequence; When the number of bytes in the eighth sequence is an odd number, the upper 4 bits of the 2q-1th byte of the eighth sequence are combined with the lower 4 bits of the 2qth byte to form the qth byte of the tenth sequence, the lower 4 bits of the 2q-1th byte of the eighth sequence are combined with the upper 4 bits of the 2qth byte to form the last q+1th byte of the tenth sequence, and the last byte of the eighth sequence is used as the middle byte of the tenth sequence, where q is a positive integer in the range of [1, (M-1) / 2]; The sum of the maximum value and the minimum value in the tenth sequence is taken as the second reference value, and the difference between the second reference value and each byte of the tenth sequence is taken as each byte of the third sequence.

8. A sensitive data storage device, characterized in that: The sensitive data storage device comprises a write preparation module, a sequence operation module, a content operation module, a write execution module, a read preparation module and a read execution module; The write preparation module is used to generate an original sequence based on the write instruction of the sensitive data, and send the original sequence to the sequential operation module, wherein the original sequence includes the sensitive data and the newly generated random number; The sequence operation module is used to disrupt the byte order of the original sequence to obtain a first sequence, and send the first sequence to the content operation module; The content operation module is used for performing byte content conversion on the first sequence to obtain a second sequence, and sending the second sequence to the write execution module; The write execution module is used to write the second sequence into the storage medium; The read preparation module is used to obtain the second sequence from the storage medium based on the read instruction of the sensitive data, and send the second sequence to the content operation module; The content operation module is further used to perform byte content restoration on the second sequence to obtain a third sequence, and send the third sequence to the sequence operation module; The sequential operation module is further used to restore the byte order of the third sequence to obtain a fourth sequence, and send the fourth sequence to the read execution module; The read execution module is used to output a subsequence representing sensitive data in the fourth sequence.

9. A sensitive data storage device, characterized in that: The sensitive data storage device includes a processor, a memory, and a sensitive data storage program stored in the memory and executable by the processor, wherein when the sensitive data storage program is executed by the processor, the steps of the sensitive data storage method as described in any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a sensitive data storage program, wherein when the sensitive data storage program is executed by a processor, the steps of the sensitive data storage method according to any one of claims 1 to 7 are implemented.