A kind of guard method of PHS mobile phone identification information
Technical field
The present invention relates to the PHS mobile phone, particularly is the guard method of a kind of PHS mobile phone to authentication information.
Background technology
Carry out commercial mobile communication system at present and mainly contain cdma system, gsm system and PHS system, correspondingly, three kinds of portable terminals are arranged: CDMA mobile phone, GSM mobile handset and PHS mobile phone.Parallel operation typically refers to the situation that more than one mobile phone uses same phone number.CDMA mobile phone and GSM mobile handset all are to utilize the secrecy processing of separation between machine and card technology realization to the mobile phone authentication information, can prevent the appearance of parallel operation effectively.
But at present the PHS mobile phone (being commonly called as wireless access hand-held set, Personal Handyphone System(PHS) or Personal Handyphone System) that uses does not adopt the separation between machine and card technology, and be to use the number of writing device directly with number, authentication information (AuthenticationKey) sensitive data of etc.ing with the mode of the plaintext mobile phone memory that writes direct.The big hidden danger that this technical implementation way causes is that technical threshold is lower, obtains the authentication information of secret easily by illegal means.At present occurred utilizing the terminal program coded to read authentication information and by forcing to read the situation that whole eeprom contents obtain authentication information.If someone is written to the information of obtaining on other the phs terminal again, make a plurality of users use same Subscriber Number jointly, this has just formed illegal parallel operation phenomenon, and this situation cause great loss can for real consumer and PHS Virtual network operator.To be the PHS mobile phone congenital when design has for this technological deficiency, do not find to properly settle the otherwise effective technique scheme of this problem in present application as yet, also do not find the disclosed technical literature data at this particular technology problem simultaneously as yet.
Summary of the invention
Technical problem to be solved by this invention is exactly the situation at the illegal parallel operation of above-mentioned PHS mobile phone, proposes a kind of guard method of PHS mobile phone identification information, can prevent the illegal parallel operation of PHS mobile phone effectively, guarantees consumer and benefits of operators.
Core concept of the present invention is: at utmost compatible on the market in the method for the number of writing substantially of the PHS mobile phone that uses, at first write authentication information by existing method, use the key of a certain hardware chip unique corresponding mark information of a pair of and mobile phone right, when the authentication use for the first time of PHS mobile phone, encryption key with cipher key pair is expressly encrypted authentication information, elder generation is decrypted with the decruption key of cipher key pair when using the PHS mobile phone later at every turn, and authentication information expressly is put among the SRAM for calling.
Technical scheme of the present invention is achieved in that a kind of guard method of PHS mobile phone identification information, comprises the following steps:
The number of writing step: the number of writing terminal expressly writes authentication information in the mobile phone memory by normal flow;
Encrypting step: the PHS mobile phone is expressly encrypted authentication information when carrying out first authentication, and the authentication information that substitutes original storage with the authentication information ciphertext is expressly, comprising:
A) the mobile phone internal processes obtains encryption key from the particular memory region that can't visit except that the mobile phone internal processes;
B) utilize encryption key expressly to use cryptographic algorithm to carry out cryptographic calculation, obtain the authentication information ciphertext authentication information;
C) cover storage authentication information ciphertext in mobile phone memory Central Plains authentication information memory address expressly;
Decryption step: later PHS mobile phone carries out corresponding decrypt operation to the authentication information ciphertext when each start, the authentication information that obtains expressly is stored among the SRAM of mobile phone to call for handset program, comprising:
D) the mobile phone internal processes reads the authentication information ciphertext from mobile phone memory;
E) the mobile phone internal processes obtains decruption key from the particular memory region that can't visit except that the mobile phone internal processes;
F) utilize decruption key that the authentication information ciphertext is carried out corresponding decrypt operation and obtain authentication information expressly;
G) will obtain dispatching among the SRAM that power information expressly is stored in mobile phone and call for handset program;
Described encryption key and decruption key are that a key is right, are a pair of and a certain hardware chip unique corresponding mark information mobile phone, are stored in the internal storage of this hardware chip.
Described enciphering and deciphering algorithm is a public key algorithm.The encryption indicator position is set after the number of writing terminal expressly writes authentication information in the mobile phone memory in the described number of writing step is " unencryption "; The mobile phone internal processes detects the encryption indicator position for starting encipheror at once after " unencryption " in the encrypting step, after encrypting step is finished the encryption indicator position is revised as " encrypting "; The mobile phone internal processes detects the encryption indicator position and starts decryption step for " encrypting " back in the decryption step.
Described encryption key and decruption key are stored in the portion of baseband chip among P2ROM or the ROM, and handset program does not provide key right external reference interface.
The authentication information guard method that the present invention proposes; at first ablation process and encryption and decryption process are relatively independent; have with the common number of writing operation well compatible; can the maximum possible compatibility on the market in the method for the number of writing substantially (as series such as WT020, UTS702F) of using mobile phone model; can make operator on the existing equipment basis, easily finish this operation, not need to increase the coding tools that cost more renews.Secondly, by the encryption key that is stored in the specific region authentication information is expressly encrypted when using for the first time, in mobile phone memory, stored ciphertext; Encrypting the each start use in back deciphers authentication information with decruption key earlier; plaintext is stored among the SRAM for handset program calls; authentication information expressly will be lost automatically behind each mobile phone shutdown, and deciphering once can effectively be protected authentication information so again in the mobile phone power-on start-up course.At last; key is to being stored in the specific memory zone; mobile phone does not provide access key right external interface; guarantee that key is not to leaking; this is read complete different with the EEPROM data easily by the outside; fundamentally stopped to obtain the right approach of key, reached the purpose of protection PHS mobile phone identification information by the mode of copy.In sum; the authentication information guard method that the present invention proposes can prevent effectively that PHS mobile phone identification information is illegally accessed, and prevents the generation of illegal parallel operation phenomenon; improve the system safety performance of PHS mobile phone, ensured user and benefits of operators fully.
Description of drawings
Fig. 1 is the hardware configuration schematic diagram of existing PHS mobile phone.
Fig. 2 is the flow chart of the authentication information guard method that proposes of the present invention.
Fig. 3 a preferred embodiment of the present invention overview flow chart.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
Fig. 1 is the hardware configuration schematic diagram of existing PHS mobile phone.As shown in Figure 1, PHS mobile phone hardware structure is divided into baseband portion and radio frequency part.With baseband chip BBIC is that core is formed baseband circuit, the PHS handset program generally is stored in the external memory storage, promptly be stored on FLASH or the ROM, the adjustable parameter of PHS mobile phone generally is stored on the EEPROM, in the prior art, the PHS handset program directly is stored in manufacture process on ROM (read-only memory) or the Flash (flash memory), and when mobile phone used, handset program was loaded among SRAM, the DRAM and moves.Very important authentication information just is present among the EEPROM with true form form expressly on the PHS mobile phone.When needs used authentication information, handset program read from storage area, and this storage area allows external interface to conduct interviews, and wherein Cun Chu data (comprising authentication information) are obtained by the outside easily and divulged a secret.Described baseband portion links to each other with outside by the IO interface, can control charging circuit battery is carried out charging operations, and battery is given stabilized voltage power supply LDO with electric power, gives baseband chip and radio frequency part power supply by stabilized voltage power supply LDO.Baseband portion is talked about by microphone MIC, and RECEIVER send words by receiver, send ring by loud speaker BUZZER when calling.The signal that radio frequency part is sent here baseband portion carries out giving network system by antenna transmission after the modulation.Display module LCD MODULE is used to show mobile phone interface information, and keypad information input baseband portion is handled.
Fig. 2 is the flow chart of the authentication information guard method that proposes of the present invention.As shown in Figure 2, the method for the present invention's proposition comprises the following steps:
One, write step: the number of writing terminal expressly writes authentication information in the mobile phone memory by normal flow.The mobile phone memory here can be that FLASH also can be EEPROM.
Two, encrypting step: the PHS mobile phone is expressly encrypted authentication information when carrying out first authentication, and the authentication information that substitutes original storage with the authentication information ciphertext expressly.Specifically comprise: a) the mobile phone internal processes obtains encryption key from the particular memory region that can't visit except that the mobile phone internal processes.Described encryption key and decruption key are that a key is right, are a pair of and a certain hardware chip unique corresponding mark information mobile phone, are stored in the internal storage of this hardware chip, can not lead to software and change.B) utilize encryption key expressly to use cryptographic algorithm to carry out cryptographic calculation, obtain the authentication information ciphertext authentication information.C) cover storage authentication information ciphertext in mobile phone memory Central Plains authentication information memory address expressly.In order to reach protection authentication information purpose expressly; to authentication information encrypt finish after essential step be exactly that the original authentication information of deletion is expressly in mobile phone memory; and the authentication information ciphertext after the encryption of storage process, ciphertext is also only used in use from now on.
Three, decryption step: later PHS mobile phone carries out corresponding decrypt operation to the authentication information ciphertext when each start, the authentication information that obtains expressly is stored among the SRAM of mobile phone to call for handset program.Decryption step specifically comprises: d) the mobile phone internal processes reads the authentication information ciphertext from mobile phone memory; E) the mobile phone internal processes obtains decruption key from the particular memory region that can't visit except that the mobile phone internal processes; F) utilize decruption key that the authentication information ciphertext is carried out corresponding decrypt operation and obtain authentication information expressly.Deciphering and encryption are the processes of an inverse operation, and the authentication information before obtaining deciphering by ciphertext and decruption key expressly.Decipherment algorithm used herein and the cryptographic algorithm of using the previously cryptographic algorithm that can use public-key, more typical public key encryption algorithm such as RSA Algorithm can use in the present invention.G) will obtain dispatching among the SRAM that power information expressly is stored in mobile phone and call for handset program.Plaintext is stored among the SRAM for handset program calls; authentication information expressly will be lost automatically behind each mobile phone shutdown, and deciphering is once called in SRAM again in the mobile phone power-on start-up course; utilize the SRAM outage to lose the characteristics of stored information, can effectively protect authentication information.In a preferred embodiment of the invention, described encryption key and decruption key solidify in the portion that is stored in baseband chip among P2ROM or the ROM, and handset program does not provide key right external reference interface.The right visit of key can only be undertaken by the internal processes of mobile phone.P2ROM is meant Production ProgrammedROM, and it does not need masking process, but production stage one-time programming writes specific program, and common ROM need to produce be to write when making by the mask mode.The various aspects of performance of P2ROM more has superiority than common ROM, the encapsulation use of these two kinds of memories that mobile phone base band chip inside is integrated at present.Comprising encryption key and decruption key is the whole baseband chip inside that is encapsulated at interior P2ROM or ROM content, can only be by handset program visit itself, the user can't obtain the inter access inlet of P2ROM or ROM, can not obtain to leave in the data among P2ROM or the ROM by the visit to EEPROM.Here the unauthorized access mode except that the mobile phone internal processes of indication mainly is the illegal copies of EEPROM, write modes such as driver access memory space voluntarily, this also be at present illegal parallel operation person obtain key information expressly the time institute take one of main technological means.The key of described encryption key and decruption key is to also being stored in the storage area that only allows the visit of mobile phone internal processes among the FLASH.In order to carry out cryptographic calculation and the requirement of satisfying the related protocol of PHS mobile phone identification, for example meet the requirement of STEPHI algorithm and FEAL algorithm, usually the data length that requires encryption key and decruption key is more than the 8bit, length is consistent on same type PHS mobile phone gets final product, the different model mobile phone can suitably change, and can determine according to different situations.
Fig. 3 a preferred embodiment of the present invention overview flow chart.The encryption indicator position is set after in a preferred embodiment of the invention, the number of writing terminal expressly writes authentication information in the mobile phone memory in the number of writing step is " expressly "; The mobile phone internal processes detects the encryption indicator position for starting encipheror at once after " expressly " in the encrypting step, after encrypting step is finished the encryption indicator position is revised as " ciphertext "; The mobile phone internal processes detects the encryption indicator position and starts decryption step for " ciphertext " back in the decryption step.Specifically as shown in Figure 5: 1, an encryption indicator position just is set when the number of writing step.This flag bit has only two states: " unencryption " and " encrypting ", " unencryption " are expressly, and " encrypting " is ciphertext, in an embodiment, represents " unencryption " with " 0 ", represents " encrypting " with " 1 ".In a preferred embodiment of the invention, do not encrypt immediately after the number of writing is finished, nature should be provided with the encryption indicator position and be " 0 ".2, after the number of writing of PHS mobile phone was finished, initialization was carried out in start.For the first time opening initialization is bound to carry out authorizing procedure, just authentication first.3, judge authentication information encryption indicator position, see and whether encrypt.If 4 authentication information encryption indicator positions are " 0 ", then start encrypting step, and after encrypting step is finished, " 1 " is revised as in the encryption indicator position.In a preferred embodiment of the invention, during initialization first, authentication information encryption indicator position must be " 0 ", therefore will start encrypting step, after encryption is finished " 1 " is revised as in the encryption indicator position, shows " encrypting ".Detailed description had been done in concrete encrypting step front, did not repeat them here.If 5 authentication information encryption indicator positions are " 1 ", then move decryption step, and after deciphering is finished, authentication information is expressly put into SRAM for calling.Decryption step repeats no more as mentioned above.According to step 4, because carried out encryption during initialization first, thus from the PHS mobile phone start shooting for the second time the beginning after start each time, detected encryption indicator position must be " 1 ", therefore need deciphering, then authentication information is expressly put into SRAM for calling.
Use the guard method of the authentication information of the present invention's proposition, the encryption and decryption that authentication information writes storage medium and authentication information is two independent step, therefore can be compatible to greatest extent at present in the number of the writing method of the PHS mobile phone that uses, guaranteed benefits of operators, need not to increase cost and purchase the new number of writing equipment; On the other hand; after the PHS mobile phone uses for the first time; only store the ciphertext of authentication information; even the total data in a certain PHS mobile phone memory is copied in the another one mobile phone memory; this is equivalent to cipher-text information is all copied on the other mobile phone; but the technical scheme that proposes according to the present invention; former PHS mobile phone has facility information unique, that can not rewrite; the key that is encryption and decryption is right; key also just can't copy, like this passing through external interface access; because key is to the unknown, authentication information has expressly also obtained protection effectively.Even copy on the PHS mobile phone of a same model, by the authentication information ciphertext of key of self to coming with copy, also be to obtain correct authentication information plaintext, be the disabled user since key to difference, still correct authentication information can't be obtained, thereby illegal parallel operation can be effectively prevented.