[embodiment]
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
Detailed description of the present invention mainly presents by program, step, logical block, process or other symbolistic descriptions, the running of the technical scheme among its direct or indirect simulation the present invention.Affiliated those of skill in the art use herein these descriptions and statement essential to the work that the others skilled in the art in the affiliated field effectively introduce them.
Alleged " embodiment " or " embodiment " refer to that special characteristic, structure or the characteristic relevant with described embodiment can be contained at least one implementation of the present invention at least herein.Different local in this manual " in one embodiment " that occur also nonessentially all refer to same embodiment, must not be yet with other embodiment mutually exclusive separately or select embodiment.In addition, represent the sequence of modules in method, process flow diagram or the functional block diagram of one or more embodiment and revocablely refer to any particular order, also be not construed as limiting the invention.
The present invention proposes a kind of digital copyright protection system; the memory storage 200 that it comprises main frame 100 and has the digital encryption defencive function can be stored encrypted protection content (or being referred to as rights file, protected data or protection digital document etc.) in the described memory storage 200.
Described main frame (Host) 100 can be portable type electronic product, panel computer product such as mobile phone, GPS terminal, computer, PDA (Personal Digital Assistant), iPAD(Apple), the music player product of iPOD(Apple), MP3/MP4 players etc. can also be other digital content playback equipments.Described memory storage (Device) 200 can be memory card, such as SD card (Security Digital Card) and multimedia digital card (Multi-Media Card), also can be USB flash drive (USB Flash Disk), can also be solid state hard disc etc.The described memory storage 200 interior contents that can store copyright protection, these contents are encrypted protection contents.
Fig. 2 shows memory storage 200 structural representation in one embodiment shown in Fig. 1.Described memory storage 200 comprises storage control module 210 and memory module 220.Store encrypted protection content and original license file in the described memory module 220.Described memory controller 210 includes the host interface 214 of carrying out mutual memory module interface 211, microprocessor 212, encryption and decryption module 213 and carrying out communication with main frame 100 with memory module 220.
After described host interface 214 connects with described main frame 100, described microprocessor 212 is by the original license file in the described memory module 220 of described memory module interface 211 access, and carries out communication to realize the mutual authentication of memory storage 200 and main frame 100 by described host interface 214 and described main frame 100.At described memory storage 200 and described main frame 100 before authentication is passed through mutually, the plaintext that described encryption and decryption module 213 can not be decrypted and will decipher the encrypted protection content of reading in the described memory module 220 by described memory module interface 211 is transferred to described main frame 100 by described host interface 214.At described memory storage 200 and described main frame 100 after authentication is passed through mutually, described encryption and decryption module 213 can be decrypted the encrypted protection content of reading in the described memory module 220 by described memory module interface 211 and the plaintext after the described deciphering is transferred to described main frame 100 by described host interface 214.
In one embodiment; at described memory storage 200 and described main frame 100 after authentication is passed through mutually; when described main frame 100 wishes to read encrypted protection content in the described memory module 220; described microprocessor 212 is read the encrypted protection content that described main frame 100 hope are read by described memory module interface 211 in described memory module 220; and transfer to described encryption and decryption module 213 and be decrypted; the plaintext of described encryption and decryption module 213 after with described deciphering is transferred to described main frame 100 by described microprocessor 212 and described host interface 214, finished like this reading of encrypted content in 100 pairs of memory storages of main frame 200.
The mutual authentication of described memory storage 200 and described main frame 100 comprises that the authentication of 200 pairs of described main frames 100 of described memory storage and described main frame are to the authentication of described memory storage 200.
In one embodiment, when 200 pairs of described main frame 100 authentications of memory storage were passed through, memory storage 200 thought that main frame 100 is legal, and encryption and decryption module 213 is enabled.When 200 pairs of described main frame 100 authentification failures of memory storage, memory storage 200 thinks that main frame 100 is illegal, and encryption and decryption module 213 is by disable.When 200 authentications of 100 pairs of memory storages of described main frame were passed through, main frame 100 thought that memory storage 200 is legal, and described main frame 100 just can be realized the normal access to memory storage 400.When 100 pairs of memory storage 200 authentification failures of described main frame, main frame 100 thinks that memory storage 200 is illegal, and described main frame 100 meeting report authentications make mistakes and can't normally conduct interviews to memory storage 200.
Can prevent that like this illegal host is to the normal use of the encipherment protection content in the memory storage 200; thereby prevent or reduce the generation of piracy and illegal use; legal hosts then can after authentication is passed through mutually with memory storage 200, normally read and use the rear plaintext of deciphering of the protection content of storage in the memory storage 200.
In an application example; described memory storage 200 can be for being stored with the SD card of numerical map; described map is for carrying out the interior perhaps file of copyright protection, and map is stored after memory storage 200 is by the encryption and decryption module encrypt, and described main frame 100 is a GPS terminal.When the SD card with after the GPS terminal is connected, the SD card can carry out data interaction with the GPS terminal, to realize that the SD card is to the authentication to the SD card of the authentication of GPS terminal and GPS terminal, after authentication is passed through mutually, the GPS terminal just can normally read the map after the encryption in the SD card and use, otherwise, can't normally go to read and use to the data in the SD card.Like this, can realize protection to the map in the SD card.
Described memory storage 200 also includes random access storage device (random access memory is called for short RAM) 215, ROM (read-only memory) (Read only memory is called for short ROM) 216 and intelligent card interface 217.In one embodiment, described intelligent card interface 217 can be ISO7816 interface or SPI interface (Serial Peripheral Interface, Serial Peripheral Interface (SPI)), and described host interface can be the SD2.0/3.0 interface.
Fig. 3 has illustrated main frame and the mutual authentication process of memory storage or the schematic flow sheet at an embodiment of method 300 among the present invention.
In this embodiment, be mounted with in advance four original license files (Original License) in the memory module 220 of described memory storage 200, be respectively the first original license file (Original License A, be called for short OLA), the second original license file (Original License B, be called for short OLB), the 3rd original license file (Original License C, be called for short OLC) and the 4th original license file (Original License D, be called for short OLD), each original license file can be called as original license file.Each original license file comprises corresponding sign and filler, and these fillers all produce at random, and described sign is used for showing the identity of oneself, shows it oneself is OLA such as the sign of the first original license file, rather than other file.Fig. 5 shows an example of the first original license file, wherein this original license file of hypothesis is 512Bbytes, the first hurdle represents position (location), the second hurdle is file data (Hex Value, hexadecimal value), third column is for describing (Description), the data of 0x00 and 0x1F0 position are the sign (FLAGa) of this original license file, the data of 0x10 to 0x1F0 position are the filler (STUFFa) of this original license file, and these fillers all produce at random.The example of other original license file can be with reference to shown in Figure 5.
As shown in Figure 4; it shows the logical partition of the memory module 220 of described memory storage; it includes file system area, original license file district and content protecting district; wherein file system area stores file system; such as FAT(File Allocation Table) system etc.; original license file district can store above-mentioned four original license files, and the content protecting district can store the data through encrypting.
In mutual verification process, also can use four and activate license file (Active License), be respectively first and activate license file (Active License A, be called for short ALA), second activates license file (Active License B is called for short ALB), and the 3rd activates license file (Active License C, be called for short ALC) and the 4th activation license file (Active License D is called for short ALD).Each activates license file and comprises corresponding sign, and described sign is used for showing the identity of oneself, shows it oneself is ALA such as the first sign that activates license file, rather than other file, and these signs all are that main frame 100 and memory storage 200 are appointed in advance.
In this embodiment, described mutual authentication process 300 comprises the steps.
Step 301, main frame checks in the memory storage whether original license file is arranged.
Described memory storage 200 connects with main frame 100 by described host interface 212, and memory storage can offer main frame with the file system in the described memory module 220.Described main frame can determine in the described memory module 220 whether original license file is arranged by the file system in the memory module 220.If main frame is checked through original license file is arranged in the memory module 220, then described mutual authentication process 300 enters step 302, otherwise main frame thinks that described memory storage is illegal, then described mutual authentication process 300 directly enters step 315, thinks authentification failure.
Step 302, main frame send to memory storage and write the first original license file order.Concrete, main frame sends to described microprocessor 212 by host interface 214 and writes the first original license file order, comprise in this order that first activates license file (Active License A, be called for short ALA), this activation license file comprises the first sign, the first random number and filler, and the first random number and filler are produced at random by main frame.First activates license file by according to a preconcerted arrangement rule generation of main frame, activate license file=first sign the+the first random number+filler such as first, can also be that (other activate license files also can adopt similar mode to first activation license file=the first sign+filler+first random number+filler, the below no longer is repeated in this description), wherein first be designated prior agreement.
Step 303, memory storage obtain first and activate license file.Concrete, described microprocessor 212 is resolved and is describedly write the first original license file order and obtain first and activate license file, and from the first activation license file, obtain the first sign and the first random number, wherein said first activates license file is stored among the described RAM215.
Step 304, whether the first sign that the microprocessor judges first of memory storage activates license file is correct, if, think that main frame may be legal, enter step 305 and proceed authentication, otherwise, think that main frame is illegal, enters step 317, authentification failure.
Step 305, main frame send to memory storage and read the second original license file order.Concrete, main frame sends to described microprocessor 212 by host interface 214 and reads the second original license file order.
Step 306, memory storage are returned second and are activated license file to main frame.Concrete, described microprocessor 212 is resolved the described second original license file order of reading, and generates the second activation license file and activate license file with described second to return to described main frame.This activates among license file storage and the described RAM215, and it comprises the second sign, the second random number and filler, and the second random number and filler are produced at random by memory storage.Second activate license file by memory storage according to a preconcerted arrangement rule generate, activate license file=second sign the+the second random number+filler such as second, wherein second be designated prior agreement.
Step 307, main frame obtain second and activate license file.Described main frame activates from second and obtains the second sign and the second random number the license file.
Step 308, main frame judge whether the second sign of the second activation license file is correct, if so, thinks that memory storage may be legal, enters step 309 and proceeds authentication, otherwise, think that memory storage is illegal, enters step 317, authentification failure.
Processes of main frame and memory storage exchange random number and preliminary authentication from step 302 to step 308.So far, have simultaneously the first random number and the second random number in the main frame, also had simultaneously the first random number and the second random number in the memory storage.Simultaneously, main frame thinks that memory storage may be legal, and memory storage thinks that main frame may be legal, and the below will further authenticate mutually.
Step 309, main frame and memory storage all produce host key (HostKey) and device keys (DeviceKey) based on the first random number and the second random number, have simultaneously like this host key and device keys in the main frame, also had simultaneously host key and device keys in the memory storage.For instance, can with first at any time number carry out XOR and obtain host key with the second random number, can with first at any time number carry out obtaining device keys with exclusive disjunction with the second random number, can also adopt the scheme of other various prior agreements come to first at any time number carry out computing and then obtain host key and device keys with the second random number.Concrete, the microprocessor 212 in the described memory storage produces host key and device keys based on the first random number and the second random number.
Step 310, main frame are sent to memory storage and are write the 3rd original license file order.Concrete, main frame sends to described microprocessor 212 by host interface 214 and writes the 3rd original license file order, comprise in this order that the 3rd activates license file, the 3rd activates license file comprises the 3rd sign, the first ciphertext and filler, this first ciphertext produces according to host key and the first encryption rule, and described filler produces at random.The 3rd activate license file by main frame according to a preconcerted arrangement rule generate, activate license file=3rd sign the+the first ciphertext+filler such as the 3rd, wherein the 3rd be designated prior agreement.In one embodiment, the first ciphertext=FuncC (Hostkey), wherein FuncC is exactly the first encryption rule of agreement, it can be a kind of enciphering and deciphering algorithm, such as AES (Advanced Encryption Standard) algorithm or DES (Data Encryption Standard), or other enciphering and deciphering algorithms, Hostkey is the main frame host key that oneself calculates in step 309, and the implication of this formula is in lower first ciphertext that generates of FuncC rule (or function) according to host key.
Step 311, described memory storage obtain the 3rd and activate license file from write the 3rd original license file order, and obtain the 3rd sign and the first ciphertext from the 3rd activation license file.Concrete, described microprocessor is resolved and is describedly write the 3rd original license file order and obtain the 3rd and activate license file, and activates from the 3rd and to obtain the 3rd sign and the first ciphertext the license file, wherein the 3rd activates among license file storage and the described RAM215.
Step 312, whether microprocessor judges the 3rd sign and first ciphertext of described memory storage be correct.
Described microprocessor can judge first whether the 3rd sign is correct, if so, thinks that main frame may be legal, continues to judge whether the first ciphertext is correct, otherwise, think that main frame is illegal, enters step 317, authentification failure.When judging the first ciphertext, described microprocessor 212 can calculate the authentication ciphertext with the host key that self produces by the first encryption rule equally according to a preconcerted arrangement, such as authentication ciphertext=FuncC (Hostkey), FuncC herein appoints that with main frame Hostkey is that described microprocessor 212 oneself calculates in step 309.If main frame is legal, the first ciphertext that so described microprocessor 212 obtains from main frame should be complementary with the own authentication ciphertext that produces according to identical rule or be identical, if main frame is illegal, the first ciphertext that so described microprocessor 212 obtains from main frame should not be complementary with the own authentication ciphertext that produces according to identical rule or be not identical.Therefore, if the first ciphertext that described microprocessor 212 obtains from main frame should be complementary with the own authentication ciphertext that produces according to identical rule or be identical, memory storage thinks that this main frame is legal so, memory storage passes through the authentication of main frame, authenticating step below continuing, otherwise memory storage thinks that these main frame right and wrong are legal, enters step 317, authentification failure.
From step 310 to step 312 be memory storage to the further verification process of main frame, if authentication is passed through, then memory storage thinks that main frame is legal, otherwise memory storage thinks that main frame is illegal.
Step 313, main frame send to memory storage and read the 4th original license file order.Concrete, main frame sends to described microprocessor 212 by host interface 214 and reads the 4th original license file order.
Step 314, memory storage are returned the 4th and are activated license file to main frame.Concrete, described microprocessor 212 is resolved described the 4th original license file order of reading, generating the 4th activates license file and described the 4th activation license file is returned to described main frame, this activation license file comprises the 4th sign, the second ciphertext and filler, this second ciphertext produces according to device keys and the second encryption rule, and described filler produces at random.The 4th activate license file by described microprocessor 212 according to a preconcerted arrangement rule generate, activate license file=4th sign the+the second ciphertext+filler such as the 4th, wherein the 4th be designated prior agreement.In one embodiment, the second ciphertext=FuncD (Devicekey), wherein FuncD is exactly the second encryption rule of agreement, it can be a kind of enciphering and deciphering algorithm, such as AES (Advanced Encryption Standard) algorithm or DES (Data Encryption Standard), or other enciphering and deciphering algorithms, Devicekey is the device keys that described microprocessor 212 calculates oneself, and namely the implication of this formula is in lower second ciphertext that generates of FuncD rule (or function) according to device keys.
Step 315, described main frame activate from the 4th and obtain the 4th sign and the second ciphertext the license file.
Step 316, described main frame judge the 4th the sign and the second ciphertext whether correct.
Described main frame can judge first whether the 4th sign is correct, if so, thinks that memory storage may be legal, continues to judge whether the second ciphertext is correct, otherwise, think that memory storage is illegal, enters step 317, authentification failure.When judging the second ciphertext, described main frame can calculate the authentication ciphertext with the device keys that self produces by the second encryption rule equally according to a preconcerted arrangement, such as authentication ciphertext=FuncD (Devicekey), FuncD herein appoints that with memory storage Devicekey is that main frame oneself calculates in step 309.If memory storage is legal, the second ciphertext of obtaining from memory storage of main frame should be complementary with the own authentication ciphertext that produces according to identical rule or be identical so, if memory storage is illegal, the second ciphertext of obtaining from memory storage of main frame should not be complementary with the own authentication ciphertext that produces according to identical rule or be not identical so.Therefore, if the second ciphertext that main frame obtains from memory storage should be complementary with the own authentication ciphertext that produces according to identical rule or be identical, main frame thinks that this memory storage is legal so, main frame also passes through the authentication of memory storage, and this moment, mutual authentication process 300 entered step 318, this moment, authentication was passed through mutually, otherwise main frame thinks that these memory storage right and wrong are legal, enters step 317, authentification failure.
From step 313 to step 316 be main frame to the further verification process of memory storage, if authentication is passed through, then main frame thinks that memory storage is legal, otherwise main frame thinks that memory storage is illegal.
Fig. 6 shows an example of the first activation license file, Fig. 7 shows an example of the second activation license file, Fig. 8 shows an example of the 3rd activation license file, Fig. 9 shows an example of the second activation license file, suppose that wherein this activation license file is 512Bbytes, the first hurdle represents position (location), and the second hurdle is file data (Hex Value, hexadecimal value), third column is for describing (Description).As shown in Figure 6, the data of 0x00 and 0x1F0 position activate the sign (FLAGa) of license file for this, 0x10 activates the first random number R a of license file for this, the data of 0x20 to 0x1F0 position activate the filler (STUFFa) of license file for this, these fillers all produce at random, and the first random number is that main frame produces at random.As shown in Figure 7, the data of 0x00 and 0x1F0 position activate the sign (FLAGb) of license file for this, 0x10 activates the second random number R b of license file for this, the data of 0x20 to 0x1F0 position activate the filler (STUFFb) of license file for this, these fillers all produce at random, and the second random number is that memory storage produces at random.As shown in Figure 8, the data of 0x00 and 0x1F0 position activate the sign (FLAGc) of license file for this, 0x10 is the first ciphertext ECPc, and the data of 0x20 to 0x1F0 position are this filler (STU FFc) that activates license file, and these fillers all produce at random.As shown in Figure 9, the data of 0x00 and 0x1F0 position activate the sign (FLAGd) of license file for this, 0x10 is the second ciphertext ECPd, and the data of 0x20 to 0x1F0 position are this filler (STUFFd) that activates license file, and these fillers all produce at random.
Those of ordinary skill in the affiliated field should be appreciated that described mutual authentication process 300 is exemplary, can carry out some changes to this mutual authentication process.In the embodiment of a change, also can carry out first step 305-308, rear execution in step 302-304 that is to say to exchange first the second random number, exchanges afterwards the second random number again.In the embodiment of another change, can first execution in step 313-316, execution in step 309-312 again that is to say afterwards, by main frame memory storage is further authenticated first, by memory storage main frame is further authenticated afterwards again.In the embodiment of another change, also execution in step 301 not, and directly from step 302.Certainly, can also carry out other modifications, just give unnecessary details no longer one by one here.
Above the present invention has been carried out enough detailed description with certain singularity.Under those of ordinary skill in the field should be appreciated that the description among the embodiment only is exemplary, under the prerequisite that does not depart from true spirit of the present invention and scope, make change and all should belong to protection scope of the present invention.The present invention's scope required for protection is limited by described claims, rather than limited by the foregoing description among the embodiment.