CN106980799B - A kind of nonvolatile memory encryption system of abrasion equilibrium perception - Google Patents
A kind of nonvolatile memory encryption system of abrasion equilibrium perception Download PDFInfo
- Publication number
- CN106980799B CN106980799B CN201710141072.1A CN201710141072A CN106980799B CN 106980799 B CN106980799 B CN 106980799B CN 201710141072 A CN201710141072 A CN 201710141072A CN 106980799 B CN106980799 B CN 106980799B
- Authority
- CN
- China
- Prior art keywords
- counter
- module
- physical line
- storage areas
- linage
- 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.)
- Active
Links
- 238000005299 abrasion Methods 0.000 title claims abstract description 42
- 230000008447 perception Effects 0.000 title claims abstract description 9
- 238000003860 storage Methods 0.000 claims abstract description 96
- 238000013507 mapping Methods 0.000 claims description 6
- 238000000034 method Methods 0.000 description 17
- 238000010586 diagram Methods 0.000 description 9
- 230000008859 change Effects 0.000 description 6
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000005611 electricity Effects 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 230000015556 catabolic process Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000011982 device technology Methods 0.000 description 1
- 230000007334 memory performance Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000009828 non-uniform distribution Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005549 size reduction Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000007704 transition Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/70—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer
- G06F21/78—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data
- G06F21/79—Protecting specific internal or peripheral components, in which the protection of a component leads to protection of the entire computer to assure secure storage of data in semiconductor storage media, e.g. directly-addressable memories
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0616—Improving the reliability of storage systems in relation to life time, e.g. increasing Mean Time Between Failures [MTBF]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0866—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving user or device identifiers, e.g. serial number, physical or biometrical information, DNA, hand-signature or measurable physical characteristics
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Software Systems (AREA)
- Storage Device Security (AREA)
Abstract
The invention discloses a kind of nonvolatile memory encryption systems of abrasion equilibrium perception, comprising: storage region, counter caching, crypto engine and abrasion equilibrium module;Counter caching, for caching linage-counter and region-counter;Crypto engine, for generating one time key according to linage-counter and region-counter, physics row address and global secret;For each sub-storage areas, abrasion equilibrium module, when write request number for executing in sub-storage areas reaches preset threshold, old ciphertext data in the sub-storage areas in a physical line are read, old ciphertext data and one time key exclusive or are obtained into new ciphertext data, new physics row finally is written into new ciphertext data, to complete remapping operation.Using the remapping operation of abrasion equilibrium module come more new key and ciphertext data, it is finally reached the purpose that can be guaranteed safety using less counter, reduces the storage and performance cost for carrying out encryption introducing to nonvolatile memory.
Description
Technical field
The invention belongs to solid state storage technologies fields, more particularly, to a kind of nonvolatile memory of abrasion equilibrium perception
Encryption system.
Background technique
In the more than ten years in past, with the rapid growth of processor internal core number of unit, computer system can be parallel
The thread of execution is also more and more, this proposes high requirement to the capacity of memory system, performance and power consumption.Conventional dynamic with
Machine memory (Dynamic Random Access Memory, DRAM) faces scalability in making technology size reduction
Difference and the increased constraint of electricity leakage power dissipation, are unable to satisfy the future development demand of multi-core technology.And then novel nonvolatile storage
(Non-Volatile Memory, NVM), such as phase transition storage (Phase Change Memory, PCM) and resistance-variable storing device
Technologies such as (Resistive Random Access Memory, RRAM) be used to alleviate DRAM problems faced.These NVM skills
Art has many advantages, such as large capacity, high-performance and low-power consumption, the potential primary storage medium for becoming next-generation memory.
However, relative to conventional DRAM memory, although the non-volatile of NVM device avoids memory refresh operation, pole
The earth reduces electricity leakage power dissipation, but the characteristic introduces but also data can be still read within a very long time after power down
Additional data safety risk.Currently, for NVM data safety attack method there are two types of: one is memory be stolen
(Stolen DIMM Attack), data can be still read nonvolatile memory after a power failure, so crucial number after memory is stolen
According to may be obtained illegally;Another kind is bus snooping (Bus Snooping Attack), attacker's detection processor to memory
Between bus data transfer, obtain critical data.For assuring data security, data encryption operation is essential, counts
Device mode encryption has the characteristic of high-performance and high security, is presently considered to be most safely and effectively one of encryption method, and by
It is widely used in the encryption of NVM memory.Compared to traditional cipher mode directly encrypted to obtain using data key it is close
The method of text, counter mode encryption method obtain one by crypto engine using row address, linage-counter and global secret
One time key, this one time key are encrypted to obtain ciphertext again with data.Counter is buffered in cpu cache, just
Cryptographic operation and memory read operation can be made parallel, reduce influence of the cryptographic operation to crucial read latency.However, should add
Decryption method has but met with the problem of counter size limitation.On the one hand, it in order to guarantee safety, is just needed whenever linage-counter overflows
Change global secret, using new global secret to entire memory headroom re-encrypted.If, can be frequent using too small key
Ground causes counter overflow and the entire memory headroom of re-encryption, will cause unacceptable influence to internal memory performance.On the other hand,
If avoid counter overflow using very big counter (such as 64 linage-counters), but will lead to very big storage overhead with
And the hit rate of counter caching is reduced, encryption and memory reading can not be parallel for many read requests, finally also result in
The performance degradation of NVM memory system.
In addition to non-volatile characteristic bring security risk, durability limitation is also important asking of being faced of nonvolatile memory
Topic.Durability refers to that the number that each storage unit can be rewritten, the durability of PCM are about the durable of 107~108, RRAM
Property is about 108~1010.Worse, the feature of the generally existing non-uniform Distribution of write access in real load, to lead
Cause writes the higher memory line of number by worn out in advance, system generation initial failure.For example, under specific workload (db2),
NVM system is only capable of maintaining 7.6 months service life (the 5% of desired life).Worse, when facing malicious attack,
The durability limitation of NVM will also cause serious safety problem.Such as under the attack of simple cache overflow, part NVM's is interior
Depositing row can be worn through in short 2 minutes, and whole equipment is caused to fail.It can be seen that not only using NVM equipment as memory
Guarantee service life when in face of normal load, also to guarantee that equipment can also obtain longer service life under malicious attack.
Abrasion equilibrium by change physical address to logical address mapping relations the unbalanced write request of upper layer application
It is uniformly distributed in each storage unit, is the practical indispensable important module of nonvolatile memory.However abrasion equilibrium draws
Additional read-write expense is entered, however current all counter mode encryption methods all do not account for utilizing these additional readings
Write operation optimizes performance.
It can be seen that how research using abrasion equilibrium module existing in nonvolatile memory optimizes its ciphering process,
For reducing encryption overhead, system performance is improved, so that nonvolatile memory is really moved towards practical and is of great significance with industrialization.
Summary of the invention
Aiming at the above defects or improvement requirements of the prior art, the present invention provides a kind of the non-volatile of abrasion equilibrium perception
Memory encryption system, by the remapping operation using abrasion equilibrium module essential in nonvolatile memory come more new key
With ciphertext data, it is finally reached the purpose that can be guaranteed safety using less counter, is reduced to nonvolatile memory
Carry out the storage and performance cost of encryption introducing.Thus it solves to exist for existing counter mode encryption method in the prior art
The excessive technical problem of counter expense.
To achieve the above object, according to one aspect of the present invention, provide a kind of perception of abrasion equilibrium it is non-volatile in
Deposit encryption system, comprising: storage region, counter caching, crypto engine and abrasion equilibrium module;
The storage region includes multiple sub-storage areas, and each sub-storage areas is made of several physical lines, each
The physical line line number that sub-storage areas includes is equal;
The counter caching, for caching linage-counter and region-counter, wherein each physical line corresponds one
A linage-counter, each sub-storage areas correspond a region-counter;
The crypto engine, for corresponding with the affiliated sub-storage areas of the physical line according to the corresponding linage-counter of physical line
The region-counter global counter, physics row address and the global secret that are combined into generate one time key;
The abrasion equilibrium module, when the write request number for executing in sub-storage areas reaches preset threshold,
It is read in the sub-storage areas wait remap the old ciphertext data in physical line, it is then that the old ciphertext data and target are disposable
Key exclusive or obtains new ciphertext data, new physics row finally is written in new ciphertext data, and reset for counting the subpool
The counter of domain write request number, wherein the target one time key is by the crypto engine according to physical line to be remapped
The global counting that corresponding linage-counter region-counter corresponding with the affiliated sub-storage areas of physical line to be remapped is combined into
Device, physics row address to be remapped and global secret generate.
Preferably, the abrasion equilibrium module includes: the first acquisition module, second obtains module, the first input module, the
One update module, the second input module, first judgment module, the first computing module and the first internal storage data writing module;
Described first obtains module, when the write request number for executing in sub-storage areas reaches preset threshold,
It is read in the sub-storage areas wait remap the old ciphertext data in physical line;
Described second obtains module, should physical line corresponding first be remapped for obtaining from counter caching
Linage-counter first area counter corresponding with the affiliated sub-storage areas of physical line to be remapped;
First input module will be old for first area counter and the first linage-counter to be formed old counter
Counter inputs the crypto engine together with physics row address to be remapped, global secret, is obtained by the crypto engine old
One time key;
First update module, for the value of the first linage-counter to be updated to 0;
Second input module, for after adding 1 by the value of first area counter with updated first linage-counter
The first refresh counter is formed, the first refresh counter is inputted into the encryption together with physics row address to be remapped, global secret
Engine obtains new one time key by the crypto engine;
The first judgment module, for judge in the affiliated sub-storage areas of physical line to be remapped whether all physics
Row has all been remapped, if so, indicating that the sub-storage areas is completed one and remaps wheel, then by first area counter
Value add 1;
First computing module, for old ciphertext data and old one time key exclusive or to be obtained in plain text, then this is bright
Wen Yuxin one time key exclusive or obtains new ciphertext data;
The first internal storage data writing module, for new physics row to be written in new ciphertext data.
Preferably, the system also includes read request modules;The read request module includes: that third obtains module, the 4th
Obtain module, the second judgment module, third input module, the 4th input module, the second computing module;
The third obtains module, by obtaining based on corresponding second row of physical line to be read from counter caching
Number device and the corresponding second area counter in the affiliated sub-storage areas of physical line to be read;
Described 4th obtains module, for reading ciphertext data from physical line to be read;
Second judgment module, for calling the abrasion equilibrium module to judge physical line to be read in affiliated sub- storage
Whether currently remapping for region has been remapped in wheel;
The third input module, for currently the remapping in wheel in affiliated sub-storage areas in physical line to be read
When being remapped, the second refresh counter is formed with the second linage-counter after adding 1 by the value of second area counter, by the second new meter
Number device inputs the crypto engine together with physics row address to be read, global secret, obtains the 1st by the crypto engine
Secondary property key;
4th input module, for currently the remapping in wheel not in affiliated sub-storage areas in physical line to be read
When being remapped, third refresh counter is formed by second area counter and the second linage-counter, by third refresh counter with to
Reading physics row address, global secret input the crypto engine together, obtain the second one time key by the crypto engine;
Second computing module, the ciphertext data and described first for obtaining the 4th acquisition module are disposable
Key or the second one time key exclusive or obtain clear data, and clear data is returned.
Preferably, the system also includes write request modules;The write request module includes: the 5th acquisition module, second
Update module, third judgment module, the 5th input module, the 6th input module, third computing module and the second internal storage data
Writing module;
Described 5th obtains module, by obtaining based on the corresponding the third line of physical line to be written from counter caching
Number device and the corresponding third region-counter in the affiliated sub-storage areas of physical line to be written;
Second update module, for the value of third linage-counter to be added 1;
The third judgment module, for calling abrasion equilibrium module to judge physical line to be written in affiliated sub-storage areas
Currently remap wheel in whether be remapped;
5th input module, for currently the remapping in wheel in affiliated sub-storage areas in physical line to be written
When being remapped, the 4th refresh counter is formed with third linage-counter after adding 1 by the value of third region-counter, by "four news" (new ideas meter
Number device inputs the crypto engine together with physics row address to be written, global secret, obtains third one time key;
6th input module, for currently the remapping in wheel not in affiliated sub-storage areas in physical line to be written
When being remapped, the 5th refresh counter is formed by third region-counter and third linage-counter, by the 5th refresh counter with to
Write-in physics row address, global secret input the crypto engine together, obtain the 4th one time key by the crypto engine;
The third computing module, clear data and the third one time key or the described 4th for being written into
One time key exclusive or obtains ciphertext data;
The second internal storage data writing module, the ciphertext data write-in for obtaining the third computing module are to be written
Enter physical line.
In general, through the invention it is contemplated above technical scheme is compared with the prior art, mainly have skill below
Art advantage:
(1) optimize counter mode encryption method using abrasion equilibrium for the first time, drawn by being remapped using abrasion equilibrium
For the read-write operation entered periodically to reset linage-counter and according to refresh counter update ciphertext data, linage-counter only records should
What row added up after remapping from last time writes number, thus is just avoided that linage-counter overflows using the linage-counter of less digit.
(2) in order to avoid key reuse, it is completed to record the region to increase a region-counter for each region
Remap wheel number.The counter can guarantee to overflow inside nonvolatile memory life cycle, and due in whole region
It is shared in thousands of a memory lines, storage overhead is minimum.
(3) global counter for collectively constituting a row in entire scheme by linage-counter and region-counter, both ensured
The safety that key does not reuse again can reduce the total size of counter, reduce the storage that encryption introduces nonvolatile memory
And performance cost.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the nonvolatile memory encryption system of abrasion equilibrium perception in the embodiment of the present invention;
Fig. 2 is the flow diagram that abrasion equilibrium module executes remapping procedures in the embodiment of the present invention;
Fig. 3 is remapping procedures data variation schematic diagram in the embodiment of the present invention;
Fig. 4 is the flow diagram that read request module executes data write-in in the embodiment of the present invention;
Fig. 5 is the flow diagram that write request module executes reading data in the embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.As long as in addition, technical characteristic involved in the various embodiments of the present invention described below
Not constituting a conflict with each other can be combined with each other.
Technical term according to the present invention is explained and illustrated first below:
Physical line: the most basic access unit of memory system, in different systems, physical line size can be different.It is logical
A normal physical line size can be 64 bytes, 128 bytes, 256 bytes;
Region (region): a piece of storage section in memory headroom is made of several physical lines.A usual region
It can be made of 2048,4096 and 8192 rows;
It remaps: data being read from old physical row is mobile, and are written to new physics row.
One wheel remaps: abrasion equilibrium method has all carried out primary weight to all physical lines in some sub-storage areas
Mapping.
As shown in Figure 1, for the structural representation of the nonvolatile memory encryption system of abrasion equilibrium perception in the embodiment of the present invention
Figure, including storage region, counter caching, crypto engine and abrasion equilibrium module.For existing counter mode encryption side
The excessive problem of the counter expense of method remaps the read-write operation of introducing using abrasion equilibrium to reset linage-counter, update
Ciphertext, and increase and record the completed region-counter for remapping wheel number in each region to ensure that key does not reuse, guarantee peace
Quan Xing.
Storage region in nonvolatile memory encryption system is averagely divided into the identical sub-storage areas of multiple sizes, often
A sub-storage areas is divided into the identical physical line of multiple sizes.
Memory Controller Hub in nonvolatile memory encryption system is by counter caching, crypto engine and abrasion equilibrium module
It constitutes;
Above-mentioned counter caching generally uses algorithm using minimum in the recent period for caching linage-counter and region-counter
(Least Recently Used, LRU) carries out caching replacement, and cache size is generally 64KB, wherein each physical line is one by one
A corresponding linage-counter, each sub-storage areas correspond a region-counter, and linage-counter only records the row from upper
It is secondary remap after add up write number, thus be just avoided that linage-counter overflows using the linage-counter of less digit;Region meter
For recording, its corresponding sub-storage areas is completed to remap wheel number to number device.;
Above-mentioned crypto engine, for corresponding with the affiliated sub-storage areas of the physical line according to the corresponding linage-counter of physical line
The region-counter global counter, physics row address and the global secret that are combined into generate one time key, generally use
Advanced Encryption Standard (Advanced Encryption Standard, AES) encryption method;
Above-mentioned abrasion equilibrium module writes load for balance entire memory headroom, and what is executed in sub-storage areas writes
When request number of times reaches preset threshold, being read in the sub-storage areas wait remap the old ciphertext data in physical line, then
The old ciphertext data and target one time key exclusive or are obtained into new ciphertext data, new physics finally are written into new ciphertext data
Row, and reset the counter for counting the sub-storage areas write request number, wherein target one time key is by crypto engine
According to the corresponding linage-counter of physical line to be remapped area count corresponding with the affiliated sub-storage areas of physical line to be remapped
Global counter, physics row address to be remapped and the global secret that device is combined into generate.
It is illustrated in figure 2 the flow diagram that abrasion equilibrium module in the embodiment of the present invention executes remapping procedures.Abrasion
Balance module includes: the first acquisition module, the second acquisition module, the first input module, the first update module, the second input mould
Block, first judgment module, the first computing module and the first internal storage data writing module.It is every at it to each sub-storage areas
After executing T write request, controls abrasion equilibrium module and utilize the read-write refresh counter that remaps and close in accordance with the following steps
Text:
(S1) abrasion equilibrium module is called to read old ciphertext data from wait remap in physical line;
(S2) obtaining from counter caching should corresponding first linage-counter of physical line be remapped and object to be remapped
The corresponding first area counter in sub-storage areas belonging to reason row;
(S3) old counter is formed by first area counter and the first linage-counter, by old counter and object to be remapped
Reason row address, global secret input crypto engine together, obtain old one time key;
(S4) value of the first linage-counter is updated to 0, after this step, the value of the first linage-counter is 0;
(S5) the first refresh counter is formed with updated first linage-counter after adding 1 by the value of first area counter,
First refresh counter is inputted into crypto engine together with physics row address to be remapped, global secret, obtains new one time key;
Wherein, it should be noted that the first refresh counter be added using the value of first area counter 1 obtained result with
First linage-counter composition, at this point, the value of first area counter itself does not change.
(S6) judge whether all physical lines have all been remapped in the affiliated sub-storage areas of physical line to be remapped, if
It is, then it represents that the sub-storage areas is completed one and remaps wheel, executes step (S7);Otherwise, step (S8) is executed;
(S7) value of first area counter is added 1;The value of first area counter is changed accordingly at this time;
(S8) old ciphertext data and old one time key exclusive or are obtained in plain text, then this is different with new one time key in plain text
Or obtain new ciphertext data;
(S9) new physics row is written into new ciphertext data.
Wherein, T is predetermined value, it is preferable that T ∈ (16,256).
It is remapping procedures data variation schematic diagram in the embodiment of the present invention as shown in Figure 3, physical line C is being in the example
It is remapped.The first step, abrasion equilibrium module read the data of physical line C from the second row of old physical row, which is close
Literary form.Second step obtains the corresponding linage-counter of physical line C and the affiliated sub-storage areas physical line C from counter caching
Corresponding region-counter, and the two is combined into old counter, encryption is inputted together with the address physical line C, global secret
Engine obtains old one time key;Ciphertext and old one time key exclusive or obtain in plain text.Third step counts the row of physical line C
Device is reset to 0;Linage-counter (value is 0) is formed into refresh counter with (region-counter+1), it is close with the address physical line C, the overall situation
Key inputs crypto engine together, obtains new one time key;New ciphertext is obtained with new one time key exclusive or in plain text;Abrasion equilibrium
New physics row the third line is written in the new ciphertext by module.At this point, the data stored in the third line are close to be encrypted by refresh counter
Text.
It is the flow diagram that read request module executes reading data in the embodiment of the present invention as shown in Figure 4, wherein reading is asked
Modulus block include: third obtain module, the 4th obtain module, the second judgment module, third input module, the 4th input module,
Second computing module.
(T1) ciphertext data are read from physical line to be read;
(T2) corresponding second linage-counter of physical line to be read and physical line to be read institute are obtained from counter caching
Belong to the corresponding second area counter in sub-storage areas;
(T3) abrasion equilibrium module is called to judge physical line to be read currently remapping in wheel in affiliated sub-storage areas
Whether it has been remapped, if so, thening follow the steps (T4);Otherwise, step (T5) is executed;
(T4) the second refresh counter is formed with the second linage-counter after adding 1 by the value of second area counter, it is new by second
Counter inputs crypto engine together with physics row address to be read, global secret, obtains the first one time key, executes step
(T6);
Wherein, it should be noted that the second refresh counter be added using the value of second area counter 1 obtained result with
Second linage-counter composition, at this point, the value of second area counter itself does not change.
(T5) third refresh counter is formed by second area counter and the second linage-counter, by third refresh counter with to
Reading physics row address, global secret input crypto engine together, obtain the second one time key;
(T6) the ciphertext data in step (T1) are obtained with the first one time key or the second one time key exclusive or
Clear data, and clear data is returned.
It is the flow diagram that write request module executes data write-in in the embodiment of the present invention as shown in Figure 5, wherein write and ask
Modulus block include: the 5th acquisition module, the second update module, third judgment module, the 5th input module, the 6th input module,
Third computing module and the second internal storage data writing module.
(U1) the corresponding third linage-counter of physical line to be written and physical line to be written institute are obtained from counter caching
Belong to the corresponding third region-counter in sub-storage areas;
(U2) value of third linage-counter is added 1, the value in third linage-counter accordingly changes at this time;
(U3) abrasion equilibrium module is called to judge physical line to be written currently remapping in wheel in affiliated sub-storage areas
Whether it has been remapped, if so, thening follow the steps (U4);Otherwise, step (U5) is executed;
(U4) the 4th refresh counter is formed with third linage-counter after adding 1 by the value of third region-counter, by the "four news" (new ideas
Counter inputs crypto engine together with physics row address to be written, global secret and obtains third one time key, executes step
(U6);
Wherein, it should be noted that the 4th refresh counter be added using the value of third region-counter 1 obtained result with
Third linage-counter composition, at this point, the value of third region-counter itself does not change.
(U5) the 5th refresh counter is formed by third region-counter and third linage-counter, by the 5th refresh counter with to
Write-in physics row address, global secret input crypto engine together and obtain the 4th one time key;
(U6) clear data and third one time key that are written into or the 4th one time key exclusive or obtain ciphertext
Data;
(U7) physical line to be written is written in the ciphertext data for obtaining step (U6).
The nonvolatile memory encryption system in the present invention is assessed from counter storage overhead below.Reduce counter
Storage overhead can increase the cache hit rate under same counter cache size, final raising nonvolatile memory encryption system
Reading performance, thus be of great significance.
If total memory capacity is C, each row size is M Byte, and total line number is N, is divided into R region, remaps the period
For T, the size of linage-counter is L.The overhead of counter is that the expense of region-counter adds the expense of linage-counter, i.e.,
64*R+N*L bits.Recommended configuration is 1GB total capacity, and row size is 256 Byte, and 512 regions, remapping the period is 64.
Under best-case, it is assumed that load to each memory line write number be it is identical, then a row at most pass through T times
It will be remapped after writing, i.e. log2(T) linage-counter of position can avoid overflowing.Under recommended configuration, 8 linage-counters are just
It can be about 4MB to avoid spilling, counter expense.
Under worst case, it is assumed that only carry out write operation to some memory line, then a row at most passes through (N/R) and writes for * T times
It will be remapped later, i.e. log2The linage-counter of the position ((N/R) * T) can avoid overflowing.Under recommended configuration, 22 rows
Counter can be about 11MB to avoid spilling, counter expense.
To general load, write 20 times for writing number and about averagely writing number of most frequent row in a region, i.e., one
Row will be remapped after at most writing by 20*T times, i.e. log2The linage-counter of the position (20*T) can avoid overflowing.It is pushing away
It recommends under configuration, about 12 linage-counters can be about 6MB to avoid spilling, counter expense.
As it will be easily appreciated by one skilled in the art that the foregoing is merely illustrative of the preferred embodiments of the present invention, not to
The limitation present invention, any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should all include
Within protection scope of the present invention.
Claims (4)
1. a kind of nonvolatile memory encryption system of abrasion equilibrium perception characterized by comprising storage region, counter are slow
It deposits, crypto engine and abrasion equilibrium module;
The storage region includes multiple sub-storage areas, and each sub-storage areas is made of several physical lines, and every height is deposited
The physical line line number that storage area domain includes is equal;
The counter caching, for caching linage-counter and region-counter, wherein each physical line corresponds a row
Counter, each sub-storage areas correspond a region-counter;
The crypto engine, for according to the corresponding linage-counter of physical line area corresponding with the affiliated sub-storage areas of the physical line
Global counter, physics row address and the global secret that domain counter is combined into generate one time key;
The abrasion equilibrium module, when the write request number for executing in sub-storage areas reaches preset threshold, the son
It is read in storage region wait remap the old ciphertext data in physical line, then by the old ciphertext data and target one time key
Exclusive or obtains new ciphertext data, new physics row finally is written in new ciphertext data, and reset and write for counting the sub-storage areas
The counter of request number of times, wherein the target one time key is corresponding according to physical line to be remapped by the crypto engine
Linage-counter region-counter corresponding with the affiliated sub-storage areas of physical line to be remapped be combined into global counter, to
It remaps physics row address and global secret generates.
2. system according to claim 1, which is characterized in that the abrasion equilibrium module includes: the first acquisition module,
Two obtain modules, the first input module, the first update module, the second input module, first judgment module, the first computing module with
And the first internal storage data writing module;
Described first obtains module, when the write request number for executing in sub-storage areas reaches preset threshold, the son
It is read in storage region wait remap the old ciphertext data in physical line;
Described second obtains module, by being somebody's turn to do based on the corresponding the first row of physical line to be remapped from acquisition in counter caching
Number device first area counter corresponding with the affiliated sub-storage areas of physical line to be remapped;
First input module, for first area counter and the first linage-counter to be formed old counter, by old counting
Device inputs the crypto engine together with physics row address to be remapped, global secret, is obtained by the crypto engine old primary
Property key;
First update module, for the value of the first linage-counter to be updated to 0;
Second input module, for being formed after adding 1 by the value of first area counter with updated first linage-counter
First refresh counter is inputted the crypto engine together with physics row address to be remapped, global secret by the first refresh counter,
New one time key is obtained by the crypto engine;
The first judgment module, for judge in the affiliated sub-storage areas of physical line to be remapped whether all physical lines all
It has been be remapped that, if so, indicating that the sub-storage areas is completed one and remaps wheel, then by the value of first area counter
Add 1;
First computing module, for old ciphertext data and old one time key exclusive or to be obtained in plain text, then by this in plain text with
New one time key exclusive or obtains new ciphertext data;
The first internal storage data writing module, for new physics row to be written in new ciphertext data.
3. system according to claim 1, which is characterized in that the system also includes: read request module;The read request
Module includes: that third obtains module, the 4th obtains module, the second judgment module, third input module, the 4th input module, the
Two computing modules;
The third obtains module, for obtaining corresponding second linage-counter of physical line to be read from counter caching
Second area counter corresponding with the affiliated sub-storage areas of physical line to be read;
Described 4th obtains module, for reading ciphertext data from physical line to be read;
Second judgment module, for calling the abrasion equilibrium module to judge physical line to be read in affiliated sub-storage areas
Currently remap wheel in whether be remapped;
The third input module, for having been weighed in physical line to be read in currently remapping in wheel for affiliated sub-storage areas
When mapping, the second refresh counter is formed with the second linage-counter after adding 1 by the value of second area counter, by the second refresh counter
The crypto engine is inputted together with physics row address to be read, global secret, it is disposable to obtain first by the crypto engine
Key;
4th input module, for not weighed in physical line to be read in currently remapping in wheel for affiliated sub-storage areas
When mapping, third refresh counter is formed by second area counter and the second linage-counter, by third refresh counter with it is to be read
Physics row address, global secret input the crypto engine together, obtain the second one time key by the crypto engine;
Second computing module, ciphertext data and first one time key for obtaining the 4th acquisition module
Or the second one time key exclusive or obtains clear data, and clear data is returned.
4. system according to claim 1, which is characterized in that the system also includes: write request module;The write request
Module includes: the 5th acquisition module, the second update module, third judgment module, the 5th input module, the 6th input module, the
Three computing modules and the second internal storage data writing module;
Described 5th obtains module, for obtaining the corresponding third linage-counter of physical line to be written from counter caching
Third region-counter corresponding with the affiliated sub-storage areas of physical line to be written;
Second update module, for the value of third linage-counter to be added 1;
The third judgment module, for calling abrasion equilibrium module to judge physical line to be written working as in affiliated sub-storage areas
Before remap wheel in whether be remapped;
5th input module, for having been weighed in physical line to be written in currently remapping in wheel for affiliated sub-storage areas
When mapping, the 4th refresh counter is formed with third linage-counter after adding 1 by the value of third region-counter, by the 4th refresh counter
The crypto engine is inputted together with physics row address to be written, global secret, obtains third one time key;
6th input module, for not weighed in physical line to be written in currently remapping in wheel for affiliated sub-storage areas
When mapping, the 5th refresh counter is formed by third region-counter and third linage-counter, by the 5th refresh counter with it is to be written
Physics row address, global secret input the crypto engine together, obtain the 4th one time key by the crypto engine;
The third computing module, clear data and the third one time key or the described 4th for being written into are once
Property key exclusive or obtains ciphertext data;
Object to be written is written in the second internal storage data writing module, the ciphertext data for obtaining the third computing module
Reason row.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710141072.1A CN106980799B (en) | 2017-03-10 | 2017-03-10 | A kind of nonvolatile memory encryption system of abrasion equilibrium perception |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710141072.1A CN106980799B (en) | 2017-03-10 | 2017-03-10 | A kind of nonvolatile memory encryption system of abrasion equilibrium perception |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106980799A CN106980799A (en) | 2017-07-25 |
CN106980799B true CN106980799B (en) | 2019-05-14 |
Family
ID=59337977
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710141072.1A Active CN106980799B (en) | 2017-03-10 | 2017-03-10 | A kind of nonvolatile memory encryption system of abrasion equilibrium perception |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106980799B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108536616B (en) * | 2018-03-28 | 2021-10-15 | 华中科技大学 | A Mapping Method to Improve PCM Data Encryption Write Performance and Lifespan |
CN109918317A (en) * | 2019-03-01 | 2019-06-21 | 重庆大学 | A wear leveling method between NVM strips based on wear perception |
CN112486857B (en) * | 2020-10-29 | 2023-08-29 | 中山大学 | A wear-aware and load-balancing multi-layer non-volatile cache method |
CN113220241A (en) * | 2021-05-27 | 2021-08-06 | 衢州学院 | Cross-layer design-based hybrid SSD performance and service life optimization method |
CN115329350B (en) * | 2022-07-06 | 2025-07-15 | 华中科技大学 | Data encryption method, memory controller and system for non-volatile memory system |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102081576B (en) * | 2011-03-01 | 2012-07-11 | 华中科技大学 | A wear leveling method for flash memory |
US9588883B2 (en) * | 2011-09-23 | 2017-03-07 | Conversant Intellectual Property Management Inc. | Flash memory system |
CN105468998B (en) * | 2014-09-03 | 2019-01-29 | 腾讯科技(深圳)有限公司 | Data guard method, data protecting device and solid hard disk storage system |
CN105068938B (en) * | 2015-08-12 | 2018-04-24 | 华中科技大学 | A kind of abrasion equilibrium method of the nonvolatile memory based on multilevel-cell |
CN105955891B (en) * | 2016-04-25 | 2018-12-14 | 华中科技大学 | A kind of bilayer abrasion equilibrium method and system |
-
2017
- 2017-03-10 CN CN201710141072.1A patent/CN106980799B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN106980799A (en) | 2017-07-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106980799B (en) | A kind of nonvolatile memory encryption system of abrasion equilibrium perception | |
Jadidi et al. | High-endurance and performance-efficient design of hybrid cache architectures through adaptive line replacement | |
Zhang et al. | Fork path: improving efficiency of oram by removing redundant memory accesses | |
Mittal et al. | AYUSH: A technique for extending lifetime of SRAM-NVM hybrid caches | |
WO2019128958A1 (en) | Cache replacement technique | |
Vasilakis et al. | Hybrid2: Combining caching and migration in hybrid memory systems | |
CN108351833A (en) | For the compressed code metadata encrypted technology of device for storage | |
TWI652576B (en) | Memory system and processor system | |
Aghaei Khouzani et al. | Prolonging PCM lifetime through energy-efficient, segment-aware, and wear-resistant page allocation | |
Mittal et al. | LastingNVCache: A technique for improving the lifetime of non-volatile caches | |
Mittal et al. | EqualWrites: Reducing intra-set write variations for enhancing lifetime of non-volatile caches | |
Mittal et al. | A survey of techniques for improving security of non-volatile memories | |
Quan et al. | Prediction table based management policy for STT-RAM and SRAM hybrid cache | |
Mittal et al. | WriteSmoothing: Improving lifetime of non-volatile caches using intra-set wear-leveling | |
US20140195730A1 (en) | Robust and secure memory subsystem | |
Kargar et al. | Challenges and future directions for energy, latency, and lifetime improvements in NVMs | |
US7761662B2 (en) | Cache memory device and microprocessor | |
Rakshit et al. | LEO: Low overhead encryption ORAM for non-volatile memories | |
Yao et al. | An advanced adaptive least recently used buffer management algorithm for SSD | |
US12032482B2 (en) | Dual cache for row hammer mitigation | |
Han et al. | Horus: Persistent security for extended persistence-domain memory systems | |
CN108572799A (en) | A Data Page Migration Method for Heterogeneous Memory System Based on Bidirectional Hash Linked List | |
Mittal | Using cache-coloring to mitigate inter-set write variation in non-volatile caches | |
Zhou et al. | Increasing lifetime and security of phase-change memory with endurance variation | |
Tan et al. | APMigration: Improving performance of hybrid memory performance via an adaptive page migration method |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |