WO2018045917A1 - 一种授权系统、方法及卡片 - Google Patents

一种授权系统、方法及卡片 Download PDF

Info

Publication number
WO2018045917A1
WO2018045917A1 PCT/CN2017/100209 CN2017100209W WO2018045917A1 WO 2018045917 A1 WO2018045917 A1 WO 2018045917A1 CN 2017100209 W CN2017100209 W CN 2017100209W WO 2018045917 A1 WO2018045917 A1 WO 2018045917A1
Authority
WO
WIPO (PCT)
Prior art keywords
card
authentication
authorization
card reader
information
Prior art date
Application number
PCT/CN2017/100209
Other languages
English (en)
French (fr)
Inventor
李东声
Original Assignee
天地融科技股份有限公司
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 天地融科技股份有限公司 filed Critical 天地融科技股份有限公司
Publication of WO2018045917A1 publication Critical patent/WO2018045917A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/45Structures or tools for the administration of authentication

Definitions

  • the present invention relates to the field of electronic technologies, and in particular, to an authorization system, method, and card.
  • each reader is independent of each other and has no association with other readers. Therefore, the criminals only need to break through a card reader to obtain the authorization that the card reader can implement.
  • the time required for criminals to break through each card reader is similar, that is, the higher-level authorized card readers in the prior art do not achieve a higher security guarantee.
  • the present invention is directed to solving the above problems/one of them.
  • the main object of the present invention is to provide an authorization method
  • Another object of the present invention is to provide a card
  • An aspect of the present invention provides an authorization method, including: a card receiving an authentication instruction sent by a first card reader, wherein the authentication instruction carries identification information and first authentication information; and the card is based on the identification information.
  • Determining a control authority wherein the control authority comprises: a precondition for the first card reader to give an authorization; the card acquiring a first security state of the current record, wherein the first security state comprises: the card An authorization that has been successfully obtained; the card determines whether the card satisfies the control authority according to the first security state, and if so, authenticates the first authentication information, and if the authentication passes,
  • the first card reader sends the second authentication information, and updates the first security state, and records that the card has successfully obtained the authorization of the first card reader; the first card reader receives the second The authentication information determines whether the card is authorized according to at least the second authentication information.
  • a card including: a first receiving module, configured to receive a signature sent by a first card reader The certificate command, wherein the authentication command carries the identification information and the first authentication information; the determining module is configured to determine the control authority according to the identifier information, where the control authority includes: the first card reader gives The first obtaining module is configured to obtain a first security state of the current record, where the first security state includes: an authorization that the card has been successfully obtained; and a first determining module, configured to: The first security state determines whether the card satisfies the control authority, and if yes, triggers the first authentication module; the first authentication module is configured to perform authentication on the first authentication information, if the authentication is passed The first sending module is configured to send the second authentication information to the first card reader, and the updating module is configured to update the first security state, and the recording device The card has been successfully authorized by the first card reader.
  • an authorization system comprising: a first card reader and the card according to any one of claims 13 to 20; wherein the first card reader comprises: a second The receiving module is configured to receive the second authentication information sent by the card, and the authorization module is configured to determine, according to the second authentication information, whether the card is authorized.
  • the present invention provides an authorization method, in which the card responds to the authentication command of the first card reader only when it is determined that the control authority is satisfied, and the first card is read.
  • the device sends the authentication information to obtain the authorization of the first card reader. Therefore, for the card reader with higher security level, the corresponding control authority can be set, for example, one card has been obtained and one or more other card readers have been obtained.
  • Authorization if an illegal user wants to break a card reader and obtain authorization from the card reader, he must first obtain authorization from one or more other card readers in order to respond to the card reader's authentication command, and then obtain the license. Authorization to the card reader.
  • the second authentication information is sent to the first card reader. Therefore, if the card of the user is stolen, if the card is to be illegally read, the simulation is required.
  • Multiple card readers send authentication commands to the card, which may cause the card to respond to a higher security card reader, in order to obtain an authentication key corresponding to the higher security card reader, thereby increasing illegal access to the card.
  • the difficulty of storing information improves the security of the card.
  • FIG. 2 is a schematic structural diagram of a card according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic structural diagram of another card according to Embodiment 2 of the present invention.
  • FIG. 4 is a schematic structural diagram of an authorization system according to Embodiment 3 of the present invention.
  • FIG. 5 is a schematic structural diagram of another authorization system according to Embodiment 3 of the present invention.
  • This embodiment provides an authorization method, as described in FIG. 1, the method includes the following steps (S101-S105):
  • the card receives the authentication command sent by the first card reader, where the authentication command carries the identification information and the first authentication information.
  • the card determines the control authority according to the identifier information, where the control authority includes: a precondition for the first card reader to grant the authorization.
  • S103 The card acquires a first security state of the current record, where the first security state includes: an authorization that the card has been successfully obtained.
  • S104 The card determines whether the card satisfies the control authority according to the first security state, and if yes, authenticates the first authentication information, and if the authentication passes, sends the second authentication information to the first card reader, and updates the first Security status, the record card has been successfully authorized by the first card reader.
  • the first card reader receives the second authentication information, and determines whether the card is authorized according to at least the second authentication information.
  • the card responds to the authentication command of the first card reader only when it is determined that the control authority is satisfied, and sends the authentication information to the first card reader, so as to obtain the first card reader.
  • Authorization therefore, for a higher security card reader, you can set the corresponding control rights, for example, you need a card has been authorized by one or more other readers, if the illegal user wants to break a card reader.
  • To obtain the authorization of the card reader it is necessary to obtain authorization of one or more other card readers in order to respond to the card reader's authentication command, and then it is possible to obtain the authorization of the card reader.
  • the second authentication information is sent to the first card reader.
  • the card reader sends an authentication command to the card, so that the card may respond to the card reader with higher security level, in order to obtain the authentication key corresponding to the card reader, thereby increasing the difficulty of illegally obtaining the information stored in the card. Improve the security of the card.
  • the card may be a magnetic stripe card, an integrated circuit card (IC card), a smart card, or the like, which is not limited in this embodiment, as long as it can be read by the card reader. Cards are all within the scope of this embodiment.
  • the first card reader is a card reader currently interacting with the card, the type and card of the first card reader The type corresponds.
  • the first card reader may be a magnetic card reader; when the card is an IC card, the first card reader may be an IC card reader, in the embodiment, the first card reader
  • the type of card reader is not specifically limited.
  • the card may be of a contact type or a non-contact type. If the card is non-contact type, when the card is within the working distance of the first card reader, the card and the first card reader can communicate, so that communication can be performed without a card. When the card is in contact type, the card can communicate with the first card reader only when the card contact is properly connected to the interface of the first card reader.
  • the first card reader when the card is non-contact type, can periodically broadcast a card search instruction, and if the card is located in the card reading range of the first card reader, the card can respond to the first card reader.
  • the card-finding instruction sends a card-seeking response to the first card reader, and after receiving the card-seeking response, the first card reader can determine the currently read card, and then send an authentication command to the card.
  • the identifier information carried in the authentication command sent by the first card reader may be a unique identifier corresponding to the first card reader, for example, the identifier information may be the serial number of the first card reader, It may be identification information of an authentication key corresponding to the first card reader (ie, an authentication key used to authenticate the first authentication information).
  • the card determines the control authority corresponding to the first card reader by using the identification information, and the pre-condition for granting the authorization by the first card reader is obtained by the control authority, thereby determining whether the card satisfies the first reading.
  • the card device gives a precondition for authorization, thereby determining whether to return the second authentication information to the first card reader.
  • the precondition for granting authorization by the first card reader generally refers to whether the same card has obtained other card readers (referred to as a second card reader in this embodiment for convenience of distinction).
  • Authorization that is, whether the same card has successfully obtained the authorization of a second set of card readers. Therefore, in order to facilitate the judgment of the card, the card will record the information when the card is successfully authorized by a card reader.
  • the information recorded by the card is referred to as the first security state of the card, and after receiving the authentication command from the first card reader, the card obtains the first card reading according to the identification information in the authentication command. After the control authority of the device, according to the first security state stored locally, it can be determined whether the card currently meets the control authority of the first card reader.
  • control authority can be controlled by at least the following two mechanisms:
  • Method 1 Implemented by responding to the response authority of the authentication command. That is, in this mode, the card responds to the received authentication command only if the response authority corresponding to the authentication command is satisfied.
  • the response authority of the authentication command may be set, and the response authority of the authentication command corresponding to the identifier information of each card reader is set to the control authority of the card reader, and in a specific application, the card may be Pre-storing the correspondence between the identification information and the control authority of the response authentication command, after receiving the authentication command, the card searches for the correspondence between the locally stored identification information and the control authority of the response authentication command according to the identification information carried in the authentication instruction. Get control permission in response to the received authentication command.
  • the corresponding relationship between the identification information corresponding to each card reader and the control authority is recorded in the card, wherein the identification information may be the identification information of the card reader or the authentication corresponding to the card reader.
  • the identification information of the key or the like, in step S102 the card may acquire the identifier information corresponding to the identification information in the authentication instruction according to the correspondence relationship.
  • Control permissions In this embodiment, the premise of responding to the received authentication command is set as the card satisfies the corresponding control authority, that is, in the subsequent step S104, the response is only satisfied if the control authority is satisfied according to the first security state.
  • the authentication command sent by the first card reader authenticates the first authentication information carried in the authentication command.
  • Manner 2 Implemented by accessing the file that accesses the storage authentication key.
  • the card authenticates the first authentication information sent by the first card reader, it needs to obtain a corresponding authentication key.
  • the access permission of the file storing the authentication key is set, and the access permission of the file is set.
  • Set the control permission of the card reader corresponding to the authentication key and only when the card satisfies the corresponding access right, the file storing the authentication key can be accessed, and the authentication key corresponding to the first card reader is obtained, that is,
  • the card determines the identification information (for example, the file name) of the file storing the authentication key according to the identification information, and then acquires the control authority to access the file according to the identification information of the file.
  • control authority acquired in step S102 is the access authority for storing the file of the authentication key corresponding to the first card reader, and subsequently in step S104, the card determines whether the file access is currently satisfied.
  • the permission when the judgment is satisfied, allows access to the file, acquires a corresponding authentication key, and then uses the authentication key to authenticate the first authentication information sent by the first card reader.
  • the pre-requisites for the authorization of the card by the first card reader are recorded in the control authority.
  • the preconditions for the authorization by the first card reader include: The second card reader has authorized the same card; the card determines whether the card satisfies the control authority according to the first security state, and includes: determining, according to the first security state, whether the card has successfully obtained the authorization of all the second card readers in the precondition.
  • a group of second card readers can be 0 (indicating that the same card does not need to be authorized by other card readers to obtain the authorization of the first card reader), 1 or Multiple, specifically can be set according to the actual application.
  • the precondition for the authorization of the first card reader can be that the same card does not need to obtain the authorization of any card reader.
  • the precondition for the authorization of the second card reader can be that the same card has successfully obtained the authorization of the first card reader,
  • the premise that the card reader gives authorization may be that the same card has successfully obtained the authorization of the No. 1 card reader and the No. 2 card reader; or, the premise that the No.
  • the authorization of the card reader gives the authorization may be that the same card does not need to obtain any
  • the precondition for the authorization of the second card reader can be that the same card does not need to obtain the authorization of any card reader.
  • the precondition for the authorization of the third card reader is that the same card has successfully obtained the number one card reader. Or the authorization of the second card reader.
  • the precondition for granting authorization by each card reader stored in the card may be recorded by one or more bit strings, and each bit in the bit string corresponds to a card reader, and the value of the bit bit indicates Whether the same card needs to successfully obtain the authorization of the card reader corresponding to the bit.
  • bit 1 may be used to indicate that the card reader corresponding to the bit needs to be obtained
  • bit 0 is used to indicate that the card reader corresponding to the bit is not required to be obtained
  • bit 0 is used to indicate that the card corresponding to the bit needs to be obtained.
  • the authorization of the device, using bit 1 indicates that it is not necessary to obtain the authorization of the card reader corresponding to the bit.
  • bit 1 For convenience of explanation, the following uses bit 1 to indicate that it is necessary to obtain the authorization of the card reader corresponding to the bit, and use the bit. 0 means that it is not necessary to obtain the authorization of the card reader corresponding to the bit.
  • a 3-bit bit can be used to record the preconditions for each card reader to give an authorization, each bit corresponding to a card reader, and the bit string is from left to right.
  • Bits 1 to 3 indicate whether the first card reader, the second card reader, and the third card reader have been successfully authorized for the same card.
  • the control authority of the No. 1 card reader can be expressed as 000, which means that the first card reader gives authorization.
  • the precondition is that no card reader is authorized for the same card; the second card reader is authorized to control. It can be expressed as 100, which means that the second card reader gives authorization: the need for the first card reader to successfully authorize the same card; the third card reader authorization control authority can be expressed as 110, that is, The precondition for the authorization of the third card reader is that the first card reader and the second card reader have been successfully authorized for the same card; or the control authority authorized by the first card reader is indicated as 000, the second number The control authority for the reader authorization is expressed as 000, and the control authority authorized by the third reader is expressed as 100 or 010.
  • the bit string is used to record the control authority of each card reader, and the occupied storage space is relatively small, which can save the storage space of the card.
  • the preconditions for granting authorization by each card reader stored in the card may also be recorded by a list, and the identification information corresponding to the card reader is recorded in the first column of the list, and whether the row is required in the second column of the list is recorded.
  • the card reader has successfully authorized the same card.
  • the key value of the second column of the list may have two states: bit 1 and bit 0. For example, bit 1 indicates that the card reader corresponding to the row needs to be authorized, and bit 0 indicates It is not necessary to obtain the authorization of the corresponding card reader of the row; or, bit 0 indicates that it is necessary to obtain the authorization of the corresponding card reader of the row, and bit 1 indicates that it is not necessary to obtain the authorization of the card reader corresponding to the row.
  • the foregoing card reading system including three card readers is taken as an example.
  • the preconditions for granting authorization by the No. 1 card reader are shown in Table 1.
  • the preconditions for the authorization of the No. 2 card reader are shown in Table 2, and the third reading is given.
  • the preconditions for the authorization given by the card holder are shown in Table 3.
  • Table 1 indicates that the No. 1 card reader does not require the No. 2 card reader and the No. 3 card reader to authorize the card when the card reader grants the card authorization
  • Table 2 indicates that the No. 2 card reader needs the No. 2 when granting the card authorization.
  • the card has authorized the card
  • Table 3 indicates that the No. 3 card reader requires the No. 1 card reader and the No. 2 card reader to authorize the card.
  • the preconditions for granting authorization by each card reader may be expressed in other manners in addition to the above two representations, for example, by means of text, and segmentation of each piece of information by a specific delimiter.
  • the preconditions for granting authorization by the above three card readers can be recorded in the same text file, using the following description:
  • the information in the two *** is the identification information of the card reader, and the information in the two &&> indicates the precondition for the card reader corresponding to the identification information to be authorized, and ## indicates two juxtapositions. Prerequisites.
  • the card records the information in the first security state every time the card is successfully authorized by the card reader, that is, in the first security state of the card, the currently successfully obtained authorization is recorded in the card. .
  • the card may record the first security state by one or more bit strings, and each bit is used to record whether the card has successfully obtained the authorization of a corresponding card reader.
  • bit 1 may be used to indicate that the card has successfully obtained the authorization of the card reader corresponding to the bit
  • bit 0 indicates that the card does not obtain the authorization of the card reader corresponding to the bit, that is, in the initial state, each bit The value of the bit is 0.
  • the card After obtaining the authorization of a card reader, the card corresponding bit position of the card reader is 1, and vice versa.
  • the card can maintain a three-bit bit string, and the first to third bits in the bit string from left to right respectively indicate whether the card obtains the number one card reader, For example, in the initial state, the first security status of the card is 000.
  • the card updates its security status. 100, the card has been authorized by the first card reader, and then the card is swiped in the second card reader. If authorized, the first security status is updated to 110, indicating that the card has obtained the first card reader and the second reading. The card is authorized, and then the card is swiped in the third card reader. If authorized, the first security status is updated to 111, indicating that the card has obtained the first card reader, the second card reader and the third card reader.
  • Authorization the card has been authorized by the first card reader, and then the card is swiped in the third card reader.
  • the card may also use a list to record its first security status, record the identification information of the card reader in the first column of the list, and record whether the card reader corresponding to the row has been successfully authorized in the second column of the list.
  • the second column of the list The value can be two states, bit 1 and bit 0. Bit 1 indicates that the card reader corresponding to the row has been authorized, and bit 0 indicates that the card reader corresponding to the row is not authorized, and vice versa.
  • the first security state and the control authority may be recorded in the same form, for example, using the bit string to record the first security state.
  • control permissions, or use the list to record the first security state and control permissions, or use text to record the first security state and control permissions may also be separately recorded in different forms, for example, using the bit string to record the first security state, using the list record control authority, or using the list to record the first security state, using the bit string to record the control permission.
  • the card may first convert the first security state and the control authority into the same form, and then perform the judgment, or may not convert, for example, If the first security status is recorded in the form of a list, and the control authority is recorded in a bit string, for example, taking the above system including three card readers as an example, assume that the control authority of the third card reader is: 010 If the authorization of the second card reader is required, the card can query whether the value of the entry corresponding to the second card reader in the first security state is 1 or other value indicating that the card has obtained the authorization of the card reader. If yes, it is determined that the card satisfies the control authority; otherwise, it is determined that the card does not satisfy the control authority.
  • step S104 the card determines whether the card is satisfied according to the first security state.
  • the card determines whether the card has successfully obtained the authorization of all the second card readers in the precondition according to the first security state.
  • Authorization without having to consider the order and timing of obtaining authorization.
  • the authorization that the card recorded in the first security state has been successfully obtained includes the authorization of all the second card readers in the precondition
  • the first security state satisfies the control authority, if the card recorded in the first security state is successful
  • the obtained authorization does not include the authorization of all the second card readers in the precondition, and the first security state does not satisfy the control authority.
  • the precondition of the first card reader authorization is 010
  • the first security state of the card is 010 or 110 or 111 or 011
  • the first security state is satisfied.
  • Control authority if the first security status of the card is 000 or 100 or 101 or 001, the first security status does not satisfy the control authority.
  • the method provided in this embodiment further includes: the card clearing the information recorded in the first security state, in the case that the card is not successfully obtained by the first security state.
  • the card in the case that it is determined that the card does not successfully obtain the authorization of all the second card readers in the precondition according to the first security state, it is determined that the card does not satisfy the control authority of the first card reader, and the cell is cleared at this time.
  • the authorization of a card recorded in a secure state has been successfully obtained.
  • the card may All bits in the byte indicating the first security state are all set to 0 or 1 to clear the information recorded in the first security state; if the first security state is represented in a list form, the second column in the list may be All bits are set to 0 or 1 to clear the information recorded in the first security state.
  • the card can clear the information recorded in the first security state in time, which can save the storage space of the card.
  • the precondition for granting authorization by the first card reader may further include: a authorization sequence of authorizing a card by the second card reader and/or each second
  • the validity time of the card reader for authorizing the same card corresponds to the first security state.
  • step S104 when the card determines whether the card satisfies the control authority according to the first security state, it may also determine, according to the first security state, whether the order in which the card is successfully obtained and the authorization sequence in the precondition Consistent; and/or, according to the first security status, determine whether the time when the card is successfully authorized is within the valid time in the precondition.
  • the cards by determining whether the order in which the card is authorized is consistent with the authorization order in the precondition, thereby forming an anti-submarine authorization path, the cards must be authorized in order in a predetermined order. By judging whether the time when the card is successfully authorized is within the effective time of the precondition, the card is prevented from being authorized by the order.
  • the precondition of the first card reader authorization further includes a authorization sequence for authorizing a group of second card readers to authorize the same card and/or each second card reader authorizing the same card.
  • the list can be used to indicate the control authority, the identification information of the card reader is recorded in the first column of the list, and the authorization of the card reader corresponding to the row needs to be successfully obtained in the second column of the list.
  • the third column of the list records the authorization sequence for the second card reader corresponding to the row to authorize the same card, and the fourth column of the list records the effective time for each second card reader to authorize the same card. For example, if a group of second card readers includes a card reader No. 1 and a card reader No.
  • the third column of the row corresponding to the first card reader in the list may be identified as 1, and the third column of the row corresponding to the card reader in the list may be identified as 2.
  • the required authorization sequence may also be indicated by the order of the identification information corresponding to the card reader in the list, without a dedicated column for indication.
  • the required effective time may be the same for all card readers. Therefore, instead of recording the valid time corresponding to each card reader separately, a valid time parameter may be recorded. The specific implementation manner is not limited in this embodiment.
  • the precondition for the first card reader to grant authorization further includes a card authorization sequence for authorizing the same card by the second card reader and/or a valid time for each second card reader to authorize the same card, the card In the first security state, it is also necessary to record related information.
  • the card may add a key of authorization order and/or authorization time in the first security state, and record each card reader when authorizing the card.
  • Authorization order and/or authorization time in the premise
  • the card can record only the specific authorization time in the first security state, and the authorization sequence can reflect the authorization sequence without adding a keyword indicating the authorization sequence.
  • the specific recording form is not limited in this embodiment, as long as the card can obtain the authorization sequence and the authorization time according to the information recorded in the first security state.
  • the precondition of the first card reader authorization includes first obtaining the authorization of the first card reader and then obtaining the authorization of the second card reader, as long as the first security state is The recorded card successfully obtains the authorization of the first card reader earlier than the card successfully obtains the authorization of the second card reader, and then the order in which the card is successfully authorized is the same as the authorization order in the precondition.
  • the first security The status record may be that the card is first authorized by the first card reader, and then the second card reader is authorized, or the card is first authorized by the first card reader, and then the card reader is removed.
  • Authorized by a card reader other than the second card reader for example, the third card reader
  • the order in which the card is successfully authorized is the same as the authorization order in the precondition. If the card successfully obtains the license of the first card reader later than the time to successfully obtain the authorization of the second card reader, the order in which the card is successfully authorized is inconsistent with the order of authorization in the above preconditions.
  • the effective time for the second card reader to authorize the same card may be the duration after the card is authorized by the second card reader, and the authorization is maintained.
  • the effective time of the second card reader to authorize the same card can be set according to the strictness of the authorization. In the scenario of strict control authorization, the effective time can be set relatively small, and the effective time in the relatively loose control authorization scenario Can be set larger.
  • the time when the card in the fourth column of the list indicating the first security state is obtained for obtaining the authorization of the second card reader corresponding to the row may be subtracted from the current time when determining whether the control authority is satisfied.
  • the time when the card recorded in the first security state successfully obtains the authorization of the second card reader is obtained for a duration, and it is determined whether the duration is within the validity time of the authorization of the second card reader to the same card in the precondition, if not, then A security state does not satisfy the control authority, and if so, it is further determined whether other information recorded in the first security state satisfies other requirements of the control authority.
  • timer for each second card reader, and when the card acquires the authorization of one of the second card readers, the timer starts counting, and it is determined whether the card satisfies the first card reader.
  • the duration calculated by the timer corresponding to the second card reader in the precondition is read, and it is determined whether the duration is within a given valid time, thereby determining whether the card satisfies the corresponding precondition.
  • the time duration of each timer may be directly set to a corresponding effective time, for example, 5 minutes, and the second reading in the precondition is directly judged when determining whether the card satisfies the control authority of the first card reader. Whether the timer corresponding to the card is timed out to determine whether the card satisfies the corresponding precondition.
  • the specific implementation manner is not limited in this embodiment.
  • the first security state further includes: the order in which the card is successfully authorized, and/or the time when the card successfully obtains the authorization, in the case that the card does not satisfy the control authority of the first card reader, According to the first safety
  • the order in which the card judges that the card is successfully authorized is inconsistent with the authorization order in the precondition; and/or, according to the first security state, the time when the card is successfully authorized is not within the valid time in the precondition, the card also clears the first security state.
  • the card recorded in the card is successfully obtained in the order of authorization and/or information about when the card was successfully authorized.
  • the card can authenticate the identity of the first card reader by using the first authentication information.
  • the first authentication information may be a check value generated by the first card reader by using the own authentication key to calculate the first calculation factor, where the first calculation factor may be a random number generated by the first card reader. The number can also be the number of times the first card reader is authorized, and the total number of times the card requests authorization. The specific number is not limited in this embodiment.
  • the first card reader uses the authentication key according to a preset verification algorithm. The first calculation factor is calculated to obtain a check value, and the check value is carried in the first authentication information and sent to the card.
  • the preset check algorithm may be a MAC algorithm, or may be another check algorithm, for example, a signature algorithm, which is not limited in this embodiment.
  • the same calculation algorithm as the first card reader is used to calculate the first calculation factor to generate a check value. And comparing whether the calculated check value and the received check value in the first authentication information are the same. If they are the same, the first authentication information is authenticated. If not, the first authentication information fails to pass. If the first authentication information is authenticated, it indicates that the first authentication information has not been tampered with and the identity of the first card reader is legal. If the authentication fails, the first authentication information is tampered with and/or the identity of the first card reader. illegal.
  • the first calculation factor may be that the first card reader is carried in the authentication command and sent to the card, or the card is obtained by using the same rule as the first card reader, which is not limited in this embodiment.
  • the method may further include: the card clearing the information recorded in the first security state.
  • the card clears the information about the authorization that the card recorded in the first security state has been successfully obtained to clear the first security state;
  • the status also includes the order in which the card is successfully authorized, and/or, when the card successfully obtains the authorization, the card also clears the order in which the card recorded in the first security state is successfully authorized, and/or the time the card successfully obtains the authorization.
  • Related information to clear the first security state if the card fails to pass the first authentication information, the method may further include: the card clearing the information recorded in the first security state.
  • the card sends the second authentication information to the first card reader when the first authentication information is authenticated, wherein the second authentication information may be the card using the authentication key and the third calculation factor.
  • the preset verification algorithm performs the calculation of the generated verification value, or the second authentication information may also be a school generated by the card using the authentication key to calculate the first calculation factor and the third calculation factor according to a preset verification algorithm.
  • the verification value may be a MAC algorithm, or may be another verification algorithm, for example, a signature algorithm, which is not limited in this embodiment.
  • the third calculation factor may be generated by the card according to an algorithm agreed with the first card reader (or the background), or may be a count of the number of times the card is authorized, or may be a random factor generated by the card (in this case, The card may transmit the third calculation factor together with the second authentication information to the first card reader or the like.
  • the first card reader can receive the second authentication information by itself. It is determined according to the second authentication information whether it is a card authorization, and may also be judged jointly with the background. For example, the first card reader can authenticate at least the second authentication information by itself, obtain the authentication result, and then determine whether it is the card authorization according to at least the authentication result; or the first card reader can also send the second authentication information to the background. The background authentication is performed on at least the second authentication information, and the authentication result is returned to the first card reader, and then the first card reader determines whether the card is authorized according to at least the authentication result.
  • the first card reader or the background authenticates the second authentication information, using the authentication key of the card, using the same verification algorithm as the card, for the third calculation factor, or the first calculation
  • the factor and the third calculation factor are calculated to generate a check value, and the comparison between the calculated check value and the received check value in the second authentication information is the same. If the same, the second authentication information is authenticated, if not, Then, the second authentication information authentication fails. If the second authentication information is authenticated, it indicates that the second authentication information has not been tampered with and the identity of the card is legal. If the authentication fails, the second authentication information is falsified and/or the identity of the card is invalid.
  • the third calculation factor may also be a second calculation factor stored locally by the card. Therefore, in the optional implementation, after the determining that the card satisfies the control authority, and before the card sends the second authentication information to the first card reader, the method provided by the embodiment further includes: performing the second calculation of the card acquisition. The factor; the card generates the second authentication information according to at least the second calculation factor.
  • the second calculation factor may be obtained when the card is authorized by a card reader. For example, the second calculation factor may be sent by the card reader when the card is authorized by a card reader last time.
  • the calculation factor of the card (for example, may be sent along with the first authentication information described above), or the card is calculated according to a locally stored calculation factor when the authorization of a certain card reader is obtained last time, or may be obtained before the card
  • the calculation factor that the card reader sends to the card when the card reader is authorized which can be set according to the specific application.
  • the background calculates the fourth calculation factor corresponding to the first card reader, and uses the authentication key of the card to adopt the same verification algorithm as the card. Calculating a check value by comparing the calculated factor, or the first calculating factor and the fourth calculating factor, and comparing whether the calculated check value and the received check value in the second authentication information are the same, and if they are the same, the second authentication The information authentication passes, and if they are not the same, the second authentication information authentication fails.
  • the fourth calculation factor is calculated according to the precondition of the authorization given by the first card reader, wherein the precondition for the first card reader to grant the authorization includes: whether the second card reader is required to authorize the same card, and / or, a group of second card readers have authorized the same card.
  • the second calculation factor of the card acquisition may be a calculation factor obtained when the card successfully obtains the authorization of the card reader.
  • the second calculation factor may be a calculation factor that the card reader sends to the card through the authentication command when the card is successfully authorized by the card reader last time, that is, after the card receives the authentication command sent by the card reader, the authentication command is After the authentication information is passed, the card can be considered to have successfully obtained the authorization of the card reader, and the calculation result in the authentication command
  • the child is stored as the second calculation factor; or, the second calculation factor may be obtained by calculating the calculation factor sent by the card reader to the card through the authentication command when the card is successfully authorized by the card reader last time, that is, the card is received.
  • the card After the authentication command sent by the card reader, after the authentication information in the authentication command is authenticated, the card can be considered to have successfully obtained the authorization of the card reader, and then the calculation factor in the authentication command is calculated according to a predetermined algorithm.
  • the calculation result is stored as a second calculation factor; or the second calculation factor may be obtained by computing the second calculation factor stored locally when the card is successfully authorized by the card reader, that is, the card is received by the card reader.
  • the second calculation factor stored locally is calculated according to a predetermined algorithm, and the calculation is performed.
  • the result updates the stored second calculation factor; or the second calculation factor can be a card
  • the second calculation factor of the local storage is calculated by the calculation factor sent by the card reader to the card by the authentication command, that is, after the card receives the authentication command sent by the card reader.
  • the card may consider that the authorization of the card reader has been successfully obtained, and then calculate the second calculation factor stored locally and the calculation factor in the authentication instruction according to a predetermined algorithm, and use The calculation result updates the stored second calculation factor.
  • the background can trace the authorized track of the card according to the calculation parameter of the second authentication information, and then can determine whether the card satisfies the premise of the first card reader. condition.
  • the card after the card transmits the second authentication information to the first card reader, the card updates the stored second calculation factor according to the first calculation factor and/or the second calculation factor.
  • the background may obtain a fourth calculation factor corresponding to the first card reader by: obtaining, by the background, the second card reader to authorize the card or with the first card reader The fourth calculation factor obtained when the third card reader with the same precondition is given the authorization to authorize the card.
  • the background can maintain a table for each card, recording the fourth calculation factor obtained by the card each time it is authorized, to reflect which card readers have been authorized by the same card.
  • the fourth calculation factor may be a calculation factor that the card reader sends to the card through the authentication command when the card reader authorizes the card, or may be the card reader when the card is authorized to read the card.
  • the calculation result obtained by the calculation instruction sent to the card by the authentication instruction may be obtained by calculating the fourth calculation factor obtained when the previous card reader authorizes the card, or may be the previous reading.
  • the fourth calculation factor obtained when the card device authorizes the card is calculated by calculating the calculation factor sent by the card reader to the card through the authentication command.
  • the card may also obtain a second calculation factor according to the following manner: the card acquires a second calculation factor according to the stored one or more third calculation factors, where the third calculation factor includes The calculation factor obtained from the fourth card reader when the card is successfully authorized by the fourth card reader.
  • the background obtaining the fourth calculation factor corresponding to the first card reader includes: obtaining a second calculation factor list in the background, wherein the second calculation factor list includes at least the card successfully obtaining each card reader authorization Every read The fifth calculation factor sent by the card device to the card; the background determines, according to the second calculation factor list, whether the card has successfully obtained the authorization of all the second card readers in the precondition, and if so, obtains from the second calculation factor list The fourth calculation factor corresponding to each second card reader in the precondition.
  • the first card reader can determine whether it is a card authorization according to the second authentication information, and can determine whether the card is authorized according to other information. Therefore, as an optional implementation manner of the embodiment of the present invention, When the authentication result of the second authentication information indicates that the authentication is passed, the first card reader further determines whether the card is authorized according to the authorization permission list of the first card reader. Whether the card is an authorized user of the first card reader is determined whether the card is authorized by the card according to whether the card is in the authorization permission list of the first card reader.
  • the authorization list of the first card reader may be stored in the background, or may be stored locally in the first card reader, and if it is stored locally in the first card reader, it is judged by the first card reader.
  • the background If it is stored in the background, it is judged by the background, and finally, it is combined with the authentication result of authenticating the second authentication information to determine whether it is a card authorization. For example, if the second authentication information is authenticated by the background and the authorized permission list is stored in the background, after the background authenticates the second authentication information, it is further determined whether the card is in the authorization permission list of the first card reader, and if And authenticating the authentication result to the first card reader, the first card reader determines to authorize the card according to the authentication result; and if the first card reader authenticates the second authentication information, the authorization permission list is After being stored in the first card reader, the background authentication of the second authentication information is passed, and the first card reader is returned with an authentication result indicating whether the second authentication information is authenticated, if the authentication result indicates that the second authentication information is authenticated.
  • the first card reader further determines whether the card is in the authorization permission list of the first card reader, and if so, determines to authorize the card, otherwise determines that the card is not authorized.
  • the second authentication information is authenticated by the first card reader and the authorization authority list is stored in the first card reader
  • the first card reader authenticates the second authentication information
  • it is further determined whether the card is in the first In the list of authorized rights of a card reader if yes, it is determined that the card is authorized; and when the first card reader authenticates the second authentication information and the authorized permission list is stored in the background, the first card is read.
  • the device can send the related information of the card to the background, and the background determines whether the card is in the authorization permission list of the first card reader, and returns the determination result to the first card reader, first The card reader determines whether to authorize the card based on the returned judgment result.
  • the second determination of the background record is added on the background side. Whether the security status satisfies the process of controlling permissions.
  • the authorization method provided by the embodiment further includes: acquiring the second security state of the current record card in the background and the first read The control authority of the card device, wherein the second security state comprises: the authorization that the card has been successfully obtained, and the control authority authorized by the first card reader includes: a precondition for the first card reader to give authorization; and determining the card according to the second security state Whether the precondition is satisfied, if yes, obtaining an authentication result indicating that the authentication is passed, and updating the second security state, in which the record card has obtained the authorization of the first card reader, otherwise, the indication that the authentication fails is obtained. Certification If so, clear the second security state.
  • the second security state of the card indicates that the card recorded in the background has been successfully obtained
  • the second security state of the background recording may be in the same form as the first security state of the card recording, for example, using one or A multi-bit bit string, or a list, or a text to record the second security state, and a manner of recording the second security state in the background may be specifically referred to the manner in which the card records the first security state, and details are not described herein again.
  • the second authentication information is authenticated: if the second security state also satisfies the precondition of the authorization given by the first card reader, the authentication result indicating that the authentication is passed can be obtained, in the second security state.
  • the recording card has obtained the authorization of the first card reader; if the second security state does not satisfy the precondition of the authorization given by the first card reader, the authentication result indicating that the authentication fails, is obtained, and the second security state is cleared at this time.
  • all the bit strings or lists recording the second security state may be set to 0 to clear the second security state.
  • the pre-condition for granting the authorization by the first card reader includes only one group of second card readers that have authorized the same card
  • if it is determined according to the second security state whether the card satisfies the control authority Determining, according to the second security status, whether the card has successfully obtained the authorization of all the second card readers in the precondition, that is, only determining whether the card has obtained the authorization of all the second card readers in the precondition, without considering the authorization The order and time. If the authorization that the card recorded in the second security state has been successfully obtained includes the authorization of all the second card readers in the precondition, the authorization of the card recorded in the second security state has been successfully obtained. For the authorization of all the second card readers, the second security state satisfies the control authority. If the card successfully recorded in the second security state does not include the authorization of all the second card readers in the precondition, then The second security state does not satisfy the control authority.
  • the precondition for granting authorization by the first card reader further includes an authorization sequence for authorizing the same card by the second set of card readers and/or the second card reader.
  • the second security state further includes: the order in which the card is successfully authorized, and/or the time when the card successfully obtains the authorization, that is, the background also needs to record the card to obtain each read.
  • the order and/or time of the card authority authorization; determining whether the second security state satisfies the precondition includes: determining, according to the second security state, whether the card has obtained authorization of all the second card readers, and the card obtaining the authorization of the second card reader Whether the order of authorization and/or time satisfies the precondition, that is, whether the order in which the card is successfully authorized according to the second security status is consistent with the authorization order in the precondition, and/or the card is successfully authorized according to the second security status. Whether the time is within the valid time of the precondition.
  • the background determines whether the order of authorization by the card is consistent with the authorization order in the precondition, thereby forming an anti-submarine authorization path, and the cards must be authorized in sequence in a predetermined order.
  • the background prevents the card from being authorized by the order by judging whether the time when the card is successfully authorized is within the valid time in the precondition.
  • the precondition for granting authorization by the first card reader further includes a set of second card reader pairs.
  • the same card performs the authorization order of authorization and/or the effective time for each second card reader to authorize the same card, in the second security state, related information needs to be recorded, specifically, in the second security state.
  • a keyword that adds a new authorization order and/or an authorization time and records the authorization order and/or authorization time when each card reader authorizes the card.
  • the card can record only the specific authorization time in the second security state, and the authorization sequence can reflect the authorization sequence without adding a special authorization sequence.
  • the keyword, the specific recording form is not limited in this embodiment, and only the authorization sequence and the authorization time can be obtained according to the information recorded in the second security state.
  • the authorization method provided by the embodiment further includes: the card acquiring the attribute information of the current authentication, and performing the attribute information.
  • the method may further include: the first card reader obtains the identification information of the card, and the first card reader sends an authentication instruction to the card; the first card reading The device sends a notification including at least the identification information of the card to the background; the background acquires and stores the attribute information of the current authentication of the card according to the notification, for example, the first card reader can send a card search instruction, and the card responds to the card search instruction, to the first A card reader sends a card finder response, and the first card reader receives the card finder response and obtains the card identification information from the card finder response.
  • the method may further include: acquiring encrypted attribute information stored in the card; decrypting the encrypted attribute information; and comparing the decrypted attribute information with the attribute information of the card stored in the background If it does not match, the identification card is an illegal card. After identifying that the card is an illegal card, the card may be instructed to delete the internal calculation factors, indicating that the calculation factor associated with the card is deleted in the background. Therefore, it can be avoided that the background cannot be known that the card is illegally read.
  • the attribute information of the current authentication of the card may be attribute information of the first card reader for authenticating the card, for example, information such as the time, location and number of times the first card reader authenticates the card.
  • the recording mode of the location may be a serial number of the first card reader, and the serial number of the first card reader may be associated with the location of the first card reader, and may be determined according to the serial number of the first card reader.
  • the location of the first card reader; in addition, a chip having a positioning function may be disposed inside the first card reader, and the location information of the card authentication by the first card reader may be acquired according to the positioning chip.
  • the card can encrypt the attribute information using the public key of the first card reader.
  • the attribute information is encrypted and stored in the card, which prevents the attribute information inside the card from being acquired by other illegal devices, and ensures the security of the attribute information.
  • the attribute information of the current authentication is associated with the identification information of the card and stored.
  • the encrypted attribute information stored in the card may be read by the background or read by the proprietary device capable of reading the attribute information inside the card, and the encrypted attribute information is decrypted and decrypted.
  • the attribute information is compared with the attribute information of the card recorded in the background. If the comparison is inconsistent, the card has the risk of being illegally read by the illegal device, and the card is identified as an illegal card.
  • the illegal device can be prevented from attacking the card, the illegal authentication command is initiated, and the data inside the card is obtained, thereby breaking the card.
  • FIG. 2 is a schematic structural diagram of the card 20 provided in this embodiment.
  • the structure of the card 20 is briefly described. For other unworked matters, refer to the description in Embodiment 1.
  • the card 20 provided in this embodiment includes: a first receiving module 2001, configured to receive an authentication command sent by the first card reader, where the authentication command carries the identification information and the first authentication information;
  • the determining module 2002 is configured to determine the control authority according to the identifier information, where the control authority includes: a precondition for the first card reader to give the authorization;
  • the first obtaining module 2003 is configured to obtain the first security state of the current record, where A security status includes: an authorization that the card 20 has successfully obtained;
  • the first determining module 2004 is configured to determine, according to the first security status, whether the card 20 satisfies the control authority, and if so, triggering the first authentication module 2005; the first authentication module 2005;
  • the first authentication module is used to authenticate the first authentication information, and the first sending module 2006 is configured to send the second authentication information to the first card reader;
  • the module 2007 is configured to update the first security state, and the record card 20 has successfully obtained the authorization of the first card reader.
  • the card provided in this embodiment responds to the authentication command of the first card reader only when it is determined that the control authority is satisfied, and sends the second authentication information to the first card reader, so as to obtain the first card reader.
  • Authorization Therefore, for a card reader with a higher security level, the corresponding control authority can be set, for example, a card needs to be authorized by one or more other card readers. In the case that the user's card is stolen, if you want to read the card illegally, you need to simulate multiple card readers to send the authentication command to the card, so that the card meets the control authority, it is possible to make the card respond to the card with a higher security level. , thereby increasing the difficulty of illegally obtaining information stored in the card, and improving the security of the card.
  • the first receiving module 2001 and the first sending module 2006 may be independent modules, or may be integrated into one communication module.
  • the first receiving module 2001 and the first sending module 2006 may be a contactless communication module, for example, a communication module conforming to a standard protocol such as ISO14443A, ISO14443B, ISO15693, or a contact communication module, for example, a communication module conforming to the ISO7816 standard protocol.
  • control authority can be controlled by at least the following two mechanisms:
  • Method 1 Implemented by responding to the response authority of the authentication command. That is, in this manner, the first authentication module 2005 responds to the received authentication command only if the card 20 satisfies the response authority corresponding to the authentication command.
  • the response authority of the authentication command may be set, and the response authority of the authentication command corresponding to the identifier information of each card reader is set to the control authority of the card reader, and in a specific application, the card may be
  • the first receiving module 2001 pre-stores the correspondence between the identification information and the control authority of the response authentication command. After receiving the authentication command, the first receiving module 2001 determines that the module 2002 searches for the locally stored identification information and the response authentication according to the identification information carried in the authentication instruction.
  • the correspondence between the control authority of the instruction acquires the control authority of the received authentication command. That is, in this embodiment, the correspondence between the identification information corresponding to each card reader and the control authority is recorded in the card 20, wherein the identification information may be The identification information of the card reader may be the identification information of the authentication key corresponding to the card reader, and the determining module 2002 may obtain the control authority corresponding to the identification information in the authentication command according to the correspondence.
  • the premise of responding to the received authentication command is that the card 20 satisfies the corresponding control authority, that is, only when the first judging module 2004 determines that the control authority is satisfied according to the first security state, the first authentication.
  • the module 2005 only responds to the authentication command sent by the first card reader, and authenticates the first authentication information carried in the authentication command.
  • Manner 2 Implemented by accessing the file that accesses the storage authentication key.
  • the first authentication module 2005 authenticates the first authentication information sent by the first card reader, it needs to acquire a corresponding authentication key.
  • the access authority for storing the file of the authentication key is set, and the The access permission of the file is set to the control authority of the card reader corresponding to the authentication key. Only when the card 20 satisfies the corresponding access right, the first authentication module 2005 can access the file storing the authentication key, and obtain the first file.
  • the authentication key corresponding to the card reader that is, in this embodiment, the determining module 2002 determines the identification information (for example, the file name) of the file storing the authentication key according to the identification information, and then obtains the access according to the identification information of the file.
  • Control permissions on the file That is, in this embodiment, the control authority acquired by the determining module 2002 is an access right for storing a file of the authentication key corresponding to the first card reader, and the first determining module 2004 determines whether the access right of the file is currently satisfied. If the judgment is satisfied, the first authentication module 2005 is allowed to access the file, obtain a corresponding authentication key, and then use the authentication key to authenticate the first authentication information sent by the first card reader.
  • the pre-requisites for the authorization of the first card reader to the card 20 are recorded in the control authority.
  • the preconditions for the first card reader to be authorized include: a group The second card reader has authorized the same card 20; the first judging module 2004 determines whether the card 20 satisfies the control authority by determining whether the card 20 has successfully obtained all the second card readings in the precondition according to the first security state.
  • Authorization In a specific application, a group of second card readers can be 0 (indicating that the same card 20 does not need to be authorized by other card readers to obtain the authorization of the first card reader), 1 Or multiple, depending on the actual application.
  • the card 20 further includes: the clearing module 2008, In the case that the first determining module 2004 determines that the card 20 does not satisfy the control authority, that is, the first determining module 2004 determines that the card 20 has not successfully obtained the authorization of all the second card readers in the precondition according to the first security state.
  • the information recorded in the first security state is cleared to save the storage space of the card 20.
  • the precondition for granting authorization by the first card reader may further include: a authorization sequence for authorizing the same card 20 by a group of second card readers, and/or each The effective time for the second card reader to authorize the same card 20; correspondingly, the first security state further includes: the order in which the card 20 is successfully authorized, and/or the card 20 successfully obtains authorization The time, that is, the card 20 also needs to record the order and/or time of successfully obtaining the authorization of each card reader; the first judging module 2004 is further configured to judge the success of the card 20 according to the first security state when judging whether the card 20 satisfies the control authority. Whether the order of obtaining the authorization is consistent with the authorization order in the precondition; and/or determining whether the time when the card 20 is successfully authorized
  • the first determining module 2004 determines that the card 20 does not satisfy the first card reader.
  • the first judging module 2004 judges that the order in which the card 20 is successfully authorized according to the first security state is inconsistent with the authorization order in the precondition; and/or, according to the first security state, determines the time when the card is successfully authorized.
  • the clearing module 2008 also clears the information about the order in which the card 20 recorded in the first security state was successfully authorized and/or the time at which the card 20 successfully obtained the authorization, within the valid time in the precondition.
  • the clearing module 2008 is further configured to clear the information recorded in the first security state.
  • the third calculation factor may also be a second calculation factor locally stored by the card 20, and thus, in the optional implementation manner, as shown in FIG. 3,
  • the card 20 further includes: a generating module 2009, configured to: after the first determining module 2004 determines that the card 20 satisfies the control authority, and obtains the stored second before the first sending module 2006 sends the second authentication information to the first card reader Calculating a factor, generating second authentication information according to at least a second calculation factor.
  • a generating module 2009 configured to: after the first determining module 2004 determines that the card 20 satisfies the control authority, and obtains the stored second before the first sending module 2006 sends the second authentication information to the first card reader Calculating a factor, generating second authentication information according to at least a second calculation factor.
  • the card 20 further includes: a second obtaining module 2010, an encryption module 2011, and a first storage module 2012; wherein, the second obtaining module 2010 is configured to After receiving the authentication command sent by the first card reader, acquiring the attribute information of the current authentication; the encryption module 2011 is configured to encrypt the attribute information; the first storage module 2012 is configured to store the encrypted attribute information; the first sending module 2006, also used to respond to external operating instructions, outgoing encrypted attribute information.
  • the authorization system includes a card 20 and a first card reader 21.
  • the card 20 in this embodiment is the same as the card 20 provided in Embodiment 2.
  • the structure of the authorization system is briefly described. For other unworked matters, refer to the description in Embodiment 1.
  • the first card reader 21 includes: a second receiving module 211, configured to receive second authentication information sent by the card 20; and an authorization module 212, configured to determine, according to at least the second authentication information, whether the card is authorized .
  • the card 20 responds to the authentication command of the first card reader 21 only when it is determined that the control authority is satisfied, and sends the second authentication information to the first card reader 21 in order to obtain the authorization information.
  • the card has been authorized by one or more other card readers. If an illegal user wants to break a card reader and obtain authorization from the card reader, he must first obtain authorization from one or more other card readers in order to respond to the card.
  • the card reader's authentication command in order to obtain the authorization of the card reader.
  • the authorization system provided in this embodiment may further include: a background 22, and after receiving the second authentication information, the second receiving module 211 may be used by the authorization module 212. At least according to the second authentication information, it is determined whether the card 20 is authorized, and the authorization module 212 can also perform the judgment in conjunction with the background 22. In the case that the authorization module 212 determines whether the card 20 is authorized according to at least the second authentication information, the authorization module 212 may at least authenticate the second authentication information, obtain the authentication result, and then determine whether to authorize the card 20 according to at least the authentication result.
  • the authorization module 212 includes: a sending unit 2121, configured to send second authentication information to the background 22, and a receiving unit 2122, configured to receive the background 22, at least for the second, in the case that the authorization module 212 is combined with the background 22 to determine whether the card 20 is authorized.
  • the authentication information is obtained by the authentication information.
  • the authorization unit 2123 is configured to determine, according to the authentication result, whether the card 20 is authorized.
  • the background 22 includes: a third receiving module 221, configured to receive the second authentication information, and a second authentication module 222. And configured to perform at least the second authentication information to obtain the authentication result, and the second sending module 223 is configured to return the authentication result to the first card reader 21 .
  • the background 22 may be a server that manages all associated card readers, and may store all information related to the associated card reader authorization in the background 22.
  • the transmitting unit 2121 and the receiving unit 2122 in the authorization module 212 are configured to communicate with the background 22, and the transmitting unit 2121 and the receiving unit 2122 may be independent units or may be integrated in one communication unit.
  • the sending unit 2121 and the receiving unit 2122 may be remote network communication units, for example, communication units such as GSM, GPRS, 3G, 4G, etc., which are not specifically limited in this embodiment; the sending unit 2121 and the receiving unit 2122 may also be short-range wireless communication.
  • the communication unit of the unit for example, Bluetooth, NFC, WIFI, UWB, RFID, infrared transmission, etc., is not specifically limited in this embodiment.
  • the third receiving module 221 and the second sending module 223 respectively match the types of the transmitting unit 2121 and the receiving unit 2122.
  • the background 22 can pass the following when authenticating the second authentication information.
  • the method obtains a fourth calculation factor corresponding to the first card reader 21: the background card 22 obtains the third card reader that is the same as the premise that the second card reader authorizes the card 20 or is authorized by the first card reader 21
  • the fourth calculation factor obtained when authorizing a card at a time.
  • the background 22 may obtain the first card reader 21 by: Corresponding fourth calculation factor: the background 22 obtains a second calculation factor list, wherein the second calculation factor list includes at least a fifth calculation factor that the card 20 sends to the card 20 each card reader when the individual card reader authorization is successfully obtained.
  • the background 22 determines, according to the second calculation factor list, whether the card 20 has successfully obtained the authorization of all the second card readers in the precondition, and if so, from the A fourth calculation factor corresponding to each second card reader in the precondition is obtained in the second calculation factor list.
  • the authorization module 212 can determine whether it is the card authorization according to the second authentication information, and can determine whether the card 20 is authorized according to other information. Therefore, as an optional implementation manner of the embodiment of the present invention, When the authentication result of the second authentication information indicates that the authentication is passed, the authorization module 212 further determines whether the card 20 is authorized by: determining whether the card 20 is authorized according to the authorization authority list of the first card reader 21. The authorization module 212 determines whether the card 20 is authorized by the card 20 in the permission list of the first card reader 21, that is, whether the card 20 is an authorized user of the first card reader 21.
  • the authorization permission list of the first card reader 21 may be stored in the background 22, or may be stored in the memory local to the first card reader 21, if it is stored locally in the first card reader 21, The first card reader 21 makes a determination. If it is stored in the background 22, it is judged by the background 22, and finally, based on the authentication result of authenticating the second authentication information, it is judged whether or not the card 20 is authorized.
  • the background 22 further includes: a third obtaining module 224, configured to be used when the second authentication module 222 passes the second authentication information.
  • the second judging module 225 is configured to determine whether the card 20 satisfies the preconditions according to the second security status, and if yes, obtain the authentication result indicating that the authentication passes, and update the first In the second security state, in the second security state, the record card has obtained the authorization of the first card reader 21; otherwise, the authentication result indicating that the authentication fails, is obtained, and the second security state is cleared.
  • the precondition for granting the authorization by the first card reader 21 further includes a authorization sequence and/or a second reading of authorizing the same card 20 by the second set of card readers.
  • the second security state further includes: the order in which the card 20 is successfully authorized, and/or the time when the card 20 successfully obtains the authorization; the second determining module 225 is configured to pass In the following manner, it is judged whether the card 20 satisfies the precondition: whether the card 20 has obtained the authorization of all the second card readers according to the second security state, and whether the authorization order and/or time for the card 20 to obtain the authorization of the second card reader is satisfied.
  • Prerequisites that is, whether the order in which the card 20 successfully obtains the authorization is consistent with the authorization order in the precondition according to the second security status, and/or, according to the second security status, whether the time for the card 20 to successfully obtain the authorization is in the precondition Effective time.
  • the authorization system provided in this embodiment further includes: a verification device 23;
  • the method further includes: a fourth obtaining module 226 and a second storage module 227;
  • the first card reader further includes: a fifth obtaining module 213; wherein the fifth obtaining The module 213 is configured to obtain the identification information of the card 20;
  • the sending unit 2121 is further configured to send a notification to the background 22 that includes at least the identification information of the card 20;
  • the third receiving module 221 is further configured to receive the notification;
  • the second storage module 227 is configured to store the attribute information of the current authentication of the card 20 acquired by the fourth obtaining module 226;
  • the verification device 23 is configured to: Acquiring the encrypted attribute information from the card 20 and acquiring the attribute information of the second storage module 227 from the background 22, decrypting the encrypted attribute information
  • portions of the invention may be implemented in hardware, software, firmware or a combination thereof.
  • multiple steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system.
  • a suitable instruction execution system For example, if implemented in hardware, as in another embodiment, it can be implemented by any one or combination of the following techniques well known in the art: having logic gates for implementing logic functions on data signals. Discrete logic circuits, application specific integrated circuits with suitable combinational logic gates, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.
  • each functional unit in each embodiment of the present invention may be integrated into one processing component, or each unit may exist physically separately, or two or more units may be integrated into one component.
  • the above integrated components can be implemented in the form of hardware or in the form of software functional components.
  • the integrated components, if implemented in the form of software functional components and sold or used as separate products, may also be stored in a computer readable storage medium.
  • the above mentioned storage medium may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)
  • Lock And Its Accessories (AREA)

Abstract

一种授权系统、方法及卡片,其中,授权方法包括:卡片接收第一读卡器发送的认证指令,其中,认证指令中携带有标识信息和第一认证信息(S101);卡片根据标识信息确定控制权限,其中,控制权限包括:第一读卡器给予授权的前提条件(S102);卡片获取当前记录的第一安全状态,其中,第一安全状态包括:卡片已成功获得的授权(S103);卡片根据第一安全状态判断卡片是否满足控制权限,如果满足,则对第一认证信息进行认证,在认证通过的情况下,向第一读卡器发送第二认证信息,并更新第一安全状态,记录卡片已成功获得第一读卡器的授权(S104);第一读卡器接收第二认证信息,至少根据第二认证信息判断是否为卡片授权(S105)。

Description

一种授权系统、方法及卡片
相关申请的交叉引用
本申请要求天地融科技股份有限公司于2016年9月9日提交中国专利局、申请号为201610816022.4、发明名称为“一种授权系统、方法及卡片”的中国专利申请的优先权。
技术领域
本发明涉及电子技术领域,尤其涉及一种授权系统、方法及卡片。
背景技术
在授权系统中,为了实现不同等级的授权,往往需要设置多个读卡器,每一个读卡器能够实现特定等级的授权。然而,现有的授权系统中,每个读卡器都是相互独立的,与其他读卡器之间没有关联。因此,不法分子只需要攻破一个读卡器,就能够获取该读卡器能够实现的授权。然而,不法分子攻破每一个读卡器所需的时间都是差不多的,即现有技术中对于更高等级授权的读卡器并没有实现更高的安全保证。
发明内容
本发明旨在解决上述问题/之一。
本发明的主要目的在于提供一种授权方法;
本发明的另一目的在于提供一种卡片;
本发明的又一目的在于提供一种授权系统。
为达到上述目的,本发明的技术方案具体是这样实现的:
本发明一方面提供了一种授权方法,包括:卡片接收第一读卡器发送的认证指令,其中,所述认证指令中携带有标识信息和第一认证信息;所述卡片根据所述标识信息确定控制权限,其中,所述控制权限包括:所述第一读卡器给予授权的前提条件;所述卡片获取当前记录的第一安全状态,其中,所述第一安全状态包括:所述卡片已成功获得的授权;所述卡片根据所述第一安全状态判断所述卡片是否满足所述控制权限,如果满足,则对所述第一认证信息进行认证,在认证通过的情况下,向所述第一读卡器发送第二认证信息,并更新所述第一安全状态,记录所述卡片已成功获得所述第一读卡器的授权;所述第一读卡器接收所述第二认证信息,至少根据所述第二认证信息判断是否为所述卡片授权。
本发明另一方面提供了一种卡片,包括:第一接收模块,用于接收第一读卡器发送的认 证指令,其中,所述认证指令中携带有标识信息和第一认证信息;确定模块,用于根据所述标识信息确定控制权限,其中,所述控制权限包括:所述第一读卡器给予授权的前提条件;第一获取模块,用于获取当前记录的第一安全状态,其中,所述第一安全状态包括:所述卡片已成功获得的授权;第一判断模块,用于根据所述第一安全状态判断所述卡片是否满足所述控制权限,如果满足,则触发第一认证模块;所述第一认证模块,用于对所述第一认证信息进行认证,在认证通过的情况下,触发第一发送模块和更新模块;所述第一发送模块,用于向所述第一读卡器发送第二认证信息;所述更新模块,用于更新所述第一安全状态,记录所述卡片已成功获得所述第一读卡器的授权。
本发明另一方面提供了一种授权系统,其特征在于,包括:第一读卡器和方案13至20任一项所述的卡片;其中,所述第一读卡器,包括:第二接收模块,用于接收所述卡片发送的第二认证信息;授权模块,用于至少根据所述第二认证信息判断是否为所述卡片授权。
由上述本发明提供的技术方案可以看出,本发明提供了一种授权方法,卡片只有在确定满足控制权限的情况下,才对第一读卡器的认证指令进行响应,向第一读卡器发送认证信息,以期获得第一读卡器的授权,因而,对于安全级别较高的读卡器,可以设置对应的控制权限,例如,需要一张卡片已经获得其它一个或多个读卡器的授权,非法用户如果想攻破一个读卡器,获得该读卡器的授权,必须先获得其它一个或多个读卡器的授权,才能响应该读卡器的认证指令,进而才有可能获取到该读卡器的授权。另外,由于卡片必须是在满足控制权限的情况下,才会向第一读卡器发送第二认证信息,因此,在用户的卡片被盗的情况下,如果想要非法读取卡片,需要模拟多个读卡器向卡片发送认证指令,才可能使卡片会响应安全级别更高的读卡器,以期获得该安全级别更高的读卡器对应的认证密钥,从而增加了非法获取卡片内存储的信息的难度,提高了卡片的安全性。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域的普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他附图。
图1为本发明实施例1提供的一种授权方法的流程图;
图2为本发明实施例2提供的一种卡片的结构示意图;
图3为本发明实施例2提供的另一种卡片的结构示意图;
图4为本发明实施例3提供的一种授权系统的结构示意图;
图5为本发明实施例3提供的另一种授权系统的结构示意图。
具体实施方式
下面结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明的保护范围。
下面将结合附图对本发明实施例作进一步地详细描述。
实施例1
本实施例提供了一种授权方法,如图1所述,该方法包括以下步骤(S101-S105):
S101:卡片接收第一读卡器发送的认证指令,其中,认证指令中携带有标识信息和第一认证信息。
S102:卡片根据标识信息确定控制权限,其中,控制权限包括:第一读卡器给予授权的前提条件。
S103:卡片获取当前记录的第一安全状态,其中,第一安全状态包括:卡片已成功获得的授权。
S104:卡片根据第一安全状态判断卡片是否满足控制权限,如果满足,则对第一认证信息进行认证,在认证通过的情况下,向第一读卡器发送第二认证信息,并更新第一安全状态,记录卡片已成功获得第一读卡器的授权。
S105:第一读卡器接收第二认证信息,至少根据第二认证信息判断是否为卡片授权。
通过本实施例提供的授权方法,卡片只有在确定满足控制权限的情况下,才对第一读卡器的认证指令进行响应,向第一读卡器发送认证信息,以期获得第一读卡器的授权,因而,对于安全级别较高的读卡器,可以设置对应的控制权限,例如,需要一张卡片已经获得其它一个或多个读卡器的授权,非法用户如果想攻破一个读卡器,获得该读卡器的授权,必须先获得其它一个或多个读卡器的授权,才能响应该读卡器的认证指令,进而才有可能获取到该读卡器的授权。另外,由于卡片必须是在满足控制权限的情况下,才会向第一读卡器发送第二认证信息,因此,在用户的卡片被盗的情况下,如果想要非法读卡片,需要模拟多个读卡器向卡片发送认证指令,才可能使卡片会响应安全级别更高的读卡器,以期获得该读卡器对应的认证密钥,从而增加了非法获取卡片内存储的信息的难度,提高了卡片的安全性。
在本实施例中,卡片可以为磁条卡、集成电路卡(Integrated Circuit Card,简称IC卡)、智能卡等类型的卡片,在本实施例中不作具体限定,只要能够被读卡器读取的卡片,均在本实施例的保护范围之内。第一读卡器为当前与卡片交互的读卡器,第一读卡器的类型与卡片 的类型相对应。例如:当卡片为磁条卡时,第一读卡器可以为磁卡读卡器;当卡片为IC卡时,第一读卡器可以为IC卡读卡器,在本实施例中对第一读卡器的类型不作具体限定。
另外,在本实施例中,卡片可以为接触型,也可以为非接触型。如果卡片为非接触型,当卡片位于第一读卡器的工作距离以内时,卡片与第一读卡器可以进行通信,实现无需插卡即可进行通信。当卡片为接触型时,只有卡片的触点与第一读卡器的接口正确连接时,卡片与第一读卡器才能进行通信。在本实施例中,当卡片为非接触型时,第一读卡器可以周期性的广播寻卡指令,卡片如果位于第一读卡器的读卡范围,则卡片可以响应第一读卡器的寻卡指令,向第一读卡器发送寻卡响应,第一读卡器在接收到寻卡响应后,可以确定当前读取的卡片,进而向卡片发送认证指令。
在本实施例中,第一读卡器发送的认证指令中携带的标识信息可以是与第一读卡器对应的唯一标识,例如,该标识信息可以是第一读卡器的序列号,也可以是第一读卡器对应的认证密钥(即用于对第一认证信息进行认证的认证密钥)的标识信息。在本实施例中,卡片通过该标识信息来确定与第一读卡器对应的控制权限,通过该控制权限可以获取到第一读卡器给予授权的前提条件,从而判断卡片是否满足第一读卡器给予授权的前提条件,进而确定是否向第一读卡器返回第二认证信息。
在本实施例中,第一读卡器给予授权的前提条件一般是指同一张卡片是否已经获得其它读卡器(为了便于区别,在本实施例中将其称为第二读卡器)的授权,即同一张卡片是否已成功获取一组第二读卡器的授权。因此,为了方便卡片进行判断,在卡片成功获得某一读卡器的授权时,卡片将记录该信息。在本实施例中,将卡片记录的该信息称为卡片的第一安全状态,卡片在接收到来自第一读卡器的认证指令后,根据认证指令中的标识信息,获取到第一读卡器的控制权限之后,根据本地存储的第一安全状态,可以判断卡片当前是否满足第一读卡器的控制权限。
在本发明实施例中,至少可以通过以下两种机制来实现控制权限的控制:
方式一:通过响应认证指令的响应权限实现。即在该方式中,卡片只有在满足认证指令对应的响应权限的情况下,才会对接收到的认证指令进行响应。在该实施方式中,可以对认证指令的响应权限进行设置,将与各个读卡器的标识信息对应的认证指令的响应权限设置为该读卡器的控制权限,在具体应用中,可以在卡片中预先存储标识信息与响应认证指令的控制权限的对应关系,卡片在接收到认证指令之后,根据认证指令中携带的标识信息,查找本地存储的标识信息与响应认证指令的控制权限的对应关系,获取响应接收到的认证指令的控制权限。即在该实施方式中,卡片中记录了每个读卡器对应的标识信息与控制权限的对应关系,其中,该标识信息可以是读卡器的标识信息,也可以是读卡器对应的认证密钥等的标识信息,在步骤S102中,卡片根据该对应关系,可以获取到与认证指令中的标识信息对应的 控制权限。在该实施方式中,将响应接收到的认证指令的前提设置为卡片满足对应的控制权限,即在后续的步骤S104中,只有在根据第一安全状态判断满足该控制权限的情况下,才响应第一读卡器发送的认证指令,对认证指令中携带的第一认证信息进行认证。
方式二:通过访问存储认证密钥的文件的访问权限实现。卡片对第一读卡器发送的第一认证信息进行认证时,需要获取相应的认证密钥,在该实施方式中,对存储认证密钥的文件的访问权限进行设置,将该文件的访问权限设置为该认证密钥对应的读卡器的控制权限,只有在卡片满足对应的访问权限时,才可以访问存储认证密钥的文件,获取到与第一读卡器对应的认证密钥,即在该实施方式中,卡片根据标识信息确定存储认证密钥的文件的标识信息(例如,文件名),然后根据该文件的标识信息获取到访问该文件的控制权限。即在该实施方式中,在步骤S102中获取到的控制权限为存储与第一读卡器对应的认证密钥的文件的访问权限,后续在步骤S104中,卡片判断当前是否满足该文件的访问权限,在判断满足的情况下,允许访问该文件,获取对应的认证密钥,进而使用该认证密钥对第一读卡器发送的第一认证信息进行认证。
在上述实施方式中,控制权限中记录了第一读卡器给予卡片授权的前提条件,作为本发明实施例的一个可选实施方式,第一读卡器给予授权的前提条件包括:一组第二读卡器已对同一卡片进行授权;卡片根据第一安全状态判断卡片是否满足控制权限,包括:根据第一安全状态判断卡片是否已成功获得前提条件中的所有第二读卡器的授权。在具体应用中,一组第二读卡器可以为0个(表示同一张卡片并不需要在获得其它读卡器的授权的前提下才能获取该第一读卡器的授权)、1个或多个,具体可以根据实际应用来设置。例如,在一个包含三个读卡器的系统中,假设三个读卡器的编号分别为一号读卡器、二号读卡器和三号读卡器。一号读卡器给予授权的前提条件可以为同一卡片不需要获得任何读卡器的授权,二号读卡器给予授权的前提条件可以为同一卡片已成功获得一号读卡器的授权,三号读卡器给予授权的前提条件可以为同一卡片已成功获得一号读卡器和二号读卡器的授权;或者,一号读卡器给予授权的前提条件可以为同一卡片不需要获得任何读卡器的授权,二号读卡器给予授权的前提条件可以为同一卡片不需要获得任何读卡器的授权,三号读卡器授权的前提条件为同一卡片已成功获得一号读卡器或二号读卡器的授权。
在具体应用中,卡片中存储的各个读卡器给予授权的前提条件可以通过1位或多位比特串来记录,比特串中的每1位比特对应一个读卡器,该位比特的值表示同一卡片是否需要成功获得该比特对应的读卡器的授权。例如,可以使用比特1表示需要获得该比特对应的读卡器的授权,使用比特0表示不需要获得该比特对应的读卡器的授权;或者,使用比特0表示需要获得该比特对应的读卡器的授权,使用比特1表示不需要获得该比特对应的读卡器的授权。为了方便说明,以下均使用比特1表示需要获得该比特对应的读卡器的授权,使用比特 0表示不需要获得该比特对应的读卡器的授权。以前述的包括三个读卡器的读卡系统为例,可以使用3位比特来记录每个读卡器给予授权的前提条件,每位比特对应一个读卡器,比特串从左到右的第1至3位分别表示是否需要一号读卡器、二号读卡器和三号读卡器已成功对同一卡片进行授权。例如,一号读卡器授权的控制权限可以表示为000,即表示一号读卡器给予授权的前提条件为不需要任何读卡器已对同一卡片授权;二号读卡器授权的控制权限可以表示为100,即表示二号读卡器给予授权的前提条件为:需要一号读卡器已成功对同一张卡片进行授权;三号读卡器授权的控制权限可以表示为110,即表示三号读卡器给予授权的前提条件为:需要一号读卡器和二号读卡器已成功对同一张卡片进行授权;或者,一号读卡器授权的控制权限表示为000,二号读卡器授权的控制权限表示为000,三号读卡器授权的控制权限表示为100或者010。采用这种比特串的方式记录各个读卡器的控制权限,占用的存储空间比较小,可以节约卡片的存储空间。
或者,卡片中存储的各个读卡器给予授权的前提条件也可以通过列表来记录,在列表的第一列记录读卡器对应的标识信息,在列表的第二列记录是否需要该行对应的读卡器已成功对同一卡片进行授权,列表的第二列的键值可以有比特1和比特0两种状态,例如,比特1表示需要获得该行对应的读卡器的授权,比特0表示不需要获得该行对应的读卡器的授权;或者,比特0表示需要获得该行对应的读卡器的授权,比特1表示不需要获得该行对应的读卡器的授权。前述的包括三个读卡器的读卡系统为例,一号读卡器给予授权的前提条件如表1所示,二号读卡器给予授权的前提条件如表2所示,三号读卡器给予授权的前提条件如表3所示。其中,表1指示一号读卡器给予卡片授权时并不需要二号读卡器和三号读卡器已对该卡片进行授权;表2指示二号读卡器给予卡片授权时需要二号读卡器已对该卡片进行授权;表3指示三号读卡器给予卡片授权时需要一号读卡器和二号读卡器均已对该卡片进行授权。
表1一号读卡器给予授权的前提条件
Figure PCTCN2017100209-appb-000001
表2.二号读卡器给予授权的前提条件
Figure PCTCN2017100209-appb-000002
Figure PCTCN2017100209-appb-000003
表1.三号读卡器给予授权的前提条件
Figure PCTCN2017100209-appb-000004
在具体应用中,各个读卡器给予授权的前提条件除了上述两种表示方式之外,还可以采用其它的方式表示,例如,采用文本的方式表示,通过特定的分隔符来分割各段信息。例如,上述三个读卡器给予授权的前提条件可以记录在同一个文本文件中,采用如下的描述方式:
***001***&&000&&***002***&&100&&***003***&&110&&;或者
***001***&&000&&***002***&&000&&***003***&&100##010&&。
在上述描述中,两个***中的信息为读卡器的标识信息,紧接着两个&&中的信息表示该标识信息对应的读卡器给予授权的前提条件,##表示两个并列的前提条件。
在上述实施方式中,卡片每成功获得一个读卡器的授权,则在第一安全状态中记录该信息,即在本实施例中,卡片的第一安全状态中记录了当前已经成功获得的授权。在具体实施过程中,卡片可以通过一位或多位的比特串来记录第一安全状态,每位比特用于记录该卡片是否已经成功获得对应的一个读卡器的授权。在具体应用中,可以采用比特1表示该卡片已经成功获得该比特对应的读卡器的授权,比特0表示该卡片没有获得该比特对应的读卡器的授权,即在初始状态下,每位比特的值均为0,在获取到某个读卡器的授权后,卡片将该读卡器对应的比特位置为1,反之亦然。以上述包括三个读卡器的读卡系统为例,卡片可以维护一个三位比特的比特串,比特串中从左到右的第1至3位分别表示卡片是否获得一号读卡器、二号读卡器、三号读卡器的授权为例,在初始状态下,卡片的第一安全状态为000,当卡片在一号读卡器上刷卡并获得授权时,卡片更新其安全状态为100,指示卡片已获得一号读卡器的授权,接着卡片在二号读卡器刷卡如果获得授权,则第一安全状态更新为110,表示卡片已获得一号读卡器和二号读卡器的授权,然后卡片在三号读卡器刷卡,如果获得授权,则第一安全状态更新为111,表示卡片已获得一号读卡器、二号读卡器和三号读卡器的授权。
或者,卡片也可以采用列表来记录其第一安全状态,在列表的第一列记录读卡器的标识信息,在列表的第二列记录是否已经成功获得该行对应的读卡器的授权,列表的第二列的键 值可以为比特1和比特0两种状态,比特1表示已经获得该行对应的读卡器的授权,比特0表示没有获得该行对应的读卡器的授权,反之亦然。
在本实施例的一个可选实施方式中,为了方便卡片判断第一安全状态是否满足控制权限,可以采用相同的形式记录第一安全状态和控制权限,例如,使用比特串来记录第一安全状态和控制权限,或者使用列表记录第一安全状态和控制权限,或者使用文本来记录第一安全状态和控制权限。当然,也可以使用不同的形式分别记录第一安全状态和控制权限,例如,使用比特串记录第一安全状态、使用列表记录控制权限,或者使用列表记录第一安全状态、使用比特串记录控制权限,或者使用文本记录第一安全状态、使用列表记录控制权限等。当使用不同的形式分别记录第一安全状态和控制权限时,卡片为了判断是否满足控制权限,可以先将第一安全状态和控制权限转换为相同的形式,再进行判断,也可以不转换,例如,如果第一安全状态是以列表的形式记录的,而控制权限采用比特串记录,例如,以上述的包括三个读卡器的系统为例,假设三号读卡器的控制权限为:010,即需要二号读卡器的授权,则卡片可以查询第一安全状态中与二号读卡器对应的表项的值是否为1或者其它表示该卡片已获得该读卡器的授权的值,如果是,则确定卡片满足该控制权限,否则,确定卡片不满足该控制权限。
在本实施例中,如果第一读卡器给予授权的前提条件中只包括一组第二读卡器已对同一卡片进行授权,则在步骤S104中,卡片根据第一安全状态判断卡片是否满足控制权限时,只需根据第一安全状态判断卡片是否已成功获得前提条件中的所有第二读卡器的授权,即卡片只需要判断卡片是否已获得前提条件中的所有第二读卡器的授权,而不需要考虑获得授权的顺序和时间。如果第一安全状态中记录的卡片已成功获得的授权中包含了前提条件中的所有第二读卡器的授权,则第一安全状态满足控制权限,如果第一安全状态中记录的卡片已成功获得的授权中没有包含前提条件中的全部第二读卡器的授权,则第一安全状态不满足控制权限。以字节表示第一安全状态和控制权限为例,假设第一读卡器授权的前提条件表示为010,如果卡片的第一安全状态为010或110或111或011,则第一安全状态满足控制权限,如果卡片的第一安全状态为000或100或101或001,则第一安全状态不满足控制权限。
在本实施例中,如果第一安全状态只包括卡片已成功获得的授权,则作为本发明实施例的一个可选实施方式,在判断卡片不满足第一读卡器的控制权限的情况下,即根据第一安全状态判断卡片没有成功获得前提条件中的所有第二读卡器的授权的情况下,本实施例提供的方法还包括:卡片清空第一安全状态中记录的信息。
在本实施例中,在根据第一安全状态判断卡片没有成功获得前提条件中的所有第二读卡器的授权的情况下,判断卡片不满足第一读卡器的控制权限,此时清空第一安全状态中记录的卡片已成功获得的授权。在具体实施过程中,如果用字节表示第一安全状态,则卡片可以 将表示第一安全状态的字节中的所有比特位全部置为0或1,以清空第一安全状态中记录的信息;如果以列表形式表示第一安全状态,则可以将列表中第二列的所有比特位全部置为0或1,以清空第一安全状态中记录的信息。卡片及时清空第一安全状态中记录的信息,可以节省卡片的存储空间。
但在具体应用中,为了增加安全性,某些读卡器可能不仅限定需要其它读卡器进行授权,而且还可能限定其它读卡器对卡片进行授权的顺序和/或有效时间。因此,作为本发明实施例的一个可选实施方式,第一读卡器给予授权的前提条件还可以包括:一组第二读卡器对同一卡片进行授权的授权顺序和/或每个第二读卡器对同一卡片授权的有效时间;对应地,第一安全状态还包括:卡片成功获得授权的顺序,和/或,卡片成功获取授权的时间,即卡片还需要记录成功获得各个读卡器授权的顺序和/或时间;则在步骤S104中,卡片根据第一安全状态判断卡片是否满足控制权限时,还可以根据第一安全状态判断卡片成功获得授权的顺序是否与前提条件中的授权顺序一致;和/或,根据第一安全状态判断卡片成功获得授权的时间是否在前提条件中的有效时间内。
在本实施例中,通过判断卡片获得授权的顺序是否与前提条件中的授权顺序一致,从而形成一条反潜授权路径,卡片必须按照预定的顺序依次获得授权。通过判断卡片成功获得授权的时间是否在前提条件中的有效时间内,防止卡片通过凑单获得授权。
在本实施例的具体应用中,在第一读卡器授权的前提条件还包括一组第二读卡器对同一卡片进行授权的授权顺序和/或每个第二读卡器对同一卡片授权的有效时间的情况下,可以使用列表来表示控制权限,在列表的第一列记录读卡器的标识信息,在列表的第二列记录是否需要成功获得该行对应的读卡器的授权,在列表的第三列记录该行对应的第二读卡器对同一卡片进行授权的授权顺序,在列表的第四列记录每个第二读卡器对同一卡片授权的有效时间。例如,如果一组第二读卡器包括一号读卡器和二号读卡器,如果第一读卡器授权的前提条件为同一卡片先获得一号读卡器的授权、再获得二号读卡器的授权,则列表中与一号读卡器对应的行的第三列可以标识为1,列表中与二号读卡器对应的行的第三列可以标识为2。当然,并不限于此,在实际应用中,还可以通过列表中读卡器对应的标识信息的排列顺序来指示要求的授权顺序,而无需专用一列来指示。另外,对于有效时间,对于所有读卡器来说,要求的有效时间可能均相同,因此,也可以不用单独一列来分别记录各个读卡器对应的有效时间,而是记录一个有效时间参数即可,具体实现方式本实施例不作限定。
而第一读卡器给予授权的前提条件还包括一组第二读卡器对同一卡片进行授权的授权顺序和/或每个第二读卡器对同一卡片授权的有效时间的情况下,卡片的第一安全状态中,也需要记录相关的信息,具体地,卡片可以在第一安全状态中新增授权顺序和/或授权时间的关键字,记录每个读卡器对卡片进行授权时的授权顺序和/或授权时间。另外,在前提条 件中同时包括授权顺序和授权时间的情况下,卡片在第一安全状态下可以只记录具体的授权时间,通过该授权时间可以体现出授权顺序,而无需专门增加一个指示授权顺序的关键字,具体的记录形式本实施例不作限定,只要卡片根据第一安全状态中记录的信息可以获取到授权顺序和授权时间即可。
在本实施例的上述可选实施方式中,假设第一读卡器授权的前提条件包括先获得一号读卡器的授权、再获得二号读卡器的授权,则只要第一安全状态中记录的卡片成功获得一号读卡器授权的时间早于卡片成功获得二号读卡器授权的时间,则判断卡片成功获得授权的顺序与前提条件中的授权顺序一致,此时,第一安全状态中记录的可以是卡片先获得一号读卡器的授权,紧接着再获得二号读卡器的授权,或者,卡片先获得一号读卡器的授权,再获得除一号读卡器和二号读卡器之外的其他读卡器(例如,三号读卡器)的授权,再获得二号读卡器的授权。只要第一安全状态中记录的卡片成功获得一号读卡器授权的时间早于成功获得二号读卡器授权的时间,则判断卡片成功获得授权的顺序与前提条件中的授权顺序一致,而如果卡片成功获得一号读卡器授权的时间晚于成功获得二号读卡器授权的时间,则判断卡片成功获得授权的顺序与上述前提条件中的授权顺序不一致。
在本实施例的上述可选实施方式中,第二读卡器对同一卡片授权的有效时间可以是指卡片获得第二读卡器的授权后,该授权维持有效的时长。在实际使用中,可以根据授权的严格程度设置第二读卡器对同一卡片授权的有效时间,在严格控制授权的场景中有效时间可以设置的比较小,在相对宽松控制授权的场景中有效时间可以设置的比较大。在具体实施过程中,可以在表示第一安全状态的列表的第四列记录卡片获得该行对应的第二读卡器的授权时的时间,在判断是否满足控制权限时,以当前时间减去第一安全状态中记录的卡片成功获得第二读卡器授权的时间得到一个时长,判断该时长是否在前提条件中第二读卡器对同一卡片的授权的有效时间内,如果不在,则第一安全状态不满足控制权限,如果在,则进一步判断第一安全状态中记录的其他信息是否满足控制权限的其他要求。
或者,也可以是针对每个第二读卡器设置一个计时器,在该卡片获取到其中一个第二读卡器的授权时,该计时器开始计时,在判断卡片是否满足第一读卡器的控制权限时,读取前提条件中的第二读卡器对应的计时器计算的时长,判断该时长是否在给定的有效时间内,进而判断卡片是否满足对应的前提条件。或者,也可以直接将每个计时器的计时时长设定为对应的有效时间,例如,5分钟,在判断卡片是否满足第一读卡器的控制权限时,直接判断前提条件中的第二读卡器对应的计时器是否超时来判断卡片是否满足对应的前提条件。具体地实施方式在本实施例中不作限定。
在本实施例中,如果第一安全状态还包括:卡片成功获得授权的顺序,和/或,卡片成功获取授权的时间,在判断卡片不满足第一读卡器的控制权限的情况下,即根据第一安全状 态判断卡片成功获得授权的顺序与前提条件中的授权顺序不一致;和/或,根据第一安全状态判断卡片成功获得授权的时间不在前提条件中的有效时间内,则卡片还清空第一安全状态中记录的卡片成功获得授权的顺序和/或卡片成功获取授权的时间的相关信息。
在本实施例中,卡片通过第一认证信息可以对第一读卡器的身份进行认证。在具体应用中,第一认证信息可以是第一读卡器利用自身的认证密钥对第一计算因子计算生成的校验值,其中,第一计算因子可以为第一读卡器生成的随机数也可以为第一读卡器给予授权的次数,还可以是该卡片请求授权的总次数,具体本实施例不作限定,第一读卡器利用认证密钥,按照预设的校验算法对第一计算因子进行计算,得到校验值,将该校验值携带在第一认证信息中发送给卡片。其中,预设的校验算法可以为MAC算法,也可以为其它校验算法,例如,签名算法,具体本实施例不作限定。而卡片在对第一认证信息进行认证时,利用获取到的第一读卡器的认证密钥,采用与第一读卡器相同的校验算法,对第一计算因子进行计算生成校验值,比较计算得到的校验值和接收的第一认证信息中的校验值是否相同,如果相同,则第一认证信息认证通过,如果不相同,则第一认证信息认证不通过。如果第一认证信息认证通过,则表明第一认证信息没有被篡改且第一读卡器的身份合法,如果认证不通过,则表明第一认证信息被篡改和/或第一读卡器的身份不合法。其中,第一计算因子可以是第一读卡器携带在认证指令中发送给卡片的,也可以是卡片采用与第一读卡器相同的规则获取到的,具体本实施例不作限定。
作为本发明实施例的一个可选实施方式,在卡片对第一认证信息认证不通过的情况下,该方法还可以包括:卡片清空第一安全状态中记录的信息。在具体实施过程中,如果第一安全状态只包括卡片已成功获得的授权,则卡片清空第一安全状态中记录的卡片已成功获得的授权的相关信息以清空第一安全状态;如果第一安全状态还包括:卡片成功获得授权的顺序,和/或,卡片成功获取授权的时间,则卡片还清空第一安全状态中记录的卡片成功获得授权的顺序,和/或,卡片成功获取授权的时间的相关信息以清空第一安全状态。
在本实施例中,卡片在对第一认证信息认证通过的情况下,向第一读卡器发送第二认证信息,其中,第二认证信息可以是卡片利用认证密钥对第三计算因子按照预设的校验算法进行计算生成的校验值,或者,第二认证信息也可以是卡片利用认证密钥对第一计算因子和第三计算因子按照预设的校验算法进行计算生成的校验值,其中,预设的校验算法可以为MAC算法,也可以为其它校验算法,例如,签名算法,具体本实施例不作限定。第三计算因子可以为卡片按照与第一读卡器(或者后台)约定的算法生成的,也可以是卡片获得授权的次数的计数,还可以是卡片生成的随机因子(在这种情况下,卡片可以将第三计算因子与第二认证信息一起发送给第一读卡器)等。
作为本发明实施例的一个可选实施方式,第一读卡器在接收第二认证信息,可以自己至 少根据第二认证信息判断是否为卡片授权,也可以与后台联合进行判断。例如,第一读卡器可以自己至少对第二认证信息进行认证,获取认证结果,然后至少根据认证结果判断是否为卡片授权;或者,第一读卡器也可以将第二认证信息发送至后台,后台至少对第二认证信息进行认证,将认证结果返回给第一读卡器,然后第一读卡器至少根据认证结果判断是否为卡片授权。
在上述可选实施方式中,第一读卡器或后台对第二认证信息进行认证时,利用卡片的认证密钥,采用与卡片相同的校验算法,对第三计算因子、或者第一计算因子和第三计算因子进行计算生成校验值,比较计算得到的校验值和接收的第二认证信息中的校验值是否相同,如果相同,则第二认证信息认证通过,如果不相同,则第二认证信息认证不通过。如果第二认证信息认证通过,则表明第二认证信息没有被篡改且卡片的身份合法,如果认证不通过,则表明第二认证信息篡改和/或卡片的身份不合法。
作为本发明实施例的一个可选实施方式,为了增强联动效果,第三计算因子还可以为卡片本地存储的第二计算因子。因此,在该可选实施方式中,在判断卡片满足控制权限之后,且在卡片向第一读卡器发送第二认证信息之前,本实施例提供的方法还包括:卡片获取存储的第二计算因子;卡片至少根据第二计算因子生成第二认证信息。其中,第二计算因子可以是卡片在获得某个读卡器的授权时获取到的,例如,第二计算因子可以为卡片在最近一次获得某个读卡器的授权时该读卡器发送给卡片的计算因子(例如,可以伴随上述第一认证信息一起发送),或者,最近一次获得某个读卡器的授权时卡片根据本地存储的计算因子计算得到的,或者,也可以是卡片之前获得每个读卡器的授权时该读卡器发送给卡片的计算因子,具体可以根据具体应用进行设置。
相应的,第一读卡器或后台对第二认证信息进行认证时,后台获取第一读卡器对应的第四计算因子,利用卡片的认证密钥,采用与卡片相同的检验算法,对第四计算因子、或者第一计算因子和第四计算因子进行计算生成校验值,比较计算得到的校验值和接收的第二认证信息中的校验值是否相同,如果相同,则第二认证信息认证通过,如果不相同,则第二认证信息认证不通过。其中,第四计算因子为根据第一读卡器给予授权的前提条件计算得到的,其中,第一读卡器给予授权的前提条件包括:是否需要第二读卡器对同一卡片进行授权,和/或,一组第二读卡器已对同一卡片进行授权。
在本实施例的一个可选实施方式中,卡片获取的第二计算因子可以为卡片最近一次成功获得读卡器的授权时得到的计算因子。
例如,第二计算因子可以是卡片最近一次成功获得读卡器的授权时,读卡器通过认证指令发送给卡片的计算因子,即卡片接收到读卡器发送的认证指令后,在对认证指令中的认证信息进行认证通过之后,卡片可以认为已成功获得该读卡器的授权,将认证指令中的计算因 子作为第二计算因子存储;或者,第二计算因子可以是卡片最近一次成功获得读卡器的授权时,对读卡器通过认证指令发送给卡片的计算因子进行运算得到的,即卡片接收到读卡器发送的认证指令后,在对认证指令中的认证信息进行认证通过之后,卡片可以认为已成功获得该读卡器的授权,则按照预定的算法对认证指令中的计算因子进行计算,将计算结果作为第二计算因子存储;或者,第二计算因子可以是卡片最近一次成功获得读卡器的授权时,对本地存储的第二计算因子进行运算得到的,即卡片接收到读卡器发送的认证指令后,在对认证指令中的认证信息进行认证通过之后,卡片可以认为已成功获得该读卡器的授权,则按照预定的算法对本地存储的第二计算因子进行计算,使用计算结果更新存储的第二计算因子;或者,第二计算因子可以是卡片最近一次成功获得读卡器的授权时,对本地存储的第二计算因子与读卡器通过认证指令发送给卡片的计算因子进行运算得到的,即卡片接收到读卡器发送的认证指令后,在对认证指令中的认证信息进行认证通过之后,卡片可以认为已成功获得该读卡器的授权,则按照预定的算法对本地存储的第二计算因子以及认证指令中的计算因子进行计算,使用计算结果更新存储的第二计算因子,采用这种方式,可以使得后台可以根据第二认证信息的计算参数追溯卡片获取授权的轨迹,进而可以判断出卡片是否满足第一读卡器给予授权的前提条件。
对应地,在该实施方式中,卡片在将第二认证信息发送给第一读卡器之后,卡片根据第一计算因子和/或第二计算因子,更新存储的第二计算因子。
对应地,在对第二认证信息进行认证时,后台可以通过如下方式获取第一读卡器对应的第四计算因子:后台获取第二读卡器对卡片进行授权时或与第一读卡器给予授权的前提条件相同的第三读卡器最近一次对卡片进行授权时得到的第四计算因子。
在具体应用中,后台可以对每张卡片维护一张表,记录该卡片每次获得到授权时得到的第四计算因子,以体现同一卡片已经获得了哪些读卡器的授权。与第三计算因子对应,第四计算因子可以是读卡器对卡片进行授权时,读卡器通过认证指令发送给卡片的计算因子,也可以是读卡器对卡片进行授权时,对读卡器通过认证指令发送给卡片的计算因子进行运算得到的,还可以是对上一个读卡器对该卡片进行授权时得到的第四计算因子进行运算得到的,或者,也可以是对上一个读卡器对该卡片进行授权时得到的第四计算因子与本读卡器通过认证指令发送给卡片的计算因子进行运算得到的。
在本实施例的一个可选实施方式中,卡片也可以按照如下方式获取第二计算因子:卡片根据存储的一个或多个第三计算因子,获取第二计算因子,其中,第三计算因子包括卡片在成功获得第四读卡器的授权时从第四读卡器获得的计算因子。
在该可选实施方式中,后台获取第一读卡器对应的第四计算因子,包括:后台获取第二计算因子列表,其中,第二计算因子列表至少包括卡片在成功获得各个读卡器授权时每个读 卡器发送给卡片的第五计算因子;后台根据第二计算因子列表判断卡片是否已成功获得前提条件中的所有第二读卡器的授权,如果是,则从第二计算因子列表中获取与前提条件中的各个第二读卡器对应的第四计算因子。
在本实施例中,第一读卡器除了可以根据第二认证信息判断是否为卡片授权之外,还可以根据其他信息判断是否为卡片授权,因此,作为本发明实施例的一个可选实施方式,在对第二认证信息进行的认证结果指示认证通过的情况下,第一读卡器进一步根据第一读卡器的授权权限列表,判断是否为卡片授权。根据卡片是否在第一读卡器的授权权限列表中判断是否为卡片授权,即判断卡片是否为第一读卡器的授权用户。在具体应用中,第一读卡器的授权权限列表可以存储在后台,也可以存储在第一读卡器本地,如果是存储在第一读卡器本地,则由第一读卡器进行判断,如果是存储在后台,则由后台进行判断,最后结合对第二认证信息进行认证的认证结果判断是否为卡片授权。例如,如果由后台对第二认证信息进行认证且授权权限列表存储在后台,则后台对第二认证信息进行认证通过之后,进一步判断卡片是否在第一读卡器的授权权限列表中,如果是,则向第一读卡器认证通过的认证结果,第一读卡器根据该认证结果,确定对该卡片进行授权;如果是由第一读卡器对第二认证信息进行认证而授权权限列表存储在第一读卡器,则后台对第二认证信息进行认证通过之后,向第一读卡器返回指示第二认证信息是否认证通过的认证结果,如果该认证结果指示第二认证信息认证通过,则第一读卡器进一步判断卡片是否在第一读卡器的授权权限列表中,如果是,则确定对该卡片进行授权,否则确定不对卡片进行授权。另外,如果由第一读卡器对第二认证信息进行认证且授权权限列表存储在第一读卡器,则第一读卡器对第二认证信息进行认证通过之后,进一步判断卡片是否在第一读卡器的授权权限列表中,如果是,则确定对该卡片进行授权;而由第一读卡器对第二认证信息进行认证且授权权限列表存储在后台的情况下,第一读卡器对第二认证信息进行认证通过之后,可以将卡片的相关信息发送给后台,后台判断卡片是否在第一读卡器的授权权限列表中,将判断结果返回给第一读卡器,第一读卡器根据返回的判断结果判断是否对该卡片进行授权。
在具体应用中,为了增强授权方法的安全性,不仅在卡片侧判断第一安全状态是否满足前提条件,还可以在第二认证信息认证通过的情况下,增加在后台侧判断后台记录的第二安全状态是否满足控制权限的过程。因此,作为本发明实施例的一个可选实施方式,在对第二认证信息认证通过的情况下,本实施例提供的授权方法还包括:获取后台当前记录卡片的第二安全状态以及第一读卡器的控制权限,其中,第二安全状态包括:卡片已成功获得的授权,第一读卡器授权的控制权限包括:第一读卡器给予授权的前提条件;根据第二安全状态判断卡片是否满足前提条件,如果是,则获得指示认证通过的认证结果,并更新第二安全状态,在第二安全状态中记录卡片已获得第一读卡器的授权,否则,获得指示认证不通过的认证结 果,清空第二安全状态。
在本实施例中,卡片的第二安全状态表示后台记录的卡片当前已经成功获得的授权,后台记录第二安全状态的形式可以与卡片记录第一安全状态的形式相同,例如,采用一位或多位的比特串、或者列表、或者文本来记录第二安全状态,后台记录第二安全状态的方式具体可参见卡片记录第一安全状态的方式,在此不再赘述。
在本实施例中,在第二认证信息认证通过的情况下:如果第二安全状态也满足第一读卡器给予授权的前提条件,才能获得指示认证通过的认证结果,在第二安全状态中记录卡片已获得第一读卡器的授权;如果第二安全状态不满足第一读卡器给予授权的前提条件,获得指示认证不通过的认证结果,此时清空第二安全状态。具体的,可以将记录第二安全状态的比特串或列表全部置为0以清空第二安全状态。
在本实施例中,如果第一读卡器给予授权的前提条件中只包括一组第二读卡器已对同一卡片进行授权,则根据第二安全状态判断卡片是否满足控制权限时,只需根据第二安全状态判断卡片是否已成功获得前提条件中的所有第二读卡器的授权,即只需要判断卡片是否已获得前提条件中的所有第二读卡器的授权,而不需要考虑授权的顺序和时间。如果第二安全状态中记录的卡片已成功获得的授权中包含前提条件中的所有第二读卡器的授权,则第二安全状态中记录的卡片已成功获得的授权中包含了前提条件中的所有第二读卡器的授权,则第二安全状态满足控制权限,如果第二安全状态中记录的卡片已成功获得的授权中没有包含前提条件中的全部第二读卡器的授权,则第二安全状态不满足控制权限。
在具体应用中,为了增加安全性,某些读卡器给予授权的前提条件中不仅限定需要其他读卡器的授权,而且还限定其它读卡器对卡片进行授权的顺序和/或有效时间。因此,作为本发明实施例的一个可选实施方式,在第一读卡器给予授权的前提条件还包括一组第二读卡器对同一卡片进行授权的授权顺序和/或第二读卡器对同一卡片进行授权的有效时间的情况下,相应的,第二安全状态还包括:卡片成功获得授权的顺序,和/或,卡片成功获取授权的时间,即后台还需要记录卡片成功获得各个读卡器授权的顺序和/或时间;判断第二安全状态是否满足前提条件包括:根据第二安全状态判断卡片是否已获得所有第二读卡器的授权,以及卡片获得第二读卡器的授权的授权顺序和/或时间是否满足前提条件,即根据第二安全状态判断卡片成功获得授权的顺序是否与前提条件中的授权顺序一致,和/或,根据第二安全状态判断卡片成功获得授权的时间是否在前提条件中的有效时间内。
在本实施例中,后台通过判断卡片获得授权的顺序是否与前提条件中的授权顺序一致,从而形成一条反潜授权路径,卡片必须按照预定的顺序依次获得授权。后台通过判断卡片成功获得授权的时间是否在前提条件中的有效时间内,防止卡片通过凑单获得授权。
在本实施例的具体应用中,当第一读卡器给予授权的前提条件还包括一组第二读卡器对 同一卡片进行授权的授权顺序和/或每个第二读卡器对同一卡片授权的有效时间的情况下,第二安全状态中,也需要记录相关的信息,具体地,可以在第二安全状态中新增授权顺序和/或授权时间的关键字,记录每个读卡器对卡片进行授权时的授权顺序和/或授权时间。另外,在前提条件中同时包括授权顺序和授权时间的情况下,卡片在第二安全状态中可以只记录具体的授权时间,通过该授权时间可以体现出授权顺序,而无需专门增加一个指示授权顺序的关键字,具体的记录形式本实施例不作限定,只需根据第二安全状态中记录的信息可以获得授权顺序和授权时间即可。
作为本发明实施例的一个可选实施方式,在卡片接收到第一读卡器发送的认证指令之后,本实施例提供的授权方法还包括:卡片获取本次认证的属性信息,对属性信息进行加密后存储;在卡片接收第一读卡器发送的认证指令之前,该方法还可以包括:第一读卡器获取卡片的标识信息,第一读卡器向卡片发送认证指令;第一读卡器向后台发送至少包括卡片的标识信息的通知;后台根据通知,获取并存储卡片的本次认证的属性信息,例如,第一读卡器可以发送寻卡指令,卡片响应寻卡指令,向第一读卡器发送寻卡响应,第一读卡器接收寻卡响应,从寻卡响应中获取卡片的标识信息。在卡片对属性信息进行加密后存储之后,该方法还可以包括:获取卡片存储的加密的属性信息;对加密的属性信息进行解密;将解密得到的属性信息与后台存储的卡片的属性信息进行对比,如果不匹配,标识卡片为非法卡片。在标识该卡片为非法卡片之后,可以指示卡片删除内部存储的各个计算因子,指示后台删除与该卡片相关的计算因子。从而可以避免后台不能获知卡片被非法读取的情况。
在本实施例中,卡片的本次认证的属性信息可以是第一读卡器对卡片进行认证的属性信息,例如,第一读卡器对卡片进行认证的时间、地点和次数等信息。具体的,地点的记录方式可以为第一读卡器的序列号,根据第一读卡器的序列号可以与第一读卡器的位置进行关联,根据第一读卡器的序列号可以确定第一读卡器的地点;此外,也可以在第一读卡器内部设置具有定位功能的芯片,根据该定位芯片可以获取第一读卡器对卡片进行认证的地点信息。卡片可以利用第一读卡器的公钥对属性信息进行加密。将属性信息加密后存储在卡片内部,可以防止卡片内部的属性信息被其他非法设备获取,保证属性信息的安全。
在本实施例中,后台获取至少包括卡片的标识信息的通知后,将本次认证的属性信息与卡片的标识信息关联并存储。在卡片对属性信息进行加密后存储之后,可以由后台获取或者由能够读取卡片内部的属性信息的专有设备读取卡片存储的加密的属性信息,对加密的属性信息进行解密,将解密得到的属性信息与后台记录的卡片的属性信息进行比对,如果比对不一致,则卡片存在被不法设备非法读取的风险,此时将卡片标识为非法卡片。通过本可选实施方式,可以防止不法设备对卡片进行攻击,发起非法认证指令,获取卡片内部的数据,从而攻破卡片。
实施例2
本实施例提供了一种卡片20,图2为本实施例提供的卡片20的结构示意图。在本实施例中,对卡片20的结构进行了简要说明,其他未尽事宜,可参见实施例1中的说明。
如图2所示,本实施例提供的卡片20,包括:第一接收模块2001,用于接收第一读卡器发送的认证指令,其中,认证指令中携带有标识信息和第一认证信息;确定模块2002,用于根据标识信息确定控制权限,其中,控制权限包括:第一读卡器给予授权的前提条件;第一获取模块2003,用于获取当前记录的第一安全状态,其中,第一安全状态包括:卡片20已成功获得的授权;第一判断模块2004,用于根据第一安全状态判断卡片20是否满足控制权限,如果满足,则触发第一认证模块2005;第一认证模块2005,用于对第一认证信息进行认证,在认证通过的情况下,触发第一发送模块2006和更新模块2007;第一发送模块2006,用于向第一读卡器发送第二认证信息;更新模块2007,用于更新第一安全状态,记录卡片20已成功获得第一读卡器的授权。
本实施例提供的卡片,只有在确定满足控制权限的情况下,才对第一读卡器的认证指令进行响应,并向第一读卡器发送第二认证信息,以期获得第一读卡器的授权。因此,对于安全级别较高的读卡器,可以设置对应的控制权限,例如,需要一张卡片已经获得其它一个或多个读卡器的授权。在用户的卡片被盗的情况下,如果想要非法读卡片,需要模拟多个读卡器向卡片发送认证指令,使得卡片满足控制权限,才有可能使卡片响应安全级别更高的读卡器,从而增加了非法获取卡片内存储的信息的难度,提高了卡片的安全性。
在本实施例中,第一接收模块2001和第一发送模块2006可以是独立的模块,也可以集成在一个通信模块中。第一接收模块2001和第一发送模块2006可以非接触通信模块,例如,符合ISO14443A、ISO14443B、ISO15693等标准协议的通信模块,也可以为接触通信模块,例如,符合ISO7816标准协议的通信模块。
在本实施例中,至少可以通过以下两种机制来实现控制权限的控制:
方式一:通过响应认证指令的响应权限实现。即在该方式中,第一认证模块2005只有在卡片20满足认证指令对应的响应权限的情况下,才会对接收到的认证指令进行响应。在该实施方式中,可以对认证指令的响应权限进行设置,将与各个读卡器的标识信息对应的认证指令的响应权限设置为该读卡器的控制权限,在具体应用中,可以在卡片20中预先存储标识信息与响应认证指令的控制权限的对应关系,第一接收模块2001在接收到认证指令之后,确定模块2002根据认证指令中携带的标识信息,查找本地存储的标识信息与响应认证指令的控制权限的对应关系,获取响应接收到的认证指令的控制权限。即在该实施方式中,卡片20中记录了每个读卡器对应的标识信息与控制权限的对应关系,其中,该标识信息可 以是读卡器的标识信息,也可以是读卡器对应的认证密钥等的标识信息,确定模块2002,根据该对应关系,可以获取到与认证指令中的标识信息对应的控制权限。在该实施方式中,将响应接收到的认证指令的前提设置为卡片20满足对应的控制权限,即只有在第一判断模块2004根据第一安全状态判断满足该控制权限的情况下,第一认证模块2005才响应第一读卡器发送的认证指令,对认证指令中携带的第一认证信息进行认证。
方式二:通过访问存储认证密钥的文件的访问权限实现。第一认证模块2005对第一读卡器发送的第一认证信息进行认证时,需要获取相应的认证密钥,在该实施方式中,对存储认证密钥的文件的访问权限进行设置,将该文件的访问权限设置为该认证密钥对应的读卡器的控制权限,只有在卡片20满足对应的访问权限时,第一认证模块2005才可以访问存储认证密钥的文件,获取到与第一读卡器对应的认证密钥,即在该实施方式中,确定模块2002根据标识信息确定存储认证密钥的文件的标识信息(例如,文件名),然后根据该文件的标识信息获取到访问该文件的控制权限。即在该实施方式中,确定模块2002获取到的控制权限为存储与第一读卡器对应的认证密钥的文件的访问权限,第一判断模块2004判断当前是否满足该文件的访问权限,在判断满足的情况下,允许第一认证模块2005访问该文件,获取对应的认证密钥,进而使用该认证密钥对第一读卡器发送的第一认证信息进行认证。
在上述实施方式中,控制权限中记录了第一读卡器给予卡片20授权的前提条件,作为本发明实施例的一个可选实施方式,第一读卡器给予授权的前提条件包括:一组第二读卡器已对同一卡片20进行授权;第一判断模块2004通过以下方式判断卡片20是否满足控制权限:根据第一安全状态判断卡片20是否已成功获得前提条件中的所有第二读卡器的授权。在具体应用中,一组第二读卡器可以为0个(表示同一张卡片20并不需要在获得其它读卡器的授权的前提下才能获取该第一读卡器的授权)、1个或多个,具体可以根据实际应用来设置。
在本实施例中,如果第一安全状态只包括卡片20已成功获得的授权,则作为本发明实施例的一个可选实施方式,如图3所示,卡片20还包括:清空模块2008,用于在第一判断模块2004判断卡片20不满足控制权限的情况下,即第一判断模块2004根据第一安全状态判断卡片20没有成功获得前提条件中的所有第二读卡器的授权的情况下,清空第一安全状态中记录的信息,以节省卡片20的存储空间。
但在具体应用中,为了增加安全性,某些读卡器可能不仅限定需要其它读卡器进行授权,而且还可能限定其它读卡器对卡片20进行授权的顺序和/或有效时间。因此,作为本发明实施例的一个可选实施方式,第一读卡器给予授权的前提条件还可以包括:一组第二读卡器对同一卡片20进行授权的授权顺序和/或每个第二读卡器对同一卡片20授权的有效时间;对应地,第一安全状态还包括:卡片20成功获得授权的顺序,和/或,卡片20成功获取授权 的时间,即卡片20还需要记录成功获得各个读卡器授权的顺序和/或时间;第一判断模块2004还用于在判断卡片20是否满足控制权限时,根据第一安全状态判断卡片20成功获得授权的顺序是否与前提条件中的授权顺序一致;和/或,根据第一安全状态判断卡片20成功获得授权的时间是否在前提条件中的有效时间内。
在本实施例中,如果第一安全状态还包括卡片20成功获得授权的顺序,和/或,卡片20成功获取授权的时间,在第一判断模块2004判断卡片20不满足第一读卡器的控制权限的情况下,即第一判断模块2004根据第一安全状态判断卡片20成功获得授权的顺序与前提条件中的授权顺序不一致;和/或,根据第一安全状态判断卡片成功获得授权的时间不在前提条件中的有效时间内,则清空模块2008还清空第一安全状态中记录的卡片20成功获得授权的顺序和/或卡片20成功获取授权的时间的相关信息。
作为本发明实施例的一个可选实施方式,在第一认证模块2005对第一认证信息认证不通过的情况下,清空模块2008还用于清空第一安全状态中记录的信息。
作为本发明实施例的一个可选实施方式,为了增强联动效果,第三计算因子还可以为卡片20本地存储的第二计算因子,因此,在该可选实施方式中,如图3所示,卡片20还包括:生成模块2009,用于在第一判断模块2004判断卡片20满足控制权限之后,且在第一发送模块2006向第一读卡器发送第二认证信息之前,获取存储的第二计算因子,至少根据第二计算因子生成第二认证信息。作为本发明实施例的一个可选实施方式,如图3所示,卡片20还包括:第二获取模块2010、加密模块2011、第一存储模块2012;其中,第二获取模块2010,用于在接收第一读卡器发送的认证指令之后,获取本次认证的属性信息;加密模块2011,用于对属性信息进行加密;第一存储模块2012,用于存储加密的属性信息;第一发送模块2006,还用于响应外部的操作指令,外发加密的属性信息。
实施例3
本实施例提供了一种授权系统,如图4所示,该授权系统包括卡片20和第一读卡器21。本实施例中的卡片20与实施例2提供的卡片20相同,具体参见实施例2的说明。在本实施例中,对授权系统的结构进行了简要说明,其他未尽事宜,可参见实施例1中的说明。
如图4所示,第一读卡器21,包括:第二接收模块211,用于接收卡片20发送的第二认证信息;授权模块212,用于至少根据第二认证信息判断是否为卡片授权。
通过本实施例提供的授权系统,卡片20只有在确定满足控制权限的情况下,才对第一读卡器21的认证指令进行响应,向第一读卡器21发送第二认证信息,以期获得第一读卡器21的授权,因而,对于安全级别较高的读卡器,可以设置对应的控制权限,例如,需要一 张卡片已经获得其它一个或多个读卡器的授权,非法用户如果想攻破一个读卡器,获得该读卡器的授权,必须先获得其它一个或多个读卡器的授权,才能响应该读卡器的认证指令,进而才有可能获取到该读卡器的授权。
作为本发明实施例的一个可选实施方式,如图5所示,本实施例提供的授权系统还可以包括:后台22,第二接收模块211在接收第二认证信息后,可以由授权模块212至少根据第二认证信息判断是否为卡片20授权,也可以由授权模块212与后台22联合进行判断。在由授权模块212至少根据第二认证信息判断是否为卡片20授权的情况下,授权模块212可以至少对第二认证信息进行认证,获取认证结果,然后至少根据认证结果判断是否为卡片20授权。在授权模块212联合后台22判断是否为卡片20授权的情况下,授权模块212包括:发送单元2121,用于向后台22发送第二认证信息;接收单元2122,用于接收后台22至少对第二认证信息进行认证得到的认证结果;授权单元2123,用于至少根据认证结果判断是否为卡片20授权;后台22包括:第三接收模块221,用于接收第二认证信息;第二认证模块222,用于至少对第二认证信息进行认证,得到认证结果;第二发送模块223,用于向第一读卡器21返回认证结果。
在本实施例中,后台22可以是对所有关联的读卡器进行管理的服务器,可以在后台22中存储关联的读卡器授权相关的全部信息。授权模块212中的发送单元2121和接收单元2122用于与后台22进行通信,发送单元2121和接收单元2122可以是独立的单元,也可以集成在一个通信单元中。发送单元2121和接收单元2122可以为远程网络通信单元,例如,GSM、GPRS、3G、4G等通信单元,在本实施例中不作具体限定;发送单元2121和接收单元2122也可以为近距离无线通信单元,例如,蓝牙、NFC、WIFI、UWB、RFID、红外传输等通信单元,在本实施例中不作具体限定。第三接收模块221、第二发送模块223分别与发送单元2121、接收单元2122的类型相匹配。
在本实施例中,当卡片20获取的第二计算因子可以为卡片20最近一次成功获得读卡器的授权时得到的计算因子时,在对第二认证信息进行认证时,后台22可以通过如下方式获取第一读卡器21对应的第四计算因子:后台22获取第二读卡器对卡片20进行授权时或与第一读卡器21给予授权的前提条件相同的第三读卡器最近一次对卡片进行授权时得到的第四计算因子。
在本实施例中,当卡片20根据存储的一个或多个第三计算因子获取第二计算因子时,在对第二认证信息进行认证时,后台22可以通过如下方式获取第一读卡器21对应的第四计算因子:后台22获取第二计算因子列表,其中,第二计算因子列表至少包括卡片20在成功获得各个读卡器授权时每个读卡器发送给卡片20的第五计算因子;后台22根据第二计算因子列表判断卡片20是否已成功获得前提条件中的所有第二读卡器的授权,如果是,则从第 二计算因子列表中获取与前提条件中的各个第二读卡器对应的第四计算因子。
在本实施例中,授权模块212除了可以根据第二认证信息判断是否为卡片授权之外,还可以根据其他信息判断是否为卡片20授权,因此,作为本发明实施例的一个可选实施方式,授权模块212在对第二认证信息进行的认证结果指示认证通过的情况下,进一步通过以下方式判断是否为卡片20授权:根据第一读卡器21的授权权限列表,判断是否为卡片20授权。授权模块212根据卡片20是否在第一读卡器21的权限列表中判断是否为卡片20授权,即判断卡片20是否为第一读卡器21的授权用户。在具体应用中,第一读卡器21的授权权限列表可以存储在后台22,也可以存储在第一读卡器21本地的存储器中,如果是存储在第一读卡器21本地,则由第一读卡器21进行判断,如果是存储在后台22,则由后台22进行判断,最后结合对第二认证信息进行认证的认证结果判断是否为卡片20授权。
在具体应用中,为了增强授权方法的安全性,还可以在第二认证信息认证通过的情况下,在后台22侧增加判断后台22记录的第二安全状态是否满足控制权限的功能。因此,作为本发明实施例的一个可选实施方式,如图5所示,后台22,还包括:第三获取模块224,用于在第二认证模块222对第二认证信息认证通过的情况下,获取后台22当前记录卡片20的第二安全状态以及第一读卡器21的控制权限,其中,第二安全状态包括:卡片20已成功获得的授权,第一读卡器21授权的控制权限包括:第一读卡器21给予授权的前提条件;第二判断模块225,用于根据第二安全状态判断卡片20是否满足前提条件,如果是,则获得指示认证通过的认证结果,并更新第二安全状态,在第二安全状态中记录卡片已获得第一读卡器21的授权,否则,获得指示认证不通过的认证结果,清空第二安全状态。
在具体应用中,为了增加安全性,某些读卡器给予授权的前提条件中不仅限定需要其他读卡器的授权,而且还限定其它读卡器对卡片进行授权的顺序和/或有效时间。因此,作为本发明实施例的一个可选实施方式,在第一读卡器21给予授权的前提条件还包括一组第二读卡器对同一卡片20进行授权的授权顺序和/或第二读卡器对同一卡片20进行授权的有效时间的情况下,第二安全状态还包括:卡片20成功获得授权的顺序,和/或,卡片20成功获取授权的时间;第二判断模块225用于通过以下方式判断卡片20是否满足前提条件:根据第二安全状态判断卡片20是否已获得所有第二读卡器的授权,以及卡片20获得第二读卡器的授权的授权顺序和/或时间是否满足前提条件,即根据第二安全状态判断卡片20成功获得授权的顺序是否与前提条件中的授权顺序一致,和/或,根据第二安全状态判断卡片20成功获得授权的时间是否在前提条件中的有效时间内。
作为本发明实施例的一个可选实施方式,在卡片20中记录了每次认证的属性信息的情况下,如图5所示,本实施例提供的授权系统还包括:验证装置23;后台22还包括:第四获取模块226和第二存储模块227;第一读卡器还包括:第五获取模块213;其中,第五获 取模块213,用于获取卡片20的标识信息;发送单元2121,还用于向后台22发送至少包括卡片20的标识信息的通知;第三接收模块221,还用于接收通知;第四获取模块226,用于根据通知,获取卡片20的本次认证的属性信息;第二存储模块227,用于存储第四获取模块226获取的卡片20的本次认证的属性信息;验证装置23,用于从卡片20获取加密的属性信息以及从后台22获取第二存储模块227的属性信息,对加密的属性信息进行解密,将解密得到的属性信息与从后台22获取的属性信息进行对比,如果不匹配,标识卡片20为非法卡片。
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的组件、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。
应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。
此外,在本发明各个实施例中的各功能单元可以集成在一个处理组件中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个组件中。上述集成的组件既可以采用硬件的形式实现,也可以采用软件功能组件的形式实现。所述集成的组件如果以软件功能组件的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。
上述提到的存储介质可以是只读存储器,磁盘或光盘等。
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含 于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。
尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在不脱离本发明的原理和宗旨的情况下在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。本发明的范围由所附权利要求及其等同限定。

Claims (26)

  1. 一种授权方法,其特征在于,包括:
    卡片接收第一读卡器发送的认证指令,其中,所述认证指令中携带有标识信息和第一认证信息;
    所述卡片根据所述标识信息确定控制权限,其中,所述控制权限包括:所述第一读卡器给予授权的前提条件;
    所述卡片获取当前记录的第一安全状态,其中,所述第一安全状态包括:所述卡片已成功获得的授权;
    所述卡片根据所述第一安全状态判断所述卡片是否满足所述控制权限,如果满足,则对所述第一认证信息进行认证,在认证通过的情况下,向所述第一读卡器发送第二认证信息,并更新所述第一安全状态,记录所述卡片已成功获得所述第一读卡器的授权;
    所述第一读卡器接收所述第二认证信息,至少根据所述第二认证信息判断是否为所述卡片授权。
  2. 根据权利要求1所述的方法,其特征在于,
    所述卡片根据所述标识信息确定控制权限,包括:所述卡片根据所述标识信息确定存储认证密钥的文件的标识信息,其中,所述认证密钥用于认证所述第一认证信息;所述卡片获取访问所述文件的控制权限;
    所述卡片对所述第一认证信息进行认证,包括:在判断所述第一安全状态满足所述控制权限的情况下,读取所述认证密钥,使用所述认证密钥对所述第一认证信息进行认证。
  3. 根据权利要求1所述的方法,其特征在于,所述卡片根据所述标识信息确定控制权限,包括:所述卡片根据所述标识信息,查找本地存储的标识信息与响应认证指令的控制权限的对应关系,获取响应接收到的所述认证指令的所述控制权限。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,
    所述第一读卡器给予授权的前提条件包括:一组第二读卡器已对同一卡片进行授权;
    所述卡片根据所述第一安全状态判断所述卡片是否满足所述控制权限,包括:根据所述第一安全状态判断所述卡片是否已成功获得所述前提条件中的所有所述第二读卡器的授权。
  5. 根据权利要求4所述的方法,其特征在于,
    所述第一读卡器给予授权的前提条件还包括:一组所述第二读卡器对同一卡片进行授权的授权顺序和/或每个所述第二读卡器对同一卡片授权的有效时间;
    所述第一安全状态还包括:所述卡片成功获得授权的顺序,和/或,所述卡片成功获取授权的时间;
    所述卡片根据所述第一安全状态判断所述卡片是否满足所述控制权限,包括:
    根据所述第一安全状态判断所述卡片成功获得授权的顺序是否与所述前提条件中的授权顺序一致;和/或,
    根据所述第一安全状态判断所述卡片成功获得授权的时间是否在所述前提条件中的所述有效时间内。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,在判断所述卡片不满足所述控制权限,或所述卡片对所述第一认证信息认证不通过的情况下,所述方法还包括:所述卡片清空所述第一安全状态中记录的信息。
  7. 根据权利要求1至5任一项所述的方法,其特征在于,在判断所述卡片满足所述控制权限之后,且在所述卡片向所述第一读卡器发送第二认证信息之前,所述方法还包括:
    所述卡片获取存储的第二计算因子;
    所述卡片至少根据所述第二计算因子生成第二认证信息。
  8. 根据权利要求1至7任一项所述的方法,其特征在于,
    所述第一读卡器接收所述第二认证信息,至少根据所述第二认证信息判断是否为所述卡片授权,包括:
    所述第一读卡器至少对第二认证信息进行认证,获取认证结果;或者,所述第一读卡器将所述第二认证信息发送至后台,所述后台至少对所述第二认证信息进行认证,将认证结果返回给所述第一读卡器;
    所述第一读卡器至少根据认证结果判断是否为所述卡片授权。
  9. 根据权利要求8所述的方法,其特征在于,所述第一读卡器至少根据对所述第二认证信息进行认证的认证结果判断是否为所述卡片授权,包括:
    在认证结果指示认证通过的情况下,所述第一读卡器根据所述第一读卡器的授权权限列表,判断是否为所述卡片授权。
  10. 根据权利要求9所述的方法,其特征在于,在对所述第二认证信息认证通过的情况下,所述方法还包括:
    获取所述后台当前记录所述卡片的第二安全状态以及所述第一读卡器的控制权限,其中,所述第二安全状态包括:所述卡片已成功获得的授权,所述第一读卡器授权的控制权限包括:所述第一读卡器给予授权的前提条件;
    根据所述第二安全状态判断所述卡片是否满足所述前提条件,如果是,则获得指示 认证通过的认证结果,并更新所述第二安全状态,在所述第二安全状态中记录所述卡片已获得所述第一读卡器的授权,否则,获得指示认证不通过的认证结果,清空所述第二安全状态。
  11. 根据权利要求10所述的方法,其特征在于,
    在所述第一读卡器给予授权的前提条件还包括一组所述第二读卡器对同一卡片进行授权的授权顺序和/或所述第二读卡器对同一卡片进行授权的有效时间的情况下,所述第二安全状态还包括:所述卡片成功获得授权的顺序,和/或,所述卡片成功获取授权的时间;
    判断所述第二安全状态是否满足所述前提条件包括:根据所述第二安全状态判断所述卡片是否已获得所有所述第二读卡器的授权,以及所述卡片获得所述第二读卡器的授权的授权顺序和/或时间是否满足所述前提条件。
  12. 根据权利要求1至11任一项所述的方法,其特征在于,
    在所述卡片接收到所述第一读卡器发送的认证指令之后,所述方法还包括:所述卡片获取本次认证的属性信息,对所述属性信息进行加密后存储;
    在卡片接收第一读卡器发送的认证指令之前,所述方法还包括:所述第一读卡器获取所述卡片的标识信息;所述第一读卡器向所述卡片发送所述认证指令;所述第一读卡器向后台发送至少包括所述卡片的标识信息的通知;所述后台根据所述通知,获取并存储所述卡片的本次认证的所述属性信息;
    在所述卡片对所述属性信息进行加密后存储之后,所述方法还包括:获取所述卡片存储的加密的所述属性信息;对所述加密的属性信息进行解密;将解密得到的所述属性信息与所述后台存储的所述卡片的所述属性信息进行对比,如果不匹配,标识所述卡片为非法卡片。
  13. 一种卡片,其特征在于,包括:
    第一接收模块,用于接收第一读卡器发送的认证指令,其中,所述认证指令中携带有标识信息和第一认证信息;
    确定模块,用于根据所述标识信息确定控制权限,其中,所述控制权限包括:所述第一读卡器给予授权的前提条件;
    第一获取模块,用于获取当前记录的第一安全状态,其中,所述第一安全状态包括:所述卡片已成功获得的授权;
    第一判断模块,用于根据所述第一安全状态判断所述卡片是否满足所述控制权限,如果满足,则触发第一认证模块;
    所述第一认证模块,用于对所述第一认证信息进行认证,在认证通过的情况下,触 发第一发送模块和更新模块;
    所述第一发送模块,用于向所述第一读卡器发送第二认证信息;
    所述更新模块,用于更新所述第一安全状态,记录所述卡片已成功获得所述第一读卡器的授权。
  14. 根据权利要求13所述的卡片,其特征在于,
    所述确定模块通过以下方式确定控制权限:根据所述标识信息确定存储认证密钥的文件的标识信息,其中,所述认证密钥用于认证所述第一认证信息;获取访问所述文件的控制权限;
    所述第一认证模块通过以下方式对所述第一认证信息进行认证:从所述文件中读取所述认证密钥,使用所述认证密钥对所述第一认证信息进行认证。
  15. 根据权利要求13所述的卡片,其特征在于,所述确定模块通过以下方式确定控制权限:根据所述标识信息,查找本地存储的标识信息与响应认证指令的控制权限的对应关系,获取响应接收到的所述认证指令的所述控制权限。
  16. 根据权利要求13至15任一项所述的卡片,其特征在于,
    所述第一读卡器给予授权的前提条件包括:一组第二读卡器已对同一卡片进行授权;
    所述第一判断模块通过以下方式判断所述卡片是否满足所述控制权限:根据所述第一安全状态判断所述卡片是否已成功获得所述前提条件中的所有所述第二读卡器的授权。
  17. 根据权利要求16所述的卡片,其特征在于,
    所述第一读卡器给予授权的前提条件还包括:一组所述第二读卡器对同一卡片进行授权的授权顺序和/或每个所述第二读卡器对同一卡片授权的有效时间;
    所述第一安全状态还包括:所述卡片成功获得授权的顺序,和/或,所述卡片成功获取授权的时间;
    所述第一判断模块还用于在判断所述卡片是否满足所述控制权限时,根据所述第一安全状态判断所述卡片成功获得授权的顺序是否与所述前提条件中的授权顺序一致;和/或,根据所述第一安全状态判断所述卡片成功获得授权的时间是否在所述前提条件中的所述有效时间内。
  18. 根据权利要求13至17任一项所述的卡片,其特征在于,所述卡片还包括:清空模块,用于在所述第一判断模块判断所述卡片不满足所述控制权限,或所述第一认证模块对所述第一认证信息认证不通过的情况下,清空所述第一安全状态中记录的信息。
  19. 根据权利要求13至17任一项所述的卡片,其特征在于,所述卡片还包括:生 成模块,用于在所述第一判断模块判断所述卡片满足所述控制权限之后,且在所述第一发送模块向所述第一读卡器发送第二认证信息之前,获取存储的第二计算因子,至少根据所述第二计算因子生成所述第二认证信息。
  20. 根据权利要求13至19任一项所述的卡片,其特征在于,所述卡片还包括:第二获取模块、加密模块、第一存储模块;其中,
    所述第二获取模块,用于在接收第一读卡器发送的认证指令之后,获取本次认证的属性信息;
    所述加密模块,用于对所述属性信息进行加密;
    所述第一存储模块,用于存储加密的所述属性信息;
    所述第一发送模块,还用于响应外部的操作指令,外发所述加密的属性信息。
  21. 一种授权系统,其特征在于,包括:第一读卡器和权利要求13至20任一项所述的卡片;其中,
    所述第一读卡器,包括:
    第二接收模块,用于接收所述卡片发送的第二认证信息;
    授权模块,用于至少根据所述第二认证信息判断是否为所述卡片授权。
  22. 根据权利要求21所述的授权系统,其特征在于,还包括:后台;
    所述授权模块包括:发送单元,用于向所述后台发送所述第二认证信息;接收单元,用于接收所述后台至少对所述第二认证信息进行认证得到的认证结果;授权单元,用于至少根据所述认证结果判断是否为所述卡片授权;
    所述后台包括:第三接收模块,用于接收所述第二认证信息;第二认证模块,用于至少对所述第二认证信息进行认证,得到所述认证结果;第二发送模块,用于向所述第一读卡器返回所述认证结果。
  23. 根据权利要求21或22所述的授权系统,其特征在于,
    所述授权模块在对所述第二认证信息进行认证的认证结果指示认证通过的情况下,进一步通过以下方式判断是否为所述卡片授权:根据所述第一读卡器的授权权限列表,判断是否为所述卡片授权。
  24. 根据权利要求22所述的授权系统,其特征在于,
    所述后台,还包括:
    第三获取模块,用于在所述第二认证模块对所述第二认证信息认证通过的情况下,获取所述后台当前记录所述卡片的第二安全状态以及所述第一读卡器的控制权限,其中,所述第二安全状态包括:所述卡片已成功获得的授权,所述第一读卡器授权的控制权限包括:所述第一读卡器给予授权的前提条件;
    第二判断模块,用于根据所述第二安全状态判断所述卡片是否满足所述前提条件,如果是,则获得指示认证通过的所述认证结果,并更新所述第二安全状态,在所述第二安全状态中记录所述卡片已获得所述第一读卡器的授权,否则,获得指示认证不通过的所述认证结果,清空所述第二安全状态。
  25. 根据权利要求24所述的授权系统,其特征在于,
    在所述第一读卡器给予授权的前提条件还包括一组所述第二读卡器对同一卡片进行授权的授权顺序和/或所述第二读卡器对同一卡片进行授权的有效时间的情况下,所述第二安全状态还包括:所述卡片成功获得授权的顺序,和/或,所述卡片成功获取授权的时间;
    所述第二判断模块通过以下方式判断所述卡片是否满足所述前提条件:用于根据所述第二安全状态判断所述卡片是否已获得所有所述第二读卡器的授权,以及所述卡片获得所述第二读卡器的授权的授权顺序和/或时间是否满足所述前提条件。
  26. 根据权利要求22至25任一项所述的授权系统,其特征在于,所述系统还包括:验证装置;所述后台还包括:第二存储模块和第四获取模块;所述第一读卡器还包括:第五获取模块;其中,
    所述第五获取模块,用于获取所述卡片的标识信息;
    所述发送单元,还用于向后台发送至少包括所述卡片的标识信息的通知;
    所述第三接收模块,还用于接收所述通知;
    所述第四获取模块,用于根据所述通知,获取所述卡片的本次认证的属性信息;
    所述第二存储模块,用于存储所述第四获取模块获取的所述卡片的本次认证的所述属性信息;
    所述验证装置,用于从所述卡片获取加密的属性信息以及从所述后台获取所述第二存储模块的所述属性信息,对所述加密的属性信息进行解密,将解密得到的所述属性信息与从所述后台获取的所述属性信息进行对比,如果不匹配,标识所述卡片为非法卡片。
PCT/CN2017/100209 2016-09-09 2017-09-01 一种授权系统、方法及卡片 WO2018045917A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610816022.4A CN107423609B (zh) 2016-09-09 2016-09-09 一种授权系统、方法及卡片
CN201610816022.4 2016-09-09

Publications (1)

Publication Number Publication Date
WO2018045917A1 true WO2018045917A1 (zh) 2018-03-15

Family

ID=60422701

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/100209 WO2018045917A1 (zh) 2016-09-09 2017-09-01 一种授权系统、方法及卡片

Country Status (2)

Country Link
CN (1) CN107423609B (zh)
WO (1) WO2018045917A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010687A (zh) * 2019-12-28 2020-04-14 飞天诚信科技股份有限公司 一种非接触卡与移动设备进行快速通信的方法及系统
CN112702733A (zh) * 2020-12-30 2021-04-23 飞天诚信科技股份有限公司 一种读卡终端及其工作方法
CN114531679A (zh) * 2022-02-23 2022-05-24 深圳市亲邻科技有限公司 一种基于用户识别卡的移动终端权限交互系统和方法
CN116645751A (zh) * 2023-06-27 2023-08-25 深圳市亲邻科技有限公司 一种ic卡片信息变更方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6370249B1 (en) * 1997-07-25 2002-04-09 Entrust Technologies, Ltd. Method and apparatus for public key management
CN101488111A (zh) * 2009-02-17 2009-07-22 普天信息技术研究院有限公司 一种身份认证方法和系统
CN101527714A (zh) * 2008-12-31 2009-09-09 北京飞天诚信科技有限公司 制证的方法、装置及系统
CN102118385A (zh) * 2010-12-14 2011-07-06 北京握奇数据系统有限公司 安全域的管理方法和装置
CN102546172A (zh) * 2011-12-16 2012-07-04 北京握奇数据系统有限公司 智能卡的访问控制方法、智能卡、终端和系统

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101640591A (zh) * 2008-07-31 2010-02-03 西门子(中国)有限公司 一种认证方法
CN103580862A (zh) * 2012-07-27 2014-02-12 中国银联股份有限公司 用于ic卡和安全性信息交互终端的认证方法以及ic卡和安全性信息交互终端
CN103248490B (zh) * 2013-05-23 2016-08-10 天地融科技股份有限公司 一种备份电子签名令牌中信息的方法和系统
CN104410968A (zh) * 2014-11-18 2015-03-11 王家城 一种便携式uicc卡用户终端设备及其身份认证系统
CN104915689B (zh) * 2015-04-15 2017-10-31 四川量迅科技有限公司 一种智能卡信息处理方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6370249B1 (en) * 1997-07-25 2002-04-09 Entrust Technologies, Ltd. Method and apparatus for public key management
CN101527714A (zh) * 2008-12-31 2009-09-09 北京飞天诚信科技有限公司 制证的方法、装置及系统
CN101488111A (zh) * 2009-02-17 2009-07-22 普天信息技术研究院有限公司 一种身份认证方法和系统
CN102118385A (zh) * 2010-12-14 2011-07-06 北京握奇数据系统有限公司 安全域的管理方法和装置
CN102546172A (zh) * 2011-12-16 2012-07-04 北京握奇数据系统有限公司 智能卡的访问控制方法、智能卡、终端和系统

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111010687A (zh) * 2019-12-28 2020-04-14 飞天诚信科技股份有限公司 一种非接触卡与移动设备进行快速通信的方法及系统
CN111010687B (zh) * 2019-12-28 2024-02-13 飞天诚信科技股份有限公司 一种非接触卡与移动设备进行快速通信的方法及系统
CN112702733A (zh) * 2020-12-30 2021-04-23 飞天诚信科技股份有限公司 一种读卡终端及其工作方法
CN112702733B (zh) * 2020-12-30 2022-10-04 飞天诚信科技股份有限公司 一种读卡终端及其工作方法
CN114531679A (zh) * 2022-02-23 2022-05-24 深圳市亲邻科技有限公司 一种基于用户识别卡的移动终端权限交互系统和方法
CN116645751A (zh) * 2023-06-27 2023-08-25 深圳市亲邻科技有限公司 一种ic卡片信息变更方法及系统
CN116645751B (zh) * 2023-06-27 2023-11-24 深圳市亲邻科技有限公司 一种ic卡片信息变更方法及系统

Also Published As

Publication number Publication date
CN107423609B (zh) 2020-03-24
CN107423609A (zh) 2017-12-01

Similar Documents

Publication Publication Date Title
US11417159B2 (en) Methods and systems for controlling a smart lock
US11438169B2 (en) Time-bound secure access
US10742630B2 (en) Method and apparatus for making a decision on a card
US10490005B2 (en) Method and apparatus for making a decision on a card
US20180262891A1 (en) Electronic access control systems and methods using near-field communications, mobile devices and cloud computing
US8190908B2 (en) Secure data verification via biometric input
JP7194847B2 (ja) デジタルキー、端末デバイス、及び媒体の同一性を認証する方法
WO2018045917A1 (zh) 一种授权系统、方法及卡片
US20170289800A1 (en) System, methods and devices for secure data storage with wireless authentication
CN106537403A (zh) 用于从多个装置访问数据的系统
CN107408167A (zh) 执行用户无缝认证
WO2018045916A1 (zh) 一种授权方法、系统及卡片
KR102553145B1 (ko) 디지털 키를 처리 및 인증하는 보안 요소 및 그 동작 방법
US20240127648A1 (en) Blockchain-controlled and location-validated locking systems and methods
KR20240064635A (ko) 신뢰 수준 향상을 위한 센서 정보를 이용하는 장치 및 방법
US10148436B2 (en) Fingerprint revocation
WO2018045918A1 (zh) 一种授权方法及系统
WO2022193615A1 (zh) 数字钥匙删除方法、装置、设备、系统及存储介质
KR20180132811A (ko) 사용자와 모바일 단말기 및 추가 인스턴스 간의 보안 상호 작용을 위한 방법
CN113051614A (zh) 信息访问处理方法、装置、设备及系统
JP5133743B2 (ja) 認証システム、認証方法、リーダ/ライタおよびプログラム
WO2023178724A1 (zh) 智能门铃防盗版方法、系统、智能门铃及计算机可读存储介质
KR20230101344A (ko) 인증키를 사용하지 않는 근거리 통신 출입 인증 방법 및 시스템

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17848090

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17848090

Country of ref document: EP

Kind code of ref document: A1