CN114490452A - Data management method and device for embedded flash memory and control chip - Google Patents

Data management method and device for embedded flash memory and control chip Download PDF

Info

Publication number
CN114490452A
CN114490452A CN202210118615.9A CN202210118615A CN114490452A CN 114490452 A CN114490452 A CN 114490452A CN 202210118615 A CN202210118615 A CN 202210118615A CN 114490452 A CN114490452 A CN 114490452A
Authority
CN
China
Prior art keywords
data
flash memory
check
embedded flash
insertion logic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210118615.9A
Other languages
Chinese (zh)
Inventor
彭程
庄腾飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yspring Technology Co ltd
Original Assignee
Shenzhen Yspring Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yspring Technology Co ltd filed Critical Shenzhen Yspring Technology Co ltd
Priority to CN202210118615.9A priority Critical patent/CN114490452A/en
Publication of CN114490452A publication Critical patent/CN114490452A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/14Protection against unauthorised use of memory or access to memory
    • G06F12/1408Protection against unauthorised use of memory or access to memory by using cryptography

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)

Abstract

The embodiment of the application provides a data management method, a device and a control chip for an embedded flash memory, wherein the method comprises the following steps: obtaining effective data to be stored and an encryption configuration instruction; determining the position insertion logic of the current verification data according to the encryption configuration instruction, and generating the verification data based on Hamming codes by using the position insertion logic and the effective data; inserting the check data into the valid data according to the position insertion logic to obtain encrypted combined data; and storing the encrypted combined data and the encryption related information in the embedded flash memory in an associated manner. The method can greatly improve the confidentiality of the stored data and the like by inserting the logic into the position of the check data in the Hamming code to perform configurable operation.

Description

Data management method and device for embedded flash memory and control chip
Technical Field
The present application relates to the field of data storage technologies, and in particular, to a data management method and apparatus for an embedded flash memory, and a control chip.
Background
Flash (Flash) is a non-volatile memory, for example, used for storing program codes and storing data, and is widely used in various fields, including Microprocessor (MCU) chip design, and is also called embedded Flash (e Flash). Stable maintenance of data in the eFlash and security of the data need to be guaranteed more effectively. The existing encryption mode generally includes hamming code encryption and the like, however, when hamming code encryption is performed, the position of the encrypted check code is always fixed, once data is stolen, the data is easy to be decrypted, and the data security is not high.
Disclosure of Invention
In view of this, embodiments of the present application provide a data management method and apparatus for an embedded flash memory, and a control chip.
In a first aspect, an embodiment of the present application provides a data management method for an embedded flash memory, including:
obtaining effective data to be stored and an encryption configuration instruction;
determining the position insertion logic of the current verification data according to the encryption configuration instruction, and generating the verification data based on Hamming codes by using the position insertion logic and the effective data;
inserting the check data into the effective data according to the position insertion logic to obtain encrypted combined data;
and storing the encrypted combined data and the encryption related information into the embedded flash memory in an associated manner.
In some embodiments, the data management method for an embedded flash memory further includes:
reading the encrypted combined data and the associated encryption related information, and determining the position insertion logic corresponding to the encrypted combined data according to the encryption related information;
and carrying out Hamming decryption on the encrypted combined data according to the position insertion logic to obtain the effective data.
In some embodiments, the position insertion logic includes insertion positions of respective check codes in the check data in the encrypted combined data to be solved, and the generating the check data based on hamming encoding by using the position insertion logic and the valid data includes:
according to the insertion position of each check code, obtaining encrypted combined data to be solved, which is formed by combining a plurality of unknown check codes and the effective data;
obtaining a binary index of each bit of data in the encrypted combined data to be solved;
grouping the encrypted combined data to be solved based on a binary index according to a rule that each group of groups only contains 1 bit of unknown check codes to obtain a plurality of groups;
and respectively determining the values of the unknown check codes in each group according to the rule that the number of the '1' in each group is an even number, wherein the check codes with known values jointly form the check data.
In some embodiments, each of the location insertion logic inserts no more than two parity codes consecutively at the same location; the position insertion logic is not included in 2NAnd inserting corresponding data bits into each check code respectively, wherein N is an integer greater than or equal to 0.
In some embodiments, the number of bits of the parity data and the number of bits of the valid data to be stored satisfy the following relationship:
2r>=n+1;
wherein r represents the minimum number of bits of the required check code, and n represents the number of bits of the valid data.
In some embodiments, the correspondence between the insertion logic at different positions of the verification data and different encryption configuration instructions is implemented by a programmable logic device.
In a second aspect, an embodiment of the present application further provides a data management apparatus for an embedded flash memory, including:
the acquisition module is used for acquiring effective data to be stored and an encryption configuration instruction;
the verification generation module is used for determining the position insertion logic of the current verification data according to the encryption configuration instruction and generating the verification data by utilizing the position insertion logic and the effective data based on Hamming codes;
the encryption recombination module is used for inserting the check data into the effective data according to the position insertion logic to obtain encrypted combined data;
and the storage module is used for storing the encrypted combined data and the encryption related information into the embedded flash memory in an associated manner.
In some embodiments, the data management apparatus for an embedded flash memory further comprises:
a reading module, configured to read the encrypted combined data and the encryption related information, and determine the position insertion logic corresponding to the encrypted combined data according to the encryption related information;
and the data decryption module is used for carrying out Hamming decryption on the combined data according to the position insertion logic to obtain the effective data.
In a third aspect, an embodiment of the present application further provides a control chip, which includes an embedded flash memory, a memory and a processor, where the embedded flash memory is used to access encrypted combined data, the memory is used to store a computer program, and when the computer program runs on the processor, the control chip executes the above-mentioned data management method for the embedded flash memory.
In a fourth aspect, an embodiment of the present application further provides a readable storage medium, which stores a computer program, where the computer program, when executed on a processor, implements the above-mentioned data management method for an embedded flash memory.
The embodiment of the application has the following beneficial effects:
the data management method for the embedded flash memory of the embodiment of the application acquires effective data to be stored and an encryption configuration instruction; then, determining the position insertion logic of the current verification data according to the encryption configuration instruction, and generating the verification data by using the position insertion logic and the effective data based on Hamming codes; finally, inserting the check data into the effective data according to the position insertion logic to obtain encrypted combined data; and stores the encrypted combined data and the encryption related information in the embedded flash memory in an associated manner. The method carries out configurable operation by inserting logic into the position of the check data in the Hamming code, and carries out data encryption based on the Hamming code coding principle, so that under the condition that the original Hamming code logic is not required to be modified, the check code is not the original fixed position any more, the cracking difficulty can be increased in the decryption process, the confidentiality of stored data can be greatly improved, and the reliability of data writing and reading can be more effectively ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
FIG. 1 shows a first flowchart of a data management method for an embedded flash memory according to an embodiment of the present application;
FIG. 2 shows a flow diagram of verification data generation in an embodiment of the application;
FIG. 3 is a system architecture diagram illustrating a data management method for an embedded flash memory according to an embodiment of the present application;
FIG. 4 shows a second flowchart of a data management method for an embedded flash memory according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a first structure of a data management apparatus for an embedded flash memory according to an embodiment of the present application;
FIG. 6 is a schematic diagram illustrating a second structure of a data management apparatus for an embedded flash memory according to an embodiment of the present application;
fig. 7 shows a schematic structural diagram of a control chip according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.
Hereinafter, the terms "including", "having", and their derivatives, which may be used in various embodiments of the present application, are intended to indicate only specific features, numerals, steps, operations, elements, components, or combinations of the foregoing, and should not be construed as first excluding the presence of or adding to one or more other features, numerals, steps, operations, elements, components, or combinations of the foregoing.
Furthermore, the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application belong. The terms (such as those defined in commonly used dictionaries) should be interpreted as having a meaning that is consistent with their contextual meaning in the relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein in various embodiments.
The existing Hamming code coding algorithm is in the N power of 2 (namely 2)N) And inserting the corresponding data bits into each check code in sequence, wherein N is an integer greater than or equal to 0. Specifically, the 1 st bit (i.e., corresponding to 2) in the combined data0) 2 nd bit (i.e. corresponding to 2)1) Position 4 (i.e. corresponding to 2)2) 8 th bit (i.e. corresponding to 2)3) And 16 th bit (i.e., corresponding to 2)4) And inserting a check code into each of the positions, wherein the check codes can be used for encrypting the valid data and correcting any 1-bit error data. It can be known that the existing hamming code codes are all inserting check codes at fixed positions, which results in that once other people obtain the encrypted combined data, the original valid data can be easily recovered, thereby stealing the corresponding valid information.
To this end, the embodiment of the present application provides a data management method for an embedded flash memory, which is based on the principle of hamming code encoding, and performs configurable operation on the position insertion logic of check data, so that the check data are no longer fixed in data bits corresponding to the power N of 2, but can be specified by a user or can be dynamically configured. In the decryption process, although the Hamming code is used for decryption, other people do not know the specific positions of the check codes, so that the decryption difficulty is greatly increased, namely the confidentiality of stored data can be improved by improving the existing Hamming code coding. The data management method for the embedded flash memory will be described in detail below.
Referring to fig. 1, an embodiment of the present application provides a data management method for an embedded flash memory, which can be applied to data access of a Microprocessor (MCU) chip, a system on chip (SoC) chip, and the like.
Exemplarily, the data management method for the embedded flash memory includes steps S110 to S140:
s110, obtaining effective data to be stored and an encryption configuration instruction.
In this embodiment, based on the principle of hamming code encoding, the insertion positions of the verification data in the hamming code are configurable, and then the re-encoding is performed by using insertion position logic with a rule different from that of the insertion positions of the traditional hamming code encoding, so as to generate the verification data.
The encryption configuration instruction and the position insertion logic of the check data for encrypting the valid data have a one-to-one correspondence relationship, that is, one position insertion logic corresponds to one encryption configuration instruction. For example, a control chip may store a plurality of location insertion logics, and a user may select one of the locations to perform encryption storage according to storage needs, or may change another logic to perform encryption at regular intervals, thereby improving security of stored data. It can be understood that the above correspondence may be stored in advance, so that when the actual valid data is encrypted, the location insertion logic of the storage operation may be determined according to the input encryption configuration command.
For example, in one embodiment, the number of bits of the configuration field in the encryption configuration instruction may be determined according to the number of the location insertion logic, for example, when there are 3 or 4 types of location insertion logic, the configuration field sel may be represented by two bits (i.e., sel [ 1: 0]), for example, sel ═ 00, the first type of location insertion logic is selected; when sel is 01, selecting a second position to insert logic; and so on. It is understood that if there are at least 5 location insertion logics, the configuration field can be represented with a greater number of bits.
It is understood that the number of bits of the check data in the present embodiment is related to the number of bits of the valid data to be stored. For example, in one embodiment, the number of bits of the parity data and the number of bits of the valid data to be stored may satisfy the following relationship:
2r>=n+1;
where r represents the minimum number of bits of the required check code and n represents the number of bits of the valid data.
For example, when the valid data is 16 bits, at least 5 bits of check code are required; when the valid data is 32 bits, at least 6 bits of check code are needed; when the valid data is 64 bits, at least 9 bits of check code are required. It is to be understood that the number of bits of the valid data is not limited to an even number, but may be an odd number such as 7 bits, 13 bits, 15 bits, 31 bits, and the like, and is not limited herein. It will be appreciated that the total number of bits of the combined data after encryption is then equal to the sum of the number of bits of the valid data and the minimum number of bits of the required check code.
And S120, determining the position insertion logic of the current verification data according to the encryption configuration instruction, and generating the verification data based on Hamming codes by using the position insertion logic and the effective data.
Exemplarily, since there is a correspondence between the encryption configuration command and the position insertion logic of the verification data, after the encryption configuration command is known, the current position insertion logic may be determined by querying the correspondence. Furthermore, according to the insertion positions of the check codes, the specific values of the check codes can be further calculated by using the encoding principle of the Hamming code.
For example, if the number of bits of valid data to be stored is 32, the number of bits of check data is 6, and for the 38-bit combined data to be solved, the different position insertion logic of the set check data may include a plurality of types, for example, 8 types are listed below, where each scheme is different.
The first scheme is as follows: inserting a check code in the 1 st, 2 nd, 11 th, 12 th, 21 th and 22 th bits respectively; the second scheme is as follows: inserting a check code in the 3 rd, 4 th, 13 th, 14 th, 23 th and 24 th bits respectively; the third scheme is as follows: inserting a check code in the 5 th, 6 th, 15 th, 16 th, 25 th and 26 th bits respectively; a fourth scheme: inserting a check code in the 7 th, 8 th, 17 th, 18 th, 27 th and 28 th bits respectively; the fifth scheme is as follows: inserting a check code in the 9 th, 10 th, 19 th, 20 th, 29 th and 30 th bits respectively; the sixth scheme is as follows: inserting a check code in 11 th, 12 th, 21 th, 22 th, 31 th and 32 th bits respectively; the seventh scheme is as follows: inserting a check code at the 13 th, 14 th, 23 th, 24 th, 33 th and 34 th bits respectively; an eighth scheme: a check code is inserted into the 15 th, 16 th, 25 th, 26 th, 35 th and 36 th bits.
It is understood that the above-mentioned 8 kinds of position insertion logics inserted consecutively at two adjacent positions of an interval are only some feasible examples, and in addition, a check code or the like may also be inserted after each interval of corresponding data bits, i.e. discontinuous insertion or the like, and the user may randomly select or specify according to the need, which is not limited herein. Generally, no more than two parity codes per location insertion logic are inserted consecutively at the same location at most. Furthermore, these position insertion logic is not typically included at 2NThe corresponding data bits are respectively inserted into each check code, namely, the data bits are not the same as the traditional position insertion rule.
The correspondence between the different position insertion logics of the check data and the different encryption configuration instructions may be implemented by software or hardware, for example, if the correspondence is implemented by hardware, a programmable logic device, such as a Programmable Logic Array (PLA), may be used to input the different encryption configuration instructions to select the different position insertion logics.
In one embodiment, as shown in fig. 2, the process of taking values of the check codes in the verification data may include the following substeps S210 to S240:
s210, according to the insertion positions of the check codes, encrypted combined data to be solved, which are formed by combining the unknown check codes and the valid data, are obtained.
S220, obtaining the binary index of each bit of data in the encrypted combined data to be solved.
And S230, grouping the encryption combination data to be solved based on the binary index according to the rule that each group of groups only contains 1 bit of unknown check codes to obtain a plurality of groups.
And S240, respectively determining the values of the unknown check codes in each group according to a rule that the number of the '1' in each group is an even number, wherein the check codes with known values jointly form the check data.
As shown in fig. 3, taking an encryption scenario of 32-bit valid data as an example, the minimum number of bits of the parity data can be determined to be 6 bits, and it can be known that the total number of bits of the encrypted combined data to be solved is 38 bits, which is represented as D0 to D37. The second scheme of the eight position insertion logics is explained, that is, an unknown check code X is inserted into each of the positions D2, D3, D12, D13, D22 and D23, so that an encrypted combined data to be solved can be obtained.
Then, according to the binary index of each data bit, i.e. the number of bits is a multi-bit binary bit to represent the sequence number of each data bit, since the number of bits of the combined data is 38 bits, six bits can be used to represent, for example, the binary index of D0 is 000001, the binary index of D1 is 000010, and so on, the binary index of D38 is 100100.
Then, the binary indexes are divided according to a rule that each group of packets only contains 1-bit unknown check codes, for example, for group 1P 1, the binary indexes of the contained data bits satisfy xxxxx 1; for set 2P 2, the binary index of the data bits it contains satisfies xxxx1 x; by analogy, six groups P1-P6 are obtained, wherein each unknown check code is divided into corresponding groups. Then, by using a rule that the number of "1" in all data of the same group needs to be an even number, it can be determined whether the value of the unknown check code in the group is 1 or 0. Thus, the current verification data is obtained.
S130, inserting the generated verification data into the effective data according to the position insertion logic to obtain the encrypted combined data.
Exemplarily, after the specific value of the current check data is determined, the valid data may be encrypted by using the check codes, that is, the check codes are inserted into the corresponding positions according to the position insertion logic, so that encrypted combined data for encrypting the valid data may be obtained, and then step S140 is performed.
And S140, storing the encrypted combined data and the encryption related information in the embedded flash memory in an associated manner.
The encryption related information may be a specific encryption configuration command, an index of the current position insertion logic, or other data that can be used to reflect the association relationship between the current position input logic and the current valid data, and is not limited herein.
Exemplarily, after the encrypted combined data is obtained, the encrypted combined data can be associated with the information related to the current encryption, and then the data is stored in the embedded flash memory, so that the encrypted combined data can be read later and simultaneously obtained, and the encrypted related information is further utilized for decryption, thereby recovering the original effective data.
As an optional scheme, after the valid data is encrypted and stored, if the original valid data needs to be obtained, a process of reading out the data from the flash memory and decrypting the data is also involved. Referring to fig. 4, the data management method for an embedded flash memory exemplarily further includes the following steps S150 to S160:
s150, reading the encrypted combined data and the related encryption related information, and determining the position insertion logic corresponding to the encrypted combined data according to the encryption related information.
S160, according to the position insertion logic, the Hamming decryption is carried out on the encrypted combined data, and the effective data is obtained. It will be appreciated that the hamming decryption operation is closely related to the hamming encryption operation described above. As shown in fig. 3, by obtaining the position insertion logic during the original encryption, the values of the check codes can be determined, and then the unencrypted effective data can be recovered according to the hamming code decryption principle.
In addition, if any 1-bit data in the combined data has errors, the real effective data is not influenced. Since any 1-bit error data can be corrected by the error correction property of the hamming code. Of course, if multiple bits of erroneous data occur, the correctness of these valid data will not be guaranteed.
According to the data management method for the embedded flash memory, the configurable operation is carried out by inserting the logic into the position of the check data in the Hamming code, and the data encryption is still carried out based on the Hamming code coding principle, so that the cracking difficulty of the data when the data is leaked can be improved under the condition that the original Hamming code logic is not required to be modified, the confidentiality of the stored data can be greatly improved, and the reliability of data writing and reading can be effectively ensured based on the Hamming code coding logic.
Referring to fig. 5, based on the data management method for the embedded flash memory of the above embodiment, the present embodiment provides a data management apparatus 100 for the embedded flash memory. Exemplarily, the data management apparatus 100 for an embedded flash memory includes:
an obtaining module 110, configured to obtain valid data to be stored and an encryption configuration instruction;
a verification generation module 120, configured to determine a position insertion logic of the current verification data according to the encryption configuration instruction, and generate the verification data based on hamming codes by using the position insertion logic and the valid data;
the encryption and reassembly module 130 is configured to insert the check data into the valid data according to the position insertion logic to obtain encrypted combined data;
and a storage module 140, configured to store the encrypted combination data and the encryption related information in the embedded flash memory in an associated manner.
Further, as shown in fig. 6, the data management apparatus 100 for an embedded flash memory further includes:
a reading module 150, configured to read the encrypted combined data and the encryption related information, and determine the position insertion logic corresponding to the encrypted combined data according to the encryption related information;
and the data decryption module 160 is configured to perform hamming decryption on the combined data according to the position insertion logic to obtain the valid data.
It is to be understood that the apparatus of the present embodiment corresponds to the method of the above embodiment, and the alternatives in the above embodiment are also applicable to the present embodiment, so that the description is not repeated here.
Referring to fig. 7, the present application further provides a control chip, which may be, for example, an MCU (microprocessor) chip, an SoC (system on chip) chip, or the like. Exemplarily, the control chip includes an embedded flash memory (also called eFlash), a processor and a memory, wherein the embedded flash memory is used for accessing the encrypted combined data, the memory stores a computer program, and the processor executes the computer program, so that the control chip executes the above-mentioned data management method for the embedded flash memory or the functions of the respective modules in the above-mentioned data management device for the embedded flash memory.
The application also provides a readable storage medium for storing the computer program used in the control chip.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative and, for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, each functional module or unit in each embodiment of the present application may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a smart phone, a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application.

Claims (10)

1. A data management method for an embedded flash memory, comprising:
obtaining effective data to be stored and an encryption configuration instruction;
determining the position insertion logic of the current verification data according to the encryption configuration instruction, and generating the verification data based on Hamming codes by using the position insertion logic and the effective data;
inserting the verification data into the effective data according to the position insertion logic to obtain encrypted combined data;
and storing the encrypted combined data and the encryption related information into the embedded flash memory in an associated manner.
2. The data management method for an embedded flash memory of claim 1, further comprising:
reading the encrypted combined data and the associated encryption related information, and determining the position insertion logic corresponding to the encrypted combined data according to the encryption related information;
and carrying out Hamming decryption on the encrypted combined data according to the position insertion logic to obtain the effective data.
3. The data management method of claim 1, wherein the position insertion logic includes insertion positions of respective check codes in the check data in the encrypted combined data to be solved, and the generating the check data based on hamming encoding using the position insertion logic and the valid data includes:
according to the insertion position of each check code, obtaining encrypted combined data to be solved, which is formed by combining a plurality of unknown check codes and the effective data;
obtaining a binary index of each bit of data in the encrypted combined data to be solved;
grouping the encrypted combined data to be solved based on a binary index according to a rule that each group of groups only contains 1 bit of unknown check codes to obtain a plurality of groups;
and respectively determining the values of the unknown check codes in each group according to the rule that the number of the '1' in each group is an even number, wherein the check codes with known values jointly form the check data.
4. The data management method for the embedded flash memory according to claim 1, wherein each of the location insertion logics is continuously inserted at most not more than two check codes at the same location;
the position insertion logic is not included in 2NAnd respectively inserting each check code into the corresponding data bit, wherein N is an integer greater than or equal to 0.
5. The data management method for the embedded flash memory according to any one of claims 1 to 4, wherein the number of bits of the check data and the number of bits of the valid data to be stored satisfy the following relationship:
2r>=n+1;
wherein r represents the minimum number of bits of the required check code, and n represents the number of bits of the valid data.
6. The data management method for the embedded flash memory according to claim 1, wherein the correspondence between the different insertion logic of the check data and the different encryption configuration instructions is implemented by a programmable logic device.
7. A data management apparatus for an embedded flash memory, comprising:
the acquisition module is used for acquiring effective data to be stored and an encryption configuration instruction;
the verification generation module is used for determining the position insertion logic of the current verification data according to the encryption configuration instruction and generating the verification data by utilizing the position insertion logic and the effective data based on Hamming codes;
the encryption recombination module is used for inserting the check data into the effective data according to the position insertion logic to obtain encrypted combined data;
and the storage module is used for storing the encrypted combined data and the encryption related information into the embedded flash memory in an associated manner.
8. The data management device for an embedded flash memory according to claim 7, further comprising:
a reading module, configured to read the encrypted combined data and the encryption related information, and determine the position insertion logic corresponding to the encrypted combined data according to the encryption related information;
and the data decryption module is used for carrying out Hamming decryption on the combined data according to the position insertion logic to obtain the effective data.
9. A control chip comprising an embedded flash memory for accessing encrypted combined data, a memory for storing a computer program, and a processor, the computer program when run on the processor causing the control chip to perform the data management method for the embedded flash memory according to any one of claims 1-6.
10. A readable storage medium, characterized in that it stores a computer program which, when executed on a processor, implements the data management method for an embedded flash memory according to any one of claims 1-6.
CN202210118615.9A 2022-02-08 2022-02-08 Data management method and device for embedded flash memory and control chip Pending CN114490452A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210118615.9A CN114490452A (en) 2022-02-08 2022-02-08 Data management method and device for embedded flash memory and control chip

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210118615.9A CN114490452A (en) 2022-02-08 2022-02-08 Data management method and device for embedded flash memory and control chip

Publications (1)

Publication Number Publication Date
CN114490452A true CN114490452A (en) 2022-05-13

Family

ID=81479121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210118615.9A Pending CN114490452A (en) 2022-02-08 2022-02-08 Data management method and device for embedded flash memory and control chip

Country Status (1)

Country Link
CN (1) CN114490452A (en)

Similar Documents

Publication Publication Date Title
US20220229727A1 (en) Encoding and storage node repairing method for minimum storage regenerating codes for distributed storage systems
US10554398B2 (en) Cryptographic key production from a physical unclonable function
TWI353521B (en) Soft-input soft-output decoder for nonvolatile mem
US8359516B2 (en) Systems and methods for error correction and decoding on multi-level physical media
EP2789116B1 (en) Soft decision error correction for memory based puf using a single enrollment
US10678636B2 (en) Techniques for detecting and correcting errors in data
Wu A construction of systematic MDS codes with minimum repair bandwidth
US8266495B2 (en) Systems and methods for performing concatenated error correction
JP2003507985A (en) System and method for detecting 2-bit errors and correcting errors due to component failure
CN104393878A (en) Apparatus and Method for Correcting at least one Bit Error within a Coded Bit Sequence
US20140229786A1 (en) Digital error correction
US6393597B1 (en) Mechanism for decoding linearly-shifted codes to facilitate correction of bit errors due to component failures
US20100194609A1 (en) Method and Device For Coding Data Words
Van Zandwijk A mathematical approach to NAND flash-memory descrambling and decoding
CN109947587B (en) Grouping repair code construction method for non-uniform fault protection and fault repair method
CN114490452A (en) Data management method and device for embedded flash memory and control chip
CN101452722B (en) Error detection code generating circuit, code circuit using the circuit and correlation method
CN108572882B (en) Data storage method and storage device
Ge et al. Secure memories resistant to both random errors and fault injection attacks using nonlinear error correction codes
Colombier et al. Horizontal correlation attack on classic McEliece
CN111752747A (en) Memory security verification method for enhancing error detection capability
CN102543182A (en) Randomization circuit, memory control unit, memory, communicating system and method
US7529365B2 (en) Device and method of applying check bit to encrypt instruction for protection
RU2297030C2 (en) Self-correcting information storage device
JP2023509588A (en) Encoding for data recovery in storage systems

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination