CN106874813B - A kind of method automatically selecting M1 card and smart card - Google Patents

A kind of method automatically selecting M1 card and smart card Download PDF

Info

Publication number
CN106874813B
CN106874813B CN201510920867.3A CN201510920867A CN106874813B CN 106874813 B CN106874813 B CN 106874813B CN 201510920867 A CN201510920867 A CN 201510920867A CN 106874813 B CN106874813 B CN 106874813B
Authority
CN
China
Prior art keywords
card
simulation
default
sector number
key
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
Application number
CN201510920867.3A
Other languages
Chinese (zh)
Other versions
CN106874813A (en
Inventor
刘振东
郑黎方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sumavision Technologies Co Ltd
Original Assignee
Sumavision Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Sumavision Technologies Co Ltd filed Critical Sumavision Technologies Co Ltd
Priority to CN201510920867.3A priority Critical patent/CN106874813B/en
Publication of CN106874813A publication Critical patent/CN106874813A/en
Application granted granted Critical
Publication of CN106874813B publication Critical patent/CN106874813B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/10009Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves
    • G06K7/10257Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation sensing by radiation using wavelengths larger than 0.1 mm, e.g. radio-waves or microwaves arrangements for protecting the interrogation against piracy attacks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/0723Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips the record carrier comprising an arrangement for non-contact communication, e.g. wireless communication circuits on transponder cards, non-contact smart cards or RFIDs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/067Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components
    • G06K19/07Record carriers with conductive marks, printed circuits or semiconductor circuit elements, e.g. credit or identity cards also with resonating or responding marks without active components with integrated circuit chips
    • G06K19/073Special arrangements for circuits, e.g. for protecting identification code in memory
    • G06K19/07309Means for preventing undesired reading or writing from or onto record carriers

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Microelectronics & Electronic Packaging (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • General Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)
  • Storage Device Security (AREA)

Abstract

The present invention provides a kind of method for automatically selecting M1 card and smart card, this method comprises: when smart card receives the certification instruction of M1 reader transmission, it generates the first random number and is sent to M1 reader, certification instruction carries default sector number, smart card includes multiple simulation M1 cards, and each simulation M1 card includes a default sector number;It receives M1 reader and carries out encrypted encryption data for the first random number;Since multiple simulation M1 cards the simulation M1 card of highest priority, encryption data is decrypted according to the corresponding key of default sector number of simulation M1 card and default decipherment algorithm, wherein the corresponding key of default sector number of each simulation M1 card is different;When determining according to the corresponding key of default sector number and default decipherment algorithm of any simulation M1 card to encryption data successful decryption, it is activated state by any simulation M1 holding and terminates to decrypt process.The present invention can automatically select simulation M1 card, improve user experience.

Description

A kind of method automatically selecting M1 card and smart card
Technical field
The present invention relates to technical field of intelligent card more particularly to a kind of method for automatically selecting M1 card and smart cards.
Background technique
Currently, the multiple Mifare1 of analog (hereinafter referred to as M1) block in the same smart card, which is supported 14443-4 TypeA and Mifare1 interface protocol is created that multiple simulations by 14443-4 TypeA in same smart card M1 card, and one of simulation M1 is placed in activated state.
It include microprocessor (CPU), random access memory (RAM), read-only storage in the smart card of this multiple M1 cards of simulation Device (ROM), electrically erasable system memory (EEPROM), RF (Radio Frequency, radio frequency) interface and COS (Chip Operating System, chip operating system).
When the smart card is located in the radio-frequency region of M1 reader, M1 reader sends certification instruction to the smart card, Sector number is carried in certification instruction;Smart card searches the simulation that activated state is in the smart card according to the sector number received The corresponding key of the sector number of M1 card;Smart card is decrypted according to the encryption data that key pair M1 reader is sent;Such as Fruit decryption is unsuccessful, then needs artificially to select the simulation M1 card in corresponding with the M1 reader smart card, and by selection Simulation M1 holding is state of activation, and other simulation M1 holdings are unactivated state.
To sum up, although there are multiple simulation M1 cards in existing smart card, currently locate in M1 reader with smart card When the M1 card of state of activation mismatches, need to manually select the switching with the matched simulation M1 of the M1 reader, smart card is not Simulation M1 card can be automatically selected to match corresponding M1 reader.
Summary of the invention
The present invention provides a kind of method for automatically selecting M1 card and smart card, to solve in the prior art in M1 reader When mismatching with the M1 card for being currently at state of activation in smart card, need to manually select and the matched simulation M1 of the M1 reader Switching, smart card cannot automatically select simulation M1 card to match corresponding M1 reader the problem of.
A method of automatically selecting M1 card, comprising:
When smart card receives the certification instruction of M1 reader transmission, generates the first random number and is sent to M1 reader, The certification instruction carries default sector number, and the smart card includes multiple simulation M1 cards, and each simulation M1 card includes one pre- If sector number;
It receives the M1 reader and carries out encrypted encryption data for first random number;
Since the multiple simulation M1 card the simulation M1 card of highest priority, according to the described default of simulation M1 card The encryption data is decrypted in the corresponding key of sector number and default decipherment algorithm, wherein each to simulate the pre- of M1 card If the corresponding key of sector number is different;
Determine the default corresponding key of sector number and the default decipherment algorithm pair according to any simulation M1 card When the encryption data successful decryption, it is activated state by any simulation M1 holding and terminates to decrypt process.
In the method, the simulation M1 card of the highest priority is to be currently at activation shape in the multiple simulation M1 card The simulation M1 card of state, alternatively, a simulation M1 card being previously active for the smart card.
The simulation M1 card of activated state has currently been in priority match smart card of the embodiment of the present invention.
The method, further includes:
Determine the corresponding key of default sector number according to simulation M1 card each in the smart card and the default solution When close algorithm is decrypted unsuccessfully to the encryption data, determine that the smart card and the M1 reader mismatch.
The method, further includes:
Receive the key updating instruction for the carrying new key that the M1 reader is sent;
According to the new key and it is multiple simulation M1 card in other simulation M1 cards the corresponding key of default sector number, Update the corresponding key of default sector number of any simulation M1 card.
The embodiment of the present invention can guarantee the safety of smart card by more new key.
In the method, according to the default sector number of other simulation M1 cards in the new key and multiple simulation M1 cards Corresponding key updates the corresponding key of default sector number of any simulation M1 card, specifically includes:
Judge it is the multiple simulation M1 card in other simulation M1 cards the corresponding key of default sector number whether with it is described New key is identical;
If so, prompt key updating failure;
If not, being the new key by the corresponding key updating of default sector number of any simulation M1 card.
The embodiment of the present invention carries out duplicate checking behaviour when the key to sector is updated, to the new key that M1 reader is sent Make, so as to avoid the identical problem of the corresponding key of same fan area code of multiple simulation M1 cards, and then ensure that and automatically select Simulate the accuracy of M1 card.
The present invention also provides a kind of smart cards, comprising:
Transmission unit generates the first random number and is sent to M1 when for receiving the certification instruction of M1 reader transmission Reader, the certification instruction carry default sector number, and the smart card includes multiple simulation M1 cards, and each simulation M1 card includes One default sector number;
Receiving unit carries out encrypted encryption data for first random number for receiving the M1 reader;
Decryption unit, for simulating since the multiple in M1 card the simulation M1 card of highest priority, according to the simulation The encryption data is decrypted in the default corresponding key of sector number of M1 card and default decipherment algorithm, wherein every The corresponding key of default sector number of a simulation M1 card is different;
Determination unit, for determining according to the corresponding key of the default sector number of any simulation M1 card and described pre- If decipherment algorithm is to the encryption data successful decryption, it is activated state by any simulation M1 holding and terminates decryption stream Journey.
In the smart card, the simulation M1 card of the highest priority is to be currently at activation in the multiple simulation M1 card The simulation M1 card of state, alternatively, a simulation M1 card being previously active for the decryption unit.
In the smart card, the determination unit is also used to:
Determine the corresponding key of default sector number according to simulation M1 card each in the smart card and the default solution When close algorithm is decrypted unsuccessfully to the encryption data, determine that the smart card and the M1 reader mismatch.
The smart card, further includes:
Key updating units, for receiving the key updating instruction for the carrying new key that the M1 reader is sent;According to The corresponding key of default sector number of the new key and other simulation M1 cards in multiple simulation M1 cards, updates described any Simulate the corresponding key of default sector number of M1 card.
In the smart card, the key updating units are according to other in the new key and multiple simulation M1 cards The corresponding key of default sector number of M1 card is simulated, when updating any corresponding key of default sector number for simulating M1 card, It is specifically used for:
Judge it is the multiple simulation M1 card in other simulation M1 cards the corresponding key of default sector number whether with it is described New key is identical;
If so, prompt key updating failure;
If not, being the new key by the corresponding key updating of default sector number of any simulation M1 card.
Using the method provided in an embodiment of the present invention for automatically selecting M1 card and smart card, intelligence is had the advantages that The sector number sent according to M1 reader can be blocked, successively traverse the key of the sector number of each simulation M1 card in smart card, and It is decrypted according to the key, if continuing basis when unsuccessful according to the decryption of the key of the sector number of present day analog M1 card The key decryption of the sector number of next simulation M1 card, to realize automatically selecting for simulation M1 card.It is real using the present invention Apply example, when switching between smart card difference M1 reader and difference M1 reader matched simulation M1 card it is different when, it can be achieved that Automatically selecting for simulation M1 card, does not need manually to participate in, improves user experience.
Detailed description of the invention
Fig. 1 is the method flow diagram provided in an embodiment of the present invention for automatically selecting M1 card;
Fig. 2 is the method flow diagram of the default sector number corresponding key provided in an embodiment of the present invention for updating simulation M1;
Fig. 3 is provided in an embodiment of the present invention according to the corresponding key progress of default sector number of the new key to simulation M1 card The specific embodiment flow chart of update;
Fig. 4 is one of smart card schematic diagram provided in an embodiment of the present invention;
Fig. 5 is the two of smart card schematic diagram provided in an embodiment of the present invention.
Specific embodiment
The method and smart card of adaptive switching M1 card provided by the invention are carried out more with reference to the accompanying drawings and examples It explains in detail.
In the prior art, multiple simulation M1 cards be can establish in a smart card, each simulation M1 card includes multiple sectors, For any simulation M1 card, each sector corresponds to different numbers in simulation M1 card.The fan that any two simulation M1 card is included Area's quantity is identical, and the sector number in any two simulation M1 card is identical, for example, the first simulation M1 card includes 2 sectors, fan Area's number is respectively 1,2, and the second simulation M1 card also includes 2 sectors, and sector number is also respectively 1,2.Any two simulate M1 The corresponding key of same fan area code of card can be the same or different, and the different sectors number in same simulation M1 card are corresponding close Key can be the same or different.
The embodiment of the present invention provides a kind of method for automatically selecting M1 card, as shown in Figure 1, comprising:
Step 101, it when smart card receives the certification instruction of M1 reader transmission, generates the first random number and is sent to M1 Reader, the certification instruction carry default sector number, and the smart card includes multiple simulation M1 cards, and each simulation M1 card includes One default sector number.
Specifically, M1 reader is communicated with the smart card foundation when smart card is entered in the radio-frequency region of M1 reader, two M1 reader is instructed to smart card transmission certification after person establishes communication, carries the M1 reader fan to be accessed in certification instruction Area code, i.e., default sector number.Continue to use the prior art, any simulation M1 card includes multiple sectors, each sector in simulation M1 card Corresponding different numbers.The number of sectors that any two simulation M1 card is included is identical, and the sector in any two simulation M1 card Number identical, for example, the default sector number that carries is 1 in certification instruction, corresponding one of each simulation M1 card numbers the fan for being 1 Area code.Wherein each simulation M1 card includes a default sector number specifically: for every in multiple simulation M1 cards of smart card A simulation M1 card, simulation M1 card include multiple sectors, the corresponding sector number in a sector in simulation M1 card, the simulation It include a default sector number in the corresponding multiple sector numbers of M1 card, that is, the corresponding each fan in each sector of simulation M1 card In area code, having a sector number is default sector number.For example, there are two simulate M1 card, the first simulation M1 card pair altogether in smart card Answer a default sector number, the second corresponding default sector number of simulation M1 card.
Step 102, it receives the M1 reader and carries out encrypted encryption data for first random number.
Specifically, when M1 reader receives the first random number of smart card transmission, according to preset Encryption Algorithm and The first random number is encrypted with preset-key, and encrypted data are sent to smart card, it is preferable that preset-key is The corresponding key of default sector number of any simulation M1 card in multiple simulation M1 cards, it is of course also possible to all simulations of smart card The corresponding key of default sector number of M1 card is different from the preset-key, does not illustrate the smart card and the M1 reader not at this time Match.Smart card receives the encrypted data that M1 reader is sent.
Step 103, since the multiple simulation M1 card the simulation M1 card of highest priority, according to simulation M1 card The encryption data is decrypted in the corresponding key of default sector number and the default decipherment algorithm, wherein each The corresponding key of default sector number for simulating M1 card is different.
Specifically, limiting in the embodiment of the present invention, the default sector number of each simulation M1 card in smart card is corresponding close Key is different, for example, the fan that the number of the corresponding key in sector and the second simulation M1 card that the number of the first simulation M1 card is 1 is 1 The corresponding key in area is different, just can guarantee automatically select correct and unique simulation M1 card in this way.Smart card can not be preparatory Know with the matched simulation M1 card of M1 reader, therefore, smart card is according to setting rule to multiple simulation M1 cards progress therein Priority ranking successively traverses each simulation M1 card, for the simulation of current order since the simulation M1 card of highest priority M1 card, which is executed, to be added according to the default corresponding key of sector number and the default decipherment algorithm of simulation M1 card to described The step of ciphertext data is decrypted, until according to the corresponding key successful decryption of default sector number of one of simulation M1 card or Person terminates to decrypt process when decrypting failure according to the corresponding key of default sector number of all simulation M1 cards.
Wherein, the sector number numbering of each simulation M1 card is same as the prior art, according to simulation M1 card The encryption data is decrypted in the default corresponding key of sector number and the default decipherment algorithm, specifically includes: obtaining The corresponding key of default sector number of simulation M1 simultaneously sends M1 reader according to the key and preset decipherment algorithm Encryption data is decrypted.Preset decipherment algorithm is corresponding with the Encryption Algorithm in M1 reader, determines and carries out to encryption data When result after decryption is identical as the first random number that smart card is sent, successful decryption is determined.
Step 104, the default corresponding key of sector number according to any simulation M1 card and the default solution are determined When close algorithm is to the encryption data successful decryption, it is activated state by any simulation M1 holding and terminates to decrypt process.
Specifically, determining that basis is appointed during smart card traverses each simulation M1 card according to the priority of simulation M1 card When the corresponding key successful decryption of default sector number of one simulation M1 card, terminate to decrypt process and any mould by the successful decryption Quasi- M1 holding is activated state.The certification of after smart card successful decryption it is believed that smart card side passes through, after the certification of smart card side passes through, Added using the second random number that the corresponding key pair M1 reader of the default sector number of the simulation M1 card of successful decryption is sent Close to obtain encrypted data and be sent to M1 reader, after after M1 reader side, certification passes through, M1 reader can be decrypted into this The simulation M1 card of function such as is written and read at the operation.
The embodiment of the present invention, the sector number that smart card is sent according to M1 reader successively traverse each simulation in smart card The corresponding key of the sector number of M1 card, and be decrypted according to the key, if according to the sector number of present day analog M1 card When corresponding key decrypts unsuccessful, continue to be decrypted according to the corresponding key of the sector number of next simulation M1 card, to reach To the purpose for automatically selecting simulation M1 card.Using the embodiment of the present invention, when switching between the different M1 reader of smart card and Different readers are supported when different simulation M1 cards, it can be achieved that automatically selecting for M1 card is simulated, to select and current M1 reading The matched simulation M1 card of device is write, does not need manually to participate in, improves user experience.
The application scenarios of the embodiment of the present invention can be with are as follows: after smart card and the first M1 reader authenticate successfully, the first M1 is read It writes device and can simulate M1 card to first in the smart card and be written and read etc. and operate;When the smart card enters penetrating for the 2nd M1 reader When within the scope of frequency, smart card executes the step 101- step 104 of the embodiment of the present invention, to select and the 2nd M1 reader The the second simulation M1 card matched, wherein the 2nd M1 reader and the first simulation M1 card mismatch.
The executing subject of step 101- step 104 is specially chip operating system (the Chip Operating in smart card System, COS).
Specifically, smart card in advance numbers each simulation M1 card therein, simulation M1 is sticked into according to the size of number The sequence of row major grade, it is higher or lower to number smaller simulation M1 card priority.
Smart card with M1 reader before communicating, wherein may have the simulation M1 card for being in activated state, therefore Preferably, the simulation M1 card of the highest priority is the simulation M1 that state of activation is currently in the multiple simulation M1 card Card, remaining simulation M1 card carry out priority ranking according to the number size of simulation M1 card.
Smart card with M1 reader before communicating, wherein when all simulation M1 cards are all in unactivated state, smart card Can activation instruction be sent to which simulation M1 is placed in state of activation, at this point, highest priority to a simulation M1 card at random Simulation M1 card be preferably a simulation M1 card being previously active of smart card.
Specifically, only one simulation M1 card of synchronization is in activated state in same smart card, therefore work as successful decryption Simulation M1 card when being in activated state, other simulation M1 cards except the simulation M1 card of the successful decryption are set to un-activation shape State.
Specifically, determining the default sector according to each simulation M1 card after traversing all simulation M1 cards in smart card When number corresponding key and the default decipherment algorithm decrypt failure to the encryption data, the smart card and institute are determined State M1 reader mismatch.
Specifically, determining the corresponding key of default sector number according to any simulation M1 card in smart card and presetting Decipherment algorithm is to encryption data successful decryption, and after any simulation M1 is placed in activated state, as shown in Figure 2, further includes:
Step 201, the key updating instruction for the carrying new key that the M1 reader is sent is received.
Step 202, according to the default sector number pair of other simulation M1 cards in the new key and multiple simulation M1 cards The key answered updates the corresponding key of default sector number of any simulation M1 card.
Authenticated successfully specifically, any simulation M1 in the embodiment of the present invention is stuck in M1 reader side, i.e., M1 reader with Smart card three times mutually certification pass through after, determine to this it is any simulation M1 card the corresponding sector of default sector number in application progress Update, alternatively, determine this it is any simulation M1 card the corresponding sector of default sector number in addition newly in application, to this The corresponding key of default sector number of one simulation M1 card is updated, to guarantee the safety of smart card.M1 reader can be to Smart card sends key updating instruction, carries simulation M1 card (any i.e. in step 201 for being currently at activated state in the instruction Simulate M1 card) default sector number new key, smart card according to the key updating instruction, which is preset The corresponding key of sector number is updated.
Step 202, according to the default sector number pair of other simulation M1 cards in the new key and multiple simulation M1 cards The key answered updates the corresponding key of default sector number of any simulation M1 card, as shown in figure 3, specifically including:
Step 301, judging the corresponding key of default sector number of other simulation M1 cards in the multiple simulation M1 card is It is no identical as the new key, if so, executing step 302, otherwise, execute step 303.
Specifically, other simulation M1 cards in multiple simulation M1 cards do not include the M1 card in activated state, i.e., it does not include step Any simulation M1 card described in rapid 202.
Step 302, prompt key updating failure.
Specifically, determining the corresponding key of default sector number and new key of at least one of simulation M1 card simulation M1 card When identical, key updating failure is prompted.
It step 303, is the new key by the corresponding key updating of default sector number of any simulation M1 card.
Specifically, determining that the corresponding key of default sector number of all simulation M1 cards and new key are equal in other simulation M1 cards When not identical, the corresponding key updating of default sector number by any simulation M1 card is the new key.
Specifically, smart card is instructed according to the key updating, it is first determined each mould in unactivated state in smart card Whether the corresponding key of default sector number of quasi- M1 card (other simulation M1 cards i.e. in step 202) repeats with new key, if It repeats, then " return " key" updates failure, if do not repeated, the default sector number of the simulation M1 card in activated state is corresponding Key updating is new key.
The embodiment of the present invention carries out duplicate checking behaviour when the key to sector is updated, to the new key that M1 reader is sent Make, so as to avoid the identical problem of the corresponding key of same fan area code of multiple simulation M1 cards, and then ensure that and automatically select Simulate the accuracy of M1 card.
Based on inventive concept same as the method provided in an embodiment of the present invention for automatically selecting M1 card, the embodiment of the present invention A kind of smart card is also provided, as shown in Figure 4, comprising:
Transmission unit 401 generates the first random number and is sent to when for receiving the certification instruction of M1 reader transmission M1 reader, the certification instruction carry default sector number, and the smart card includes multiple simulation M1 cards, each simulation M1 Ka Bao Include a default sector number;
Receiving unit 402 carries out encrypted encryption number for first random number for receiving the M1 reader According to;
Decryption unit 403, for simulating since the multiple in M1 card the simulation M1 card of highest priority, according to the mould The encryption data is decrypted in the default corresponding key of sector number and default decipherment algorithm of quasi- M1 card, wherein The corresponding key of default sector number of each simulation M1 card is different;
Determination unit 404, for determining the corresponding key of the default sector number and institute according to any simulation M1 card When stating default decipherment algorithm to the encryption data successful decryption, it is activated state by any simulation M1 holding and terminates to decrypt Process.
In the smart card, the simulation M1 card of the highest priority is to be currently at activation in the multiple simulation M1 card The simulation M1 card of state, alternatively, a simulation M1 card being previously active for the decryption unit.
In the smart card, the determination unit is also used to:
Determine the corresponding key of default sector number according to simulation M1 card each in the smart card and the default solution When close algorithm is decrypted unsuccessfully to the encryption data, determine that the smart card and the M1 reader mismatch.
As shown in figure 5, the smart card, further includes:
Key updating units 405, for receiving the key updating instruction for the carrying new key that the M1 reader is sent;Root According to the corresponding key of default sector number of other simulation M1 cards in the new key and multiple simulation M1 cards, described appoint is updated The corresponding key of default sector number of one simulation M1 card.
In the smart card, the key updating units are according to other in the new key and multiple simulation M1 cards The corresponding key of default sector number of M1 card is simulated, when updating any corresponding key of default sector number for simulating M1 card, It is specifically used for:
Judge it is the multiple simulation M1 card in other simulation M1 cards the corresponding key of default sector number whether with it is described New key is identical;
If so, prompt key updating failure;
If not, being the new key by the corresponding key updating of default sector number of any simulation M1 card.
Using the method provided in an embodiment of the present invention for automatically selecting M1 card and smart card, intelligence is had the advantages that The sector number sent according to M1 reader can be blocked, successively traverse the key of the sector number of each simulation M1 card in smart card, and It is decrypted according to the key, if continuing basis when unsuccessful according to the decryption of the key of the sector number of present day analog M1 card The key decryption of the sector number of next simulation M1 card, to realize automatically selecting for simulation M1 card.It is real using the present invention Apply example, when switching between smart card difference M1 reader and difference M1 reader matched simulation M1 card it is different when, it can be achieved that Automatically selecting for simulation M1 card, does not need manually to participate in, improves user experience.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, various changes and modifications can be made to the invention without departing from essence of the invention by those skilled in the art Mind and range.In this way, if these modifications and changes of the present invention belongs to the range of the claims in the present invention and its equivalent technologies Within, then the present invention is also intended to include these modifications and variations.

Claims (10)

1. a kind of method for automatically selecting M1 card characterized by comprising
When smart card receives the certification instruction of M1 reader transmission, generates the first random number and be sent to M1 reader, it is described Certification instruction carries default sector number, and the smart card includes multiple simulation M1 cards, and each simulation M1 card includes a default fan Area code;
It receives the M1 reader and carries out encrypted encryption data for first random number;
Since the multiple simulation M1 card the simulation M1 card of highest priority, according to the default sector of simulation M1 card The encryption data is decrypted in number corresponding key and default decipherment algorithm, wherein the default fan of each simulation M1 card The corresponding key of area code is different;
It determines according to the default corresponding key of sector number and the default decipherment algorithm of any simulation M1 card to described When encryption data successful decryption, it is activated state by any simulation M1 holding and terminates to decrypt process.
2. the method as described in claim 1, which is characterized in that the simulation M1 card of the highest priority is the multiple simulation The simulation M1 card of state of activation is currently in M1 card, alternatively, a simulation M1 card being previously active for the smart card.
3. the method as described in claim 1, which is characterized in that further include:
It determines and is calculated according to the corresponding key of default sector number and the default decryption of simulation M1 card each in the smart card When method is decrypted unsuccessfully to the encryption data, determine that the smart card and the M1 reader mismatch.
4. method according to claim 1 or 2, which is characterized in that further include:
Receive the key updating instruction for the carrying new key that the M1 reader is sent;
According to the corresponding key of default sector number of other simulation M1 cards in the new key and multiple simulation M1 cards, update The corresponding key of default sector number of any simulation M1 card.
5. method as claimed in claim 4, which is characterized in that according to other in the new key and multiple simulation M1 cards The corresponding key of default sector number of M1 card is simulated, the corresponding key of default sector number of any simulation M1 card, tool are updated Body includes:
Judge it is the multiple simulation M1 card in other simulation M1 cards the corresponding key of default sector number whether with described Xinmi City Key is identical;
If so, prompt key updating failure;
If not, being the new key by the corresponding key updating of default sector number of any simulation M1 card.
6. a kind of smart card characterized by comprising
Transmission unit when for receiving the certification instruction of M1 reader transmission, generating the first random number and being sent to M1 read-write Device, the certification instruction carry default sector number, and the smart card includes multiple simulation M1 cards, and each simulation M1 card includes one Default sector number;
Receiving unit carries out encrypted encryption data for first random number for receiving the M1 reader;
Decryption unit, for simulating since the multiple in M1 card the simulation M1 card of highest priority, according to simulation M1 card The default corresponding key of sector number and default decipherment algorithm the encryption data is decrypted, wherein Mei Gemo The corresponding key of default sector number of quasi- M1 card is different;
Determination unit, for determining the default corresponding key of sector number and the default solution according to any simulation M1 card When close algorithm is to the encryption data successful decryption, it is activated state by any simulation M1 holding and terminates to decrypt process.
7. smart card as claimed in claim 6, which is characterized in that the simulation M1 card of the highest priority is the multiple mould The simulation M1 card of state of activation is currently in quasi- M1 card, alternatively, a simulation M1 card being previously active for the decryption unit.
8. smart card as claimed in claim 6, which is characterized in that the determination unit is also used to:
It determines and is calculated according to the corresponding key of default sector number and the default decryption of simulation M1 card each in the smart card When method is decrypted unsuccessfully to the encryption data, determine that the smart card and the M1 reader mismatch.
9. smart card as claimed in claims 6 or 7, which is characterized in that further include:
Key updating units, for receiving the key updating instruction for the carrying new key that the M1 reader is sent;According to described The corresponding key of default sector number of new key and other simulation M1 cards in multiple simulation M1 cards, updates any simulation The corresponding key of default sector number of M1 card.
10. smart card as claimed in claim 9, which is characterized in that the key updating units according to the new key with And the corresponding key of default sector number of other simulation M1 cards in multiple simulation M1 cards, update the pre- of any simulation M1 card If being specifically used for when the corresponding key of sector number:
Judge it is the multiple simulation M1 card in other simulation M1 cards the corresponding key of default sector number whether with described Xinmi City Key is identical;
If so, prompt key updating failure;
If not, being the new key by the corresponding key updating of default sector number of any simulation M1 card.
CN201510920867.3A 2015-12-11 2015-12-11 A kind of method automatically selecting M1 card and smart card Active CN106874813B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510920867.3A CN106874813B (en) 2015-12-11 2015-12-11 A kind of method automatically selecting M1 card and smart card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510920867.3A CN106874813B (en) 2015-12-11 2015-12-11 A kind of method automatically selecting M1 card and smart card

Publications (2)

Publication Number Publication Date
CN106874813A CN106874813A (en) 2017-06-20
CN106874813B true CN106874813B (en) 2019-06-18

Family

ID=59178042

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510920867.3A Active CN106874813B (en) 2015-12-11 2015-12-11 A kind of method automatically selecting M1 card and smart card

Country Status (1)

Country Link
CN (1) CN106874813B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113395156B (en) * 2020-03-13 2023-02-03 上海复旦微电子集团股份有限公司 Logic encryption card, authentication method thereof and computer readable storage medium
CN113271290B (en) * 2020-12-29 2023-03-31 上海零数众合信息科技有限公司 Digital identity management device based on block chain
CN113724424A (en) * 2021-10-28 2021-11-30 云丁网络技术(北京)有限公司 Control method and device for equipment
CN115296378B (en) * 2022-10-09 2023-01-06 广东天枢新能源科技有限公司 Charging control method, system and device based on smart card and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2279651Y (en) * 1996-12-25 1998-04-22 中国科学院沈阳自动化研究所 Intelligent card data collector
CN102136081A (en) * 2011-03-24 2011-07-27 北京握奇数据系统有限公司 Integrated circuit (IC) card and data updating method thereof
CN102801730A (en) * 2012-08-16 2012-11-28 厦门市美亚柏科信息股份有限公司 Information protection method and device for communication and portable devices
CN103544114A (en) * 2013-10-12 2014-01-29 上海柯斯软件有限公司 Multiple M1 card control system based on single CPU card and control method thereof
CN105676106A (en) * 2015-12-31 2016-06-15 东信和平科技股份有限公司 Non-contact intelligent card chip model automatic detection system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2279651Y (en) * 1996-12-25 1998-04-22 中国科学院沈阳自动化研究所 Intelligent card data collector
CN102136081A (en) * 2011-03-24 2011-07-27 北京握奇数据系统有限公司 Integrated circuit (IC) card and data updating method thereof
CN102801730A (en) * 2012-08-16 2012-11-28 厦门市美亚柏科信息股份有限公司 Information protection method and device for communication and portable devices
CN103544114A (en) * 2013-10-12 2014-01-29 上海柯斯软件有限公司 Multiple M1 card control system based on single CPU card and control method thereof
CN105676106A (en) * 2015-12-31 2016-06-15 东信和平科技股份有限公司 Non-contact intelligent card chip model automatic detection system and method

Also Published As

Publication number Publication date
CN106874813A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN106874813B (en) A kind of method automatically selecting M1 card and smart card
CN109325584A (en) Federation's modeling method, equipment and readable storage medium storing program for executing neural network based
EP3198781B1 (en) Techniques for distributing secret shares
US10135794B2 (en) Cryptographic communication device, cryptographic communication method, and non-transitory storage medium storing program
CN106357393B (en) A kind of safe data transmission method and device
CN107483485A (en) Generation method, authorization method, relevant apparatus and the terminal device of authorization code
CN105991612A (en) User identity authentication method and device
CN105631655A (en) HCE-based mobile payment method, device and mobile terminal
CN109787762A (en) Key management method, the electronic equipment of each self-generating key components of server
JP2007173999A (en) Authentication system and device to be authenticated
CN109214221A (en) A kind of identity card reader verification method, host computer and identity card reader
CN103870760B (en) Multiple terminals method for managing security and device
CN107229958A (en) A kind of intellective IC card data detection method and device
CN109446793A (en) A kind of account based on Windows agent changes decryption method and device
CN104270754B (en) A kind of Subscriber Identity Module method for authenticating and device
CN106156548B (en) Authentication method and device for program encryption
CN105892953B (en) Distributed data processing method and device
CN109981591A (en) Single client generates key management method, the electronic equipment of private key
CN101931941A (en) Method and system for authentication/binding of telecom smart card and mobile terminal
CN105809063B (en) A kind of data processing method and safety chip device
CN110943832B (en) Data encryption transmission method
CN109426701A (en) Operation method, operating system and the storage medium of data model
CN106844173A (en) A kind of information processing method and electronic equipment
CN107959670B (en) Dynamic password generation method and device, terminal equipment and storage medium
CN105574404A (en) Method and device for prompting to change password

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