A kind of numerical information encipher-decipher method based on NFC mobile phone and IC-card
Technical field
The present invention relates to the near-field communication based on NFC() application of the numerical information encryption and decryption of technology, as: the encryption and decryption of SMS, the encryption and decryption of mobile phone numerical information in multiple network communication environment, encryption and decryption that computer data transmits under variety of network environments, and the encryption and decryption technology of various digital device numerical informations under multiple network environment with communication function (as: Wifi, bluetooth, infrared etc.).
Background technology
The encryption and decryption of numerical information is extremely important in the application of net environment.Can say that any equipment being connected on network, if need to carry out communication, all needs to solve the encryption and decryption problem to transmission information.Under normal circumstances, for the not high internet information transmission of security requirement, often adopt SSL transmission encryption and decryption, this encryption and decryption key, is stored in this locality, and key itself is likely under attack.For having personalization, the higher encryption and decryption demand of security requirement, need to adopt extra hardware enciphering and deciphering method, at present common have hardware encryption machine, hardware encryption terminal (as: USB Key) etc., but be all wired connection, or with high costs as specialized equipment, can not carry; Or can only be applied to and have the equipment such as the computer (notebook) of general-purpose interface demand motive program, have the compatibility issue of hardware encryption terminal and computer, portability is also still bad.But nowadays, network interchange has become very important social life part, mobile payment, Mobile business, mobile office, mobile social activity etc., all have strong demand to data encrypting and deciphering.How realizing Mobile portable, convenient and safe numerical information encryption and decryption, particularly realize above-mentioned encryption and decryption based on the most universal current mobile phone, is the key problem that the present invention will solve.
Summary of the invention
Disclosed by the invention is mobile phone and the smart card that a kind of use has NFC communication function, realizes the method for numerical information encryption and decryption.
Technical scheme of the present invention is: a kind of numerical information encipher-decipher method based on NFC mobile phone and IC-card, it is characterized in that, and comprise the following steps:
(1), storage space is set on mobile phone, want numerical information encrypted or deciphering for storing;
(2) on mobile phone screen, point out, described IC-card is affixed on to the mobile phone back side, realize NFC communication;
(3) to mobile phone and (or) IC-card authenticates as the legitimacy of encryption and decryption equipment;
(4), according to the cannonical format of specifying, send to IC-card from mobile phone will be by the numerical information of encryption and decryption in batches;
(5) according to the cannonical format of specifying, received from mobile phone terminal by IC card will be by the numerical information of encryption and decryption in batches, and submit to the algorithm of appointment and the key of appointment carries out encryption and decryption computing in the lump, and operation result is sent to mobile phone terminal;
(6), when the numerical information sending finishes, the work of the mobile phone upper demonstration of curtain frequently numerical information encryption and decryption completes, and IC-card is removed from the mobile phone back side.
Described will numerical information encrypted or deciphering be SMS, multimedia message, or any numerical information that receives or preserve on mobile phone, comprises video, audio frequency, image, Word message.
The legitimacy certification of described step (3) realizes by verifying IC-card PIN or mobile phone and IC-card binding relationship.
In described step (4), in the time of sending and receiving numerical information in batches, at head or the afterbody of every batch of numerical information, the handset program mark of will annotating, so that in the time that abnormal interruption occurs in NFC communication, follow-up work can continue to be carried out, and avoids all to restart.
The cannonical format of described appointment, refer to the needs for different encryption and decryption contents, by the numerical information of encryption and decryption, it can be the full detail of a full document, be divided into some isometric character fields, also can be the part summary of full document, as: the beginning of document and/or/certain parts of images information of some numeral in ending, document or figure, video documents.
The beneficial effect that the present invention embodies is:
1, encryption and decryption key storage, on the smart card with NFC function, had both ensured the security of key storage, had realized again Mobile portable and carry out the convenience of numerical information encryption and decryption.
2, the data interaction in encryption and decryption process by NFC communication, realizes between mobile phone and smart card, and not other complementary program supports such as demand motive, do not exist compatible problem.
3, because mobile phone has the abundantest communication modes, mobile phone is also the mutual main body of current Mobile data, based on the numerical information encryption and decryption of mobile phone and smart card realization, be most convenient solution the problem of the hard encryption and decryption of data on the mobile phone such as note, multimedia message, be also the digital encryption and decryption equipment of tool versatility.
Brief description of the drawings
Fig. 1 is the process flow diagram of the embodiment of the present invention.
Embodiment
Due to disclosed by the invention be a kind of numerical information encipher-decipher method based on NFC mobile phone and IC-card, therefore first emphasize prior art involved in the present invention at this, in other words, fundamental technical specifications.Mobile phone of the present invention should be the smart mobile phone with NFC communication function, and IC-card of the present invention should be has NFC communication function, and has the smart card of arithmetic capability (CPU).And IC-card chip provides symmetry or asymmetric arithmetic, or the chip-stored space above-mentioned algorithm that provides software to realize.Above-mentioned fundamental technical specifications all can be realized by prior art.
With reference to accompanying drawing 1, implementation process of the present invention comprises mobile phone and IC-card two parts.
Mobile phone part:
1, storage space is set on mobile phone, wants numerical information encrypted or deciphering for storing.This numerical information can be SMS, multimedia message, or any numerical information that receives or preserve on mobile phone, comprises the fileinfos such as video, audio frequency, image, word.
2, on mobile phone screen, point out, described IC-card is affixed on to the mobile phone back side (realizing NFC communication).
3, to mobile phone and (or) IC-card authenticates as the legitimacy of encryption and decryption equipment.Authentication method can be realized by checking IC-card PIN or mobile phone and IC-card binding relationship.Wherein, checking IC-card PIN refers to, in IC-card, be set by the user in advance a PIN(PIN (Personal Identification Number)) code, then, before carrying out numerical information encryption and decryption, first user must input corresponding PIN code on mobile phone, after mobile phone and IC-card are pressed close to (mode of NFC mobile phone and IC-card communication), this PIN code be passed into IC-card and with IC-card in predefined PIN code compare, if PIN code is identical, the legitimacy of mobile phone and IC-card by certification.The checking of mobile phone and IC-card binding relationship refers to, in IC-card, be set by the user in advance the IMEI of a mobile phone and (or) the IMSI of Mobile phone card, then before carrying out numerical information encryption and decryption, first user must press close to mobile phone and IC-card (mode of NFC mobile phone and IC-card communication), by handset program (App) by the IMSI of the IMEI of mobile phone and (or) Mobile phone card import into IC-card and with IC-card in predefined mobile phone IMEI and (or) Mobile phone card IMSI compare, if IMEI and (or) IMSI are identical, the binding relationship of mobile phone and IC-card is by certification.
4, according to specifying cannonical format, send to IC-card from mobile phone will be by the numerical information of encryption and decryption in batches.Meanwhile, according to specifying cannonical format, receive by the numerical information of encryption and decryption from IC-card in batches, and be stored in mobile phone designated storage area.Note, in the time of sending and receiving numerical information in batches, at head or the afterbody of every batch of numerical information, the handset program mark of will annotating, so that in the time that abnormal interruption occurs in NFC communication, follow-up work can continue to be carried out, and avoids all to restart.This work is very important, because as NFC communication mode, occurs that communication abnormality belongs to normal phenomenon.
5, when mobile phone sends and receives after the end mark of numerical information, all worked, the work of the mobile phone upper demonstration of curtain frequently numerical information encryption and decryption completes, and IC-card is removed from the mobile phone back side.
IC-card part:
1, in the step 2 of above-mentioned mobile phone part, in mobile phone screen prompting, described IC-card is affixed on behind the mobile phone back side, implement following operation.
2, carry out legitimacy certification with mobile phone.Authentication method can be realized by checking IC-card PIN or mobile phone and IC-card binding relationship.Wherein, checking IC-card PIN refers to, in IC-card, be set by the user in advance a PIN(PIN (Personal Identification Number)) code, then, before carrying out numerical information encryption and decryption, first user must input corresponding PIN code on mobile phone, after mobile phone and IC-card are pressed close to (mode of NFC mobile phone and IC-card communication), this PIN code be passed into IC-card and with IC-card in predefined PIN code compare, if PIN code is identical, the legitimacy of mobile phone and IC-card by certification.The checking of mobile phone and IC-card binding relationship refers to, in IC-card, be set by the user in advance the IMEI of a mobile phone and (or) the IMSI of Mobile phone card, then before carrying out numerical information encryption and decryption, first user must press close to mobile phone and IC-card (mode of NFC mobile phone and IC-card communication), by handset program (App) by the IMSI of the IMEI of mobile phone and (or) Mobile phone card import into IC-card and with IC-card in predefined mobile phone IMEI and (or) Mobile phone card IMSI compare, if IMEI and (or) IMSI are identical, the binding relationship of mobile phone and IC-card is by certification.
3, according to the cannonical format of specifying, IC-card receives from mobile phone terminal in batches will be by the numerical information of encryption and decryption, and submit to the algorithm of appointment and the key of appointment carries out encryption and decryption computing in the lump.Operation result is sent to mobile phone terminal.
4 until after the appearance of numerical information end mark, stop sending.
Note, in the above-described embodiments, pointed " cannonical format of appointment " in the step 3 of the step 4 of mobile phone part and IC-card part, refer to the needs for different encryption and decryption contents, by the numerical information of encryption and decryption, can be the full detail of a full document, be divided into some isometric character fields, also can be the part summary of full document, as: the beginning of document and (or) certain parts of images information of some numeral in ending, document or figure, video documents.