IC card anti-copying method

By checking and local authentication of the fixed sector key and random sector key of the IC card, and online authentication under high security levels, the security risks caused by IC card replication are solved and a higher level of achievement security of access control system.

CN119484055APending Publication Date: 2025-02-18SHENZHEN KEMANDA INTELLIGENT MANAGEMENT SCI &TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411550890.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-31
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The encryption method of existing IC cards is simple and easy to be copied, resulting in unauthorized users being able to enter and exit at will, posing a security risk.

Method used

By obtaining the fixed sector key and random sector key of the IC card for verification, local authentication is performed. When the security level is high, send an online authentication request to the access control system to ensure that only a legal IC card can open the access control .

Benefits of technology

Effectively prevent IC card copying, improve the security of the access control system, and ensure that only authorized users can pass.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484055A_ABST
    Figure CN119484055A_ABST
Patent Text Reader

Abstract

The invention discloses an IC (integrated circuit) card anti-copying method, which is implemented by the following steps: acquiring IC card information of an IC card, the IC card information comprising a fixed sector secret key and a random sector secret key; verifying a fixed sector secret key and the random sector secret key; when the verification is successful, carrying out local authentication on the IC card; when the local authentication is successful, determining the security level of the access control equipment; when the security level is a medium / low security level, executing a door opening operation; and when the security level is a high security level, sending an online authentication request to an access control system so as to carry out online authentication on the IC card through the access control system, and when the online authentication is successful, executing a door opening operation. In the embodiment of the invention, verification is carried out by adopting the fixed sector secret key and the random sector secret key, the random secret key of each IC card is ensured to be different, the cracking difficulty can be increased, the accuracy of IC card abnormity identification is improved, the IC card is prevented from being copied, and the safety is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of access control technology, and in particular to an IC card anti-copying method. Background Art

[0002] IC card is another new type of information tool after magnetic card. It is widely used in finance, transportation, medical treatment, identity verification and other industries due to its small size, easy to carry, large storage capacity, high reliability, long service life, strong confidentiality and high security.

[0003] At present, the encryption method of IC card is relatively simple. With the popularization of NFC function in mobile phones, users can use some special APP software or card copying tools to copy IC cards, directly read the UID number of IC card and the technology of storing internal content, so as to open the access control, resulting in unauthorized users being able to enter and exit at will, which leads to certain security risks. Summary of the invention

[0004] Based on this, it is necessary to provide an IC card anti-copying method for the above technical problems to solve at least one problem existing in the above prior art.

[0005] In a first aspect, the embodiment of the present application is implemented as follows: an IC card anti-copying method is provided, which is applied to a door access control device, and the method includes:

[0006] Acquire IC card information of the IC card, wherein the IC card information includes a fixed sector key and a random sector key;

[0007] Verifying the fixed sector key and the random sector key;

[0008] When the verification is successful, the IC card is locally authenticated;

[0009] When the local authentication succeeds, determining the security level of the access control device;

[0010] When the security level is a medium / low security level, performing a door opening operation;

[0011] When the security level is a high security level, an online authentication request is sent to the access control system so that the IC card is authenticated online through the access control system. When the online authentication succeeds, the door opening operation is performed.

[0012] In one embodiment, the verifying the fixed sector key and the random sector key includes:

[0013] Matching the fixed sector key with the cached fixed sector key, and when the matches are consistent, the fixed sector key verification is successful;

[0014] When the fixed sector key verification succeeds, determining whether the preset random sector key verification condition is currently met;

[0015] If the preset random sector key verification condition is currently met, verify the random sector key;

[0016] The preset random sector key verification condition includes any one of checking once at a preset time interval, checking once every time a preset number of IC cards are detected to perform a card swiping operation, checking once every preset time, or real-time verification.

[0017] In one embodiment, sending an online authentication request to the access control system includes:

[0018] When the verification succeeds, the current IC card serial number is updated to a new IC card serial number, wherein the new IC card serial number is obtained by adding a first preset number to a preset position of the current IC card serial number, or by adding the current IC card serial number to a second preset number;

[0019] An online authentication request is sent to the access control system, wherein the online authentication request includes the new IC card serial number, so that the access control system performs online authentication based on the new IC card serial number.

[0020] In one embodiment, the security level of the access control device is a high security level, and after sending the new IC card serial number to the access control system, the method includes:

[0021] When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold, the online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or,

[0022] When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is less than the preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is less than a preset threshold, the online authentication success result sent by the access control system is obtained to perform the door opening operation; or,

[0023] When there is no cached IC card serial number matching the new IC card serial number and there is an abnormal IC card record, the online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or,

[0024] When there is no cached IC card serial number matching the new IC card serial number and there is no abnormal IC card record, the online authentication success result sent by the access control system is obtained to perform the door opening operation.

[0025] In one embodiment, the security level of the access control device is a medium / low security level, and after respectively verifying the fixed sector key and the random sector key, the steps include:

[0026] When the verification is successful, a first preset number is added to a preset position in the IC card serial number to obtain a new IC card serial number;

[0027] Generate an access control record, wherein the access control record includes the new IC card serial number;

[0028] The access control record is sent to the access control system so that the access control system can calculate the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number, or calculate the difference in numerical value between the new IC card serial number and the cached IC card serial number. When the difference in the number of characters is greater than / equal to the preset serial number interval, or the difference in numerical value is greater than / equal to the preset threshold, the IC card is treated as an abnormal IC card.

[0029] In one embodiment, before respectively verifying the fixed sector key and the random sector key, the steps include:

[0030] When a key master card is detected, the key information in the key master card is read;

[0031] If a key card needs to be added currently, the key information is cached;

[0032] If the key card needs to be deleted currently, the key information is matched with the cache key information, and when the matches are consistent, the cache key information that matches the key information is deleted.

[0033] In a second aspect, an IC card anti-copying method is provided, which is applied to an access control system, and the method comprises:

[0034] When the fixed sector key and the random sector key of the IC card are verified successfully and the local authentication of the IC card is successful, if the security level of the access control device is a high security level, an online authentication request sent by the access control device is obtained;

[0035] Based on the online authentication request, performing online authentication on the IC card;

[0036] When the online authentication succeeds, the authentication success result is sent to the access control device so that the access control device performs the door opening operation.

[0037] In one embodiment, the online authentication request includes a new IC card serial number, the new IC card serial number is obtained by adding a first preset number to a preset position in the current IC card serial number, or by adding the current IC card serial number to a second preset number, and the online authentication of the IC card based on the online authentication request includes:

[0038] Determine whether there is a cached IC card serial number corresponding to the new IC card serial number;

[0039] If there is a cached IC card serial number corresponding to the new IC card serial number, determine whether the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or determine whether the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold;

[0040] If the difference in the number of characters is less than the preset serial number interval or the difference in the value is less than the preset threshold, the online authentication is successful;

[0041] If the word count difference is greater than / equal to the preset serial number interval, or the numerical value difference is greater than / equal to the preset threshold, the online authentication fails.

[0042] In one embodiment, after determining whether there is a cached IC card serial number corresponding to the new IC card serial number, the method includes:

[0043] If there is no cached IC card serial number corresponding to the new IC card serial number, determining whether there is an IC card abnormality record for the IC card;

[0044] If there is an abnormal record of the IC card, the online authentication fails;

[0045] If there is no abnormal record of the IC card, the online authentication is successful.

[0046] In one embodiment, the security level of the access control device is a medium / low security level, and when the fixed sector key and the random sector key of the IC card are successfully verified and the local authentication of the IC card is successful, the following steps are performed:

[0047] Receiving an access control record sent by the access control device, wherein the access control record includes the new IC card serial number;

[0048] Determine whether there is a cached IC card serial number corresponding to the new IC card serial number;

[0049] If there is no cached IC card serial number corresponding to the new IC card serial number, cache the new IC card serial number;

[0050] If there is a cached IC card serial number corresponding to the new IC card serial number, the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to the preset serial number interval or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to the preset threshold, and there is no abnormal record of the IC card, then the IC card is regarded as an abnormal IC card; and / or

[0051] If there is a cached IC card serial number corresponding to the new IC card serial number, and the card swiping time of the cached IC card serial number is less than the card swiping time of the new IC card serial number, then the cached IC card serial number and the card swiping time of the cached IC card serial number are updated.

[0052] The IC card anti-copying method is implemented by: obtaining the IC card information of the IC card, the IC card information includes a fixed sector key and a random sector key; verifying the fixed sector key and the random sector key; when the verification is successful, locally authenticating the IC card; when the local authentication is successful, determining the security level of the access control device; when the security level is a medium / low security level, performing a door opening operation; when the security level is a high security level, sending an online authentication request to the access control system to perform online authentication on the IC card through the access control system, and when the online authentication is successful, performing a door opening operation. In the embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, which can increase the difficulty of cracking, and by updating the IC card serial number, calculating the difference between the serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormal identification can be improved to a certain extent, avoiding IC card duplication and improving security. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0054] Figure 1 This is a schematic diagram of an application environment of an IC card anti-copying method in an embodiment of the present application;

[0055] Figure 2 This is a schematic diagram of a process of an IC card anti-copying method in an embodiment of the present application. Figure 1 ;

[0056] Figure 3This is a schematic diagram of a process of an IC card anti-copying method in an embodiment of the present application. Figure 2 ;

[0057] Figure 4 This is a schematic diagram of a process of an IC card anti-copying method in an embodiment of the present application. Figure 3 ;

[0058] Figure 5 This is a schematic diagram of a process of an IC card anti-copying method in an embodiment of the present application. Figure 4 ;

[0059] Figure 6 This is a schematic diagram of a process of an IC card anti-copying method in an embodiment of the present application. Figure 5 ;

[0060] Figure 7 This is a schematic diagram of a process of an IC card anti-copying method in an embodiment of the present application. Figure 6 ;

[0061] Figure 8 This is a schematic diagram of the structure of an IC card anti-copying device in an embodiment of the present application. Figure 1 ;

[0062] Fig. 9 This is a schematic diagram of the structure of an IC card anti-copying device in an embodiment of the present application. Figure 2 ;

[0063] Fig.10 It is a schematic diagram of a computer device in one embodiment of the present application. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0065] The IC card anti-copying method provided in this embodiment can be applied to Figure 1 In the application environment, the access control device and the access control system can be connected in communication, and the access control system is connected in communication with the database. The database stores IC card abnormality records, IC card serial number, card swipe time, card swipe times, card swipe frequency and other information. The access control system can search for corresponding data from the database to perform online authentication and abnormal card determination. The access control system can be set locally or in the cloud, and can be implemented with an independent server or a server cluster composed of multiple servers.

[0066] In an embodiment of the present application, when a user swipes an IC card, the fixed area key and the random area key are read by the access control device, and the fixed area key and the random area key are checked. After successful verification, the IC card can be locally authenticated. When the security level of the access control device is medium / low, after the local authentication is passed, the door opening operation is performed to release the user. If the security level of the access control device is high, after the local authentication is passed, a new IC card serial number can be generated and reported to the access control system. The access control system calculates whether the difference between the number of characters in the new IC card serial number and the number of characters in the IC card serial number cached in the database is less than or equal to the preset serial number interval. If so, the online authentication is successful, otherwise, the online authentication fails.

[0067] Embodiment 1

[0068] In one embodiment, if Figure 2 As shown, a method for preventing IC card from being copied is provided, and the method is applied in Figure 1 The access control device in the example is used as an example to illustrate the following steps:

[0069] In step S110, the IC card information of the IC card is obtained, wherein the IC card information includes a fixed sector key and a random sector key;

[0070] In the embodiment of the present application, the IC card may include a contact IC card and a contactless IC card. Taking the contactless IC card as an example, such as the M1 card, it can be divided into 16 sectors, each sector can be divided into 4 blocks, each block has 16 bytes, and the block is used as the access unit. Block 0, block 1, and block 2 of each sector are databases for storing data, and block 3 of each sector is a control block for access control. Among them, the sector may include a mother sector.

[0071] It can be understood that the fixed sector key can be stored in the mother sector. Optionally, the fixed area key can be written into the mother sector KeyA through the IC card issuance software. Other sectors can call the key management system SDK to generate random sector keys and write them into KeyA and KeyB of block 3. The random sector key is at least one, that is, at least one other sector is opened.

[0072] It should be noted that each of the other sectors that are opened may correspond to a random sector key, so the more other sectors that are opened, that is, the more random sector keys there are, the greater the complexity of cracking the IC card, and the better its security.

[0073] In the embodiment of the present application, the access control device can also read the IC card number, which can be used to uniquely identify the same IC card and distinguish the IC card from other IC cards. The IC card serial number can be automatically generated when the IC card is swiped, and it can change dynamically as the number of swipes increases, that is, it can be updated every time the card is swiped.

[0074] In step S120, the fixed sector key and the random sector key are verified;

[0075] In the embodiment of the present application, after reading the fixed sector key and random sector key of the IC card, the access control device can match the fixed sector key with the pre-cached fixed sector key. If the match is consistent, the verification is successful. For the random sector key, it can be decrypted by a tool corresponding to the random sector key generation tool. If the decryption is successful, it means that the random sector key verification is successful.

[0076] It should be noted that the fixed sector key can be checked first, and when the check is successful, the random sector key can be checked, or the random sector key can be checked first and then the fixed sector key, or the fixed sector key and the random sector key can be checked separately at the same time.

[0077] In the embodiment of the present application, since the random sector key needs to be checked for a relatively cumbersome decryption operation, and the more random sector keys there are, the longer it takes, in order to improve the efficiency of access control communication, the checking conditions of the random sector key can be set, that is, there is no need to check the random sector key for each IC card swiped. Optionally, it can be set to check the random sector key once or multiple times at each preset interval, or once or multiple times for each predicted number of card swipes, such as 5 times, or once or multiple times for each scheduled time every day, such as 9 o'clock in the morning, etc.

[0078] In step S130, when the verification is successful, the IC card is locally authenticated;

[0079] In the embodiment of the present application, after the fixed sector key and random sector key of the IC card are successfully verified, the access control device can query the communication authority, cardholder, card holding time and other information of the IC card according to the read IC card ID, so as to perform local authentication on the IC card, for example, to determine whether the IC card has communication authority, whether the IC card is legal, whether it has expired, whether there is abnormal access record, etc. If it has access authority, has not expired, and has no abnormal access record, then the local authentication is successful and subsequent operations can be performed. If any of them does not meet the requirements, the local authentication fails and cannot be released.

[0080] In step S140, when the local authentication is successful, the security level of the access control device is determined;

[0081] In the embodiment of the present application, the security level of the access control device is configured through the access control system according to the location and function of the access control device. The security level may include high level, medium level and low level. For example, for places with a high confidentiality level, such as the security level of the access control device of the database, a high level can be set; while the security level of the access control device at the gate can be set to a low level; and the access control level of the office can be set to a medium level.

[0082] It should be noted that different levels of security have different requirements for access rights, so the authentication requirements and authentication methods for IC cards may be different.

[0083] In step S150, when the security level is a medium / low security level, a door opening operation is performed;

[0084] In the embodiment of the present application, for low-level and medium-level access control devices, only local authentication is required. Once the authentication is passed, the user can be released. At this time, there is no need for the access control system to perform online authentication again.

[0085] In step S160, when the security level is a high security level, an online authentication request is sent to the access control system so as to perform online authentication on the IC card through the access control system. When the online authentication succeeds, the door opening operation is performed.

[0086] In the embodiment of the present application, for high-level access control equipment, since it has high requirements for access authority, after passing the local authentication, it is also necessary to perform online authentication through the access control system. Only after the online authentication is passed can the user be released. By raising the authentication requirements for IC cards, unauthorized users or users holding abnormal cards are prevented from passing, thereby reducing security risks.

[0087] In an embodiment of the present application, an IC card anti-copying method is provided, comprising: obtaining IC card information of an IC card, wherein the IC card information includes a fixed sector key and a random sector key; verifying the fixed sector key and the random sector key; when the verification is successful, performing local authentication on the IC card; when the local authentication is successful, determining the security level of the access control device; when the security level is a medium / low security level, performing a door opening operation; when the security level is a high security level, sending an online authentication request to the access control system to perform online authentication on the IC card through the access control system, and when the online authentication is successful, performing a door opening operation. In an embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, which can increase the difficulty of cracking, and by updating the IC card serial number, calculating the difference between the new IC card serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormal identification can be improved to a certain extent, avoiding IC card duplication and improving security.

[0088] See also Figure 3 In one embodiment of the present application, the fixed sector key and the random sector key are verified, including:

[0089] In step S210, the fixed sector key is matched with the cached fixed sector key, and when the match is consistent, the fixed sector key verification is successful;

[0090] In step S220, when the fixed sector key verification succeeds, it is determined whether the preset random sector key verification condition is currently met;

[0091] In step S230, if yes, the random sector key is verified;

[0092] The preset random sector key verification conditions include any one of checking once at a preset time interval, checking once every time a preset IC card is detected to perform a card swiping operation, checking once every preset time, or real-time verification.

[0093] Optionally, the IC card issuing software can write the fixed sector key and the sector number to the key master card. When issuing an encrypted user card, the key can be written into the master sector keyA of the encrypted user card, and the key management system SDK can be called to generate a random sector key for the activated sector number and write it into keyA and keyB of the corresponding sector number. When the user uses the user card to swipe the card, the access control device can read the user card information of the swipe operation, which may specifically include the fixed sector key and the random sector key. For the fixed sector key, it can be matched with the pre-cached fixed sector key. If the match is consistent, the verification is successful. For the random sector key, since the number of sectors opened in different user cards is different, it takes a lot of time to decrypt the random sector key. In order to improve the traffic efficiency, the random sector key verification conditions can be set, for example, once every preset time interval, once every time a preset IC card is detected to perform a swipe operation, once every preset time, or any one of real-time verification. Take the example of checking once at a preset time interval, for example, checking once every 10 minutes, or you can determine whether the difference between the time of this card swiping and the time of the last random sector key check is a preset threshold, such as 10 minutes. If so, perform a random sector key check on the user card that is swiped this time.

[0094] It can be understood that when checking the random sector key, a preset decryption tool can be used to decrypt it. If the decryption is successful, it means that the verification is successful, otherwise, the verification fails.

[0095] In one embodiment of the present application, sending an online authentication request to a door access control system includes:

[0096] When the verification succeeds, the current IC card serial number is updated to a new IC card serial number, wherein the new IC card serial number is obtained by adding a first preset number to a preset position of the current IC card serial number, or by adding the current IC card serial number to a second preset number;

[0097] An online authentication request is sent to the access control system, wherein the online authentication request includes the new IC card serial number, so that the access control system performs online authentication based on the new IC card serial number.

[0098] Optionally, the access control device can update the current IC card serial number each time the IC card is swiped. That is, after the access control device successfully verifies the fixed sector key and the random sector key of the IC card, it can add a preset number to the preset position in the IC card serial number, for example, add 1 to the end of the IC card serial number, such as the IC card serial number is YH1111, and the new IC card serial number is YH11111. Alternatively, a preset number can be added to the IC card serial number, for example, add 1, the current IC card serial number is 3, and the new IC card serial number can be 4. If the security level of the access control device is high, the new IC card serial number can be reported to the access control system, so that the new IC card serial number can be used for online authentication through the access control system.

[0099] Optionally, the IC card serial number can also be updated through the access control system. For example, when the card is swiped, the access control device obtains the current serial number of the IC card and reports it to the access control system. The access control system compares the currently cached IC card serial number with the IC card serial number reported by the access control device. If the comparison is consistent, the authentication is successful, and the IC card serial number is updated and sent to the access control device, and the serial number of the IC card is updated through the access control device.

[0100] In an embodiment of the present application, the security level of the access control device is a high security level. After the new IC card serial number is sent to the access control system, the following steps are included:

[0101] When there is a cached IC card serial number matching the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold, an online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or;

[0102] When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is less than a preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is less than a preset threshold, then obtaining an online authentication success result sent by the access control system to perform a door opening operation; or

[0103] When there is no cached IC card serial number matching the new IC card serial number and there is an abnormal IC card record, an online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or

[0104] When there is no cached IC card serial number matching the new IC card serial number and there is no abnormal IC card record, the online authentication success result sent by the access control system is obtained to perform the door opening operation.

[0105] Optionally, the access control device can upload the IC card number at the same time. The access control system queries whether the corresponding IC card serial number is stored in the data based on the IC card number uploaded by the access control device. If so, the difference between the number of words in the new IC card serial number and the number of words in the cached IC card serial number is calculated. For example, the new IC card serial number is YH111111, with 8 words, and the cached IC card serial number is YH1111, with 6 words. The difference is 2. If the preset serial number interval is 1, 2>1, and the authentication fails. The access control system can send an online authentication failure result to the access control device to prohibit the door opening operation. If the preset serial number interval is 3, 2≤3, and the authentication is successful. The access control system can send an online authentication success result to the access control device to execute the door opening operation. Or, the cached IC card serial number is 3, the new IC card serial number is 5, 5-3=2, if the preset threshold is 1, then 2>1, at this time the authentication fails, the access control system can send the online authentication failure result to the access control device to prohibit the door opening operation. If the preset threshold is 3, then 2≤3, at this time the authentication is successful, the access control system can send the online authentication success result to the access control device to perform the door opening operation.

[0106] In addition, if there is no cached IC card serial number, the access control system can query the database according to the IC card number to determine whether there is an abnormal IC card record for the IC card. If there is an abnormal record, the access control system can send an online authentication failure result to the access control device to prohibit the door opening operation. If there is no abnormal IC card record, the online authentication success result sent by the access control system is obtained to perform the door opening operation.

[0107] It can be understood that the abnormal IC card record can be added to the abnormal IC card record when the IC card local authentication fails, online authentication fails, abnormal passage, etc. The abnormal IC card record can include information such as abnormal time, abnormal reason, abnormal card number, etc.

[0108] In an embodiment of the present application, the security level of the access control device is a medium / low security level, and after verifying the fixed sector key and the random sector key respectively, the following steps are included:

[0109] When the verification is successful, a first preset number is added to a preset position in the IC card serial number or the current IC card serial number is added to a second preset number to obtain a new IC card serial number;

[0110] Generate an access control record, wherein the access control record includes the new IC card serial number;

[0111] The access control record is sent to the access control system so that the access control system can calculate the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number, or calculate the difference in numerical value between the new IC card serial number and the cached IC card serial number. When the difference in the number of characters is greater than / equal to the preset serial number interval, or the difference in numerical value is greater than / equal to the preset threshold, the IC card is treated as an abnormal IC card.

[0112] Optionally, after the access control device successfully verifies the fixed sector key and random sector key of the IC card, it can add a preset number to the preset position in the IC card serial number, for example, add 1 to the end of the IC card serial number, such as the IC card serial number is YH0011, and the new IC card serial number is YH00111. If the security level of the access control device is medium / low, the user can be directly released and an access control record can be generated, which can include the new IC card serial number, IC card number, etc. The access control device can report the access control record to the access control system in real time or at a fixed time. After obtaining the access control record, the access control system can query all the new IC card serial numbers and IC card numbers recorded in the access control record to see if there is a matching cached IC card serial number, and calculate the difference between the number of words in the new IC card serial number and the number of words in the cached IC card serial number. For example, if the new IC card serial number is YH111111, the number of words is 8, and the cached IC card serial number is YH11111, the number of words is 6, then the difference is 2. If the preset serial number interval is 1, then 2>1, which means that the IC card is abnormal and can be added to the abnormal IC card record. If it already exists in the abnormal IC card record, it does not need to be added to the abnormal IC card record. If the preset serial number interval is 3, then 2≤3, and the subsequent process will not be performed. Or, the cached IC card serial number is 3, the new IC card serial number is 5, 5-3=2, if the preset threshold is 1, then 2>1, this means that the IC card is abnormal, it can be added to the abnormal IC card record, if it already exists in the abnormal IC card record, then it does not need to be added to the abnormal IC card record. If the preset threshold is 3, then 2≤3, then the subsequent process will not be carried out.

[0113] It should be noted that the abnormal IC card information recorded in the abnormal IC card record can be notified to the system administrator or property personnel for analysis and the abnormal IC card can be frozen and processed.

[0114] In addition, if the cached IC card serial number is not found, the new IC card serial number received this time can be cached. That is, no matter whether the new IC card serial number starts from 1 or not, it is considered valid.

[0115] Optionally, if there is a cached IC card serial number, the card swiping time of the cached IC card serial number can also be compared with the card swiping time of the IC card reported by the current access control device. If the card swiping time of the current cached IC card serial number is greater than / equal to the card swiping time of the IC card reported by the current access control device, there is no need to update the locally cached IC card serial number. If it is less than the IC card swiping time reported by the current access control device, the locally cached card swiping time and IC card serial number are updated.

[0116] See also Figure 4 In one embodiment of the present application, before verifying the fixed sector key and the random sector key respectively, the following steps are included:

[0117] In step S310, when the key master card is detected, the key information in the key master card is read;

[0118] In step S320, if a key card needs to be added currently, the key information is cached;

[0119] In step S320, if the key card needs to be deleted currently, the key information is matched with the cached key information, and when the match is consistent, the cached key information that matches the key information is deleted.

[0120] Optionally, when a card swipe operation is detected, the access control device can determine whether the IC card is a key master card. If so, it is determined that the purpose of this card swipe is to add a key card, and the fixed area key stored in the key master card can be read. If the fixed area key is not cached, the fixed area key is cached. If the purpose of this card swipe is to delete the key card, the fixed area key can be compared with the cached fixed area key, and the cached fixed area key that is consistent with the comparison can be deleted. That is, the access control system can add a new key or delete the added key.

[0121] In the embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, thereby increasing the difficulty of cracking. In addition, by updating the IC card serial number, calculating the difference between the new IC card serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormality identification can be improved to a certain extent, thereby preventing the IC card from being copied and improving security.

[0122] Embodiment 2

[0123] In one embodiment, if Figure 5 As shown, a method for preventing IC card from being copied is provided, and the method is applied in Figure 1 The access control system in the example is used to illustrate the following steps:

[0124] In step S410, when the fixed sector key and the random sector key of the IC card are successfully verified and the local authentication of the IC card is successful, if the security level of the access control device is a high security level, an online authentication request sent by the access control device is obtained;

[0125] In the embodiment of the present application, the IC card may include a contact IC card and a contactless IC card. Taking the contactless IC card as an example, such as the M1 card, it can be divided into 16 sectors, each sector can be divided into 4 blocks, each block has 16 bytes, and the block is the access unit. Block 0, block 1, and block 2 of each sector are databases for storing data, and block 3 of each sector is a control block for access control. The sector may include a mother sector. It can be understood that the fixed sector key can be stored in the mother sector. Optionally, the fixed area key can be written into the mother sector KeyA through the IC card issuance software, and other sectors can call the key management system SDK to generate a random sector key and write it into KeyA and KeyB of block 3. The random sector key is at least one, that is, at least one other sector is opened.

[0126] It should be noted that a random sector key can be written into each other sector that is opened. Therefore, the more other sectors that are opened, that is, the more random sector keys there are, the greater the complexity of cracking the IC card and the better its security.

[0127] In the embodiment of the present application, after reading the fixed sector key and random sector key of the IC card, the access control device can match the fixed sector key with the pre-cached fixed sector key. If the match is consistent, the verification is successful. For the random sector key, it can be decrypted by a tool corresponding to the random sector key generation tool. If the decryption is successful, it means that the random sector key verification is successful.

[0128] Furthermore, after the fixed sector key and random sector key of the IC card are successfully verified, the access control device can query the communication authority, cardholder, card holding time and other information of the IC card based on the read IC card number, so as to perform local authentication on the IC card, for example, to determine whether the IC card has communication authority, whether the IC card is legal, whether it has expired, whether there is any abnormal access record, etc. If it has access authority, has not expired, and has no abnormal access record, the local authentication is successful. If the local authentication of the access control device is successful, and the access control device is of high security level, the online authentication request sent by the access control device can be obtained.

[0129] In step S420, based on the online authentication request, the IC card is authenticated online;

[0130] Optionally, after obtaining the current IC card serial number, the access control device can add a preset number to the preset position of the current IC card serial number, for example, add 1 to the end of the IC card serial number, such as if the IC card serial number is YH11111, then the new IC card serial number can be YH111111. Alternatively, add a preset number to the current IC card serial number, such as 1, for example, if the current IC card serial number is 3, then the new IC card serial number is 4. After the access control system obtains the new IC card serial number, it can query the cached IC card serial number and calculate the difference with the new IC card serial number. If the difference is less than the preset serial number interval or less than the preset threshold, the authentication is successful, otherwise the authentication fails.

[0131] In step S430, when the online authentication succeeds, an authentication success result is sent to the access control device so that the access control device performs a door opening operation.

[0132] In an embodiment of the present application, an IC card anti-copying method is provided, including: when the fixed sector key and the random sector key of the IC card are successfully verified and the local authentication of the IC card serial number is successful, obtaining a new IC card serial number sent by the access control device, the new IC card serial number being obtained by adding a first preset number to a preset position in the IC card serial number; determining whether there is a cached IC card serial number corresponding to the new IC card serial number; if there is a cached IC card serial number corresponding to the new IC card serial number, determining whether the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval; if the difference is greater than the preset serial number interval, sending an online authentication failure result to the access control device, if not, sending an online authentication success result to the access control device. In the embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, thereby increasing the difficulty of cracking. In addition, by updating the IC card serial number, calculating the difference between the new IC card serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormality identification can be improved to a certain extent, thereby preventing the IC card from being copied and improving security.

[0133] In one embodiment of the present application, the online authentication request includes a new IC card serial number, the new IC card serial number is obtained by adding a first preset number to a preset position in the current IC card serial number, or by adding the current IC card serial number to a second preset number, and the online authentication of the IC card based on the online authentication request includes:

[0134] In step S510, it is determined whether there is a cached IC card serial number corresponding to the new IC card serial number;

[0135] In step S520, if there is a cached IC card serial number corresponding to the new IC card serial number, determine whether the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or determine whether the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold;

[0136] In step S530, if the difference in the number of characters is less than the preset serial number interval or the difference in the numerical value is less than the preset threshold, the online authentication is successful;

[0137] In step S540, if the word number difference is greater than / equal to the preset serial number interval, or the numerical value difference is greater than / equal to the preset threshold, the online authentication fails.

[0138] Specifically, the access control device can upload the IC card number at the same time, and the IC card number is used to uniquely identify the same IC card. Based on the IC card number, the access control system can query whether there is a cached IC card serial number corresponding to the IC card in the database. If there is a cached IC card serial number corresponding to the new IC card serial number, it can be calculated whether the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to the preset serial number interval. For example, the new IC card serial number is YH111111, the number of characters is 8, and the cached IC card serial number is YH1111, the number of characters is 6, then the difference is 2. If the preset serial number interval is 1, then 2>1, at this time the authentication fails, and the access control system can send the authentication failure result to the access control device to prohibit the door opening operation. If the preset serial number interval is 3, then 2≤3, at this time the authentication is successful, and the access control system can send the authentication success result to the access control device to perform the door opening operation. Or, the cached IC card serial number is 3, the new IC card serial number is 5, 5-3=2, if the preset threshold is 1, then 2>1, at this time the authentication fails, the access control system can send the online authentication failure result to the access control device to prohibit the door opening operation. If the preset threshold is 3, then 2≤3, at this time the authentication is successful, the access control system can send the online authentication success result to the access control device to perform the door opening operation.

[0139] See also Figure 6 In one embodiment of the present application, after determining whether there is a cached IC card serial number corresponding to the new IC card serial number, the method includes:

[0140] In step S610, if there is no cached IC card serial number corresponding to the new IC card serial number, it is determined whether there is an IC card abnormality record on the IC card;

[0141] In step S620, if there is an abnormal record of the IC card, the online authentication fails;

[0142] In step S630, if there is no abnormal record of the IC card, the online authentication is successful.

[0143] Optionally, if there is no cached IC card serial number, the access control system can query the database according to the IC card number to determine whether there is an abnormal IC card record for the IC card. If there is an abnormal IC card record, the access control system can send an authentication failure result to the access control device to prohibit the door opening operation. If there is no abnormal IC card record, the authentication success result sent by the access control system is obtained to perform the door opening operation.

[0144] It can be understood that the abnormal IC card record can be added to the abnormal IC card record when the IC card local authentication fails, online authentication fails, abnormal passage, etc. The abnormal IC card record can include information such as abnormal time, abnormal reason, abnormal card number, etc.

[0145] See also Figure 7 In one embodiment of the present application, the security level of the access control device is medium / low security level. When the fixed sector key and the random sector key of the IC card are successfully verified and the local authentication of the IC card is successful, the following steps are included:

[0146] In step S710, receiving the access control record sent by the access control device, the access control record including the new IC card serial number;

[0147] In step S720, it is determined whether there is a cached IC card serial number corresponding to the new IC card serial number;

[0148] In step S730, if there is no cached IC card serial number corresponding to the new IC card serial number, the new IC card serial number is cached;

[0149] In step S740, if there is a cached IC card serial number corresponding to the new IC card serial number, the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to the preset serial number interval or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to the preset threshold, and there is no abnormal record of the IC card, then the IC card is treated as an abnormal IC card; and / or

[0150] In step S750, if there is a cached IC card serial number corresponding to the new IC card serial number, and the card swiping time of the cached IC card serial number is less than the card swiping time of the new IC card serial number, the card swiping time of the cached IC card serial number is updated to the card swiping time of the new IC card serial number.

[0151] Optionally, after the access control device successfully verifies the fixed sector key and the random sector key of the IC card, it can add a preset number to the preset position in the IC card serial number, for example, add 1 to the end of the IC card serial number, such as the IC card serial number is YH1111, and the new IC card serial number is YH11111. If the security level of the access control device is medium / low, the user can be directly released and an access control record can be generated, which can include the new IC card serial number, IC card number, etc. The access control device can report the access control record to the access control system in real time or at a fixed time. After obtaining the access control record, the access control system can query the cached IC card serial number for all new IC card serial numbers and IC card numbers recorded in the access control record, and calculate the difference between the number of words in the new IC card serial number and the number of words in the cached IC card serial number. For example, if the new IC card serial number is YH111111, the number of words is 8, and the cached IC card serial number is YH11111, the number of words is 6, then the difference is 2. If the preset serial number interval is 1, then 2>1, which means that the IC card is abnormal and can be added to the abnormal IC card record. If it already exists in the abnormal IC card record, it does not need to be added to the abnormal IC card record. If the preset serial number interval is 3, then 2≤3, and the subsequent process will not be performed. Or, the cached IC card serial number is 3, the new IC card serial number is 5, 5-3=2, if the preset threshold is 1, then 2>1, this means that the IC card is abnormal, it can be added to the abnormal IC card record, if it already exists in the abnormal IC card record, then it does not need to be added to the abnormal IC card record. If the preset threshold is 3, then 2≤3, then the subsequent process is not performed.

[0152] It should be noted that the abnormal IC card information recorded in the abnormal IC card record can be notified to the system administrator or property personnel for analysis and the abnormal IC card can be frozen and processed.

[0153] In addition, if the cached IC card serial number is not found, the new IC card serial number received this time can be cached. That is, no matter whether the new IC card serial number starts from 1 or not, it is considered valid.

[0154] Optionally, if there is a cached IC card serial number, the card swiping time of the cached IC card serial number can also be compared with the card swiping time of the IC card reported by the current access control device. If the card swiping time of the current cached IC card serial number is greater than / equal to the card swiping time of the IC card reported by the current access control device, there is no need to update the locally cached IC card serial number. If it is less than the IC card swiping time reported by the current access control device, the locally cached card swiping time and IC card serial number are updated.

[0155] Optionally, if the new IC card serial number is an abnormal serial number, for example, there are abnormal numbers, spaces, etc., the IC card can be treated as an abnormal IC card and added to the IC card abnormality record.

[0156] In the embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, thereby increasing the difficulty of cracking. In addition, by updating the IC card serial number, calculating the difference between the new IC card serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormality identification can be improved to a certain extent, thereby preventing the IC card from being copied and improving security.

[0157] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0158] Embodiment 3

[0159] In one embodiment, a device for implementing anti-copying of an IC card is provided, and the device for implementing anti-copying of an IC card corresponds one-to-one with the anti-copying method of the IC card in the first embodiment. Figure 8 As shown, the IC card anti-copying implementation device includes an IC card information acquisition unit 101, a key verification unit 102, a local authentication unit 103, a security level determination unit 104, a first door opening operation execution unit 105 and a second door opening execution unit 106. The functional modules are described in detail as follows:

[0160] An IC card information acquisition unit 101 is configured to acquire IC card information of an IC card, wherein the IC card information includes a fixed sector key and a random sector key;

[0161] The key verification unit 102 is used to verify the fixed sector key and the random sector key;

[0162] A local authentication unit 103, used for performing local authentication on the IC card when the verification succeeds;

[0163] A security level determination unit 104, configured to determine the security level of the access control device when the local authentication succeeds;

[0164] A first door opening operation execution unit 105, used to execute a door opening operation when the security level is a medium / low security level;

[0165] The second door opening operation execution unit 106 is used to send an online authentication request to the access control system when the security level is a high security level, so as to perform online authentication on the IC card through the access control system, and execute the door opening operation when the online authentication is successful.

[0166] In one embodiment of the present application, the key verification unit 102 is used to:

[0167] Match the fixed sector key with the cached fixed sector key. If they match, the fixed sector key verification is successful.

[0168] When the fixed sector key verification succeeds, determine whether the preset random sector key verification condition is met;

[0169] If yes, verify the random sector key;

[0170] The preset random sector key verification conditions include any one of checking once at a preset time interval, checking once every time a preset IC card is detected to perform a card swiping operation, checking once every preset time, or real-time verification.

[0171] In one embodiment of the present application, the device further includes an online authentication result acquisition unit, which is used to:

[0172] When the verification succeeds, the current IC card serial number is updated to a new IC card serial number, wherein the new IC card serial number is obtained by adding a first preset number to a preset position of the current IC card serial number, or by adding the current IC card serial number to a second preset number;

[0173] An online authentication request is sent to the access control system, wherein the online authentication request includes the new IC card serial number, so that the access control system performs online authentication based on the new IC card serial number.

[0174] In one embodiment of the present application, the access control device is of high security level, and the online authentication result acquisition unit is further used to:

[0175] When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold, an online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or,

[0176] When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is less than the preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is less than a preset threshold, then the online authentication success result sent by the access control system is obtained to perform the door opening operation; or,

[0177] When there is no cached IC card serial number matching the new IC card serial number and there is an abnormal IC card record, the online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or,

[0178] When there is no cached IC card serial number matching the new IC card serial number and there is no abnormal IC card record, the online authentication success result sent by the access control system is obtained to perform the door opening operation.

[0179] In one embodiment of the present application, the device further includes an abnormal card determining unit, which is used to:

[0180] When the verification is successful, a first preset number is added to a preset position in the IC card serial number or the current IC card serial number is added to a second preset number to obtain a new IC card serial number;

[0181] Generate an access control record, wherein the access control record includes the new IC card serial number;

[0182] The access control record is sent to the access control system so that the access control system can calculate the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number, or calculate the difference in numerical value between the new IC card serial number and the cached IC card serial number. When the difference in the number of characters is greater than / equal to the preset serial number interval, or the difference in numerical value is greater than / equal to the preset threshold, the IC card is treated as an abnormal IC card.

[0183] In one embodiment of the present application, the device further includes a key processing unit, which is used to:

[0184] When the key master card is detected, the key information in the key master card is read;

[0185] If a key card needs to be added, the key information will be cached;

[0186] If the key card needs to be deleted at present, the key information is matched with the cached key information. When the match is consistent, the cached key information that matches the key information is deleted.

[0187] In the embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, thereby increasing the difficulty of cracking. In addition, by updating the IC card serial number, calculating the difference between the new IC card serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormality identification can be improved to a certain extent, thereby preventing the IC card from being copied and improving security.

[0188] The specific definition of the IC card anti-copying implementation device can be found in the above definition of the IC card anti-copying method, which will not be repeated here. Each module in the above IC card anti-copying implementation device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0189] Embodiment 4:

[0190] In one embodiment, an IC card anti-copying implementation device is provided, which is applied to an access control system. The IC card anti-copying implementation device corresponds to the IC card anti-copying method in the above-mentioned embodiment 2. Fig. 9 As shown, the IC card anti-copying implementation device includes a new IC card serial number acquisition unit 201, a cached IC card serial number determination unit 202, an online authentication unit 203, a first online authentication result sending unit 204 and a second online authentication result sending unit 205. The functional modules are described in detail as follows:

[0191] The online authentication request acquisition unit 201 is used to acquire the online authentication request sent by the access control device when the fixed sector key and the random sector key of the IC card are successfully verified and the local authentication of the IC card is successful, if the security level of the access control device is a high security level;

[0192] An online authentication unit 202, configured to perform online authentication on the IC card based on the online authentication request;

[0193] The authentication result sending unit 203 is used to send the authentication success result to the access control device when the online authentication succeeds, so that the access control device performs the door opening operation.

[0194] In one embodiment of the present application, the online authentication request includes a new IC card serial number, and the new IC card serial number is obtained by adding a first preset number to a preset position in the current IC card serial number, or by adding the current IC card serial number to a second preset number. The online authentication unit 202 includes:

[0195] Determine whether there is a cached IC card serial number corresponding to the new IC card serial number;

[0196] If there is a cached IC card serial number corresponding to the new IC card serial number, determine whether the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or determine whether the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold;

[0197] If the difference in the number of characters is less than the preset serial number interval or the difference in the value is less than the preset threshold, the online authentication is successful;

[0198] If the word count difference is greater than / equal to the preset serial number interval, or the numerical value difference is greater than / equal to the preset threshold, the online authentication fails.

[0199] In one embodiment of the present application, the online authentication unit 203 is further used to:

[0200] If there is no cached IC card serial number corresponding to the new IC card serial number, determine whether there is an IC card abnormality record on the IC card;

[0201] If there is an abnormal record of IC card, online authentication fails;

[0202] If there is no abnormal record of IC card, the online authentication is successful.

[0203] In one embodiment of the present application, the security level of the access control device is medium / low level, and the device further includes an abnormal card determination unit for:

[0204] Receive the access control record sent by the access control device, the access control record including the new IC card serial number;

[0205] Determine whether there is a cached IC card serial number corresponding to the new IC card serial number;

[0206] If there is no cached IC card serial number corresponding to the new IC card serial number, the new IC card serial number is cached;

[0207] If there is a cached IC card serial number corresponding to the new IC card serial number, the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to the preset serial number interval or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to the preset threshold, and there is no abnormal record of the IC card, then the IC card is regarded as an abnormal IC card; and / or

[0208] If there is a cached IC card serial number corresponding to the new IC card serial number, and the card swiping time of the cached IC card serial number is less than or equal to the card swiping time of the new IC card serial number, the card swiping time of the cached IC card serial number is updated to the card swiping time of the new IC card serial number.

[0209] In the embodiment of the present application, fixed sector keys and random sector keys are used for verification, which ensures that the random keys of each IC card are different, which can increase the difficulty of cracking. By updating the IC card serial number, calculating the difference between the new IC card serial number and the cached serial number, and comparing it with the preset serial number interval, the accuracy of IC card abnormality identification can be improved to a certain extent, avoiding IC card duplication and improving security.

[0210] The specific definition of the IC card anti-copying implementation device can be found in the above definition of the IC card anti-copying method, which will not be repeated here. Each module in the above IC card anti-copying implementation device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0211] In one embodiment, a computer device is provided. The computer device may be a terminal device, and its internal structure diagram may be as follows: Fig.10 As shown. The computer device includes a processor, a memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium. The readable storage medium stores computer-readable instructions. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer-readable instructions are executed by the processor, an IC card anti-copying method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0212] In an embodiment of the present application, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the steps of the IC card anti-copying method described above are implemented.

[0213] In an embodiment of the application, a readable storage medium is provided, which stores computer-readable instructions. When the computer-readable instructions are executed by a processor, the steps of the IC card anti-copying method described above are implemented.

[0214] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they may include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0215] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0216] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. An IC card anti-copying method, characterized in that: Applied to access control equipment, the method comprises: Acquire IC card information of the IC card, wherein the IC card information includes a fixed sector key and a random sector key; Verifying the fixed sector key and the random sector key; When the verification is successful, the IC card is locally authenticated; When the local authentication succeeds, determining the security level of the access control device; When the security level is a medium / low security level, performing a door opening operation; When the security level is a high security level, an online authentication request is sent to the access control system so that the IC card is authenticated online through the access control system. When the online authentication succeeds, the door opening operation is performed.

2. The IC card anti-copying method according to claim 1, characterized in that: The verifying the fixed sector key and the random sector key includes: Matching the fixed sector key with the cached fixed sector key, and when the matches are consistent, the fixed sector key verification is successful; When the fixed sector key verification succeeds, determining whether the preset random sector key verification condition is currently met; If the preset random sector key verification condition is currently met, verifying the random sector key; The preset random sector key verification condition includes any one of checking once at a preset time interval, checking once every time a preset number of IC cards are detected to perform a card swiping operation, checking once every preset time, or real-time verification.

3. The IC card anti-copying method according to claim 1 or 2, characterized in that: The sending of an online authentication request to the access control system comprises: When the verification succeeds, the current IC card serial number is updated to a new IC card serial number, wherein the new IC card serial number is obtained by adding a first preset number to a preset position of the current IC card serial number, or by adding the current IC card serial number to a second preset number; An online authentication request is sent to the access control system, wherein the online authentication request includes the new IC card serial number, so that the access control system performs online authentication based on the new IC card serial number.

4. The IC card anti-copying method as claimed in claim 3, characterized in that: The security level of the access control device is a high security level. After the new IC card serial number is sent to the access control system, the method includes: When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold, an online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or, When there is a cached IC card serial number that matches the new IC card serial number, and the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is less than the preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is less than a preset threshold, then the online authentication success result sent by the access control system is obtained to perform the door opening operation; or, When there is no cached IC card serial number matching the new IC card serial number and there is an abnormal IC card record, the online authentication failure result sent by the access control system is obtained to prohibit the door opening operation; or, When there is no cached IC card serial number matching the new IC card serial number and there is no abnormal IC card record, the online authentication success result sent by the access control system is obtained to perform the door opening operation.

5. The IC card anti-copying method according to claim 1 or 2, characterized in that: The security level of the access control device is a medium / low security level. After verifying the fixed sector key and the random sector key, the method includes: When the verification is successful, a first preset number is added to a preset position in the IC card serial number or the current IC card serial number is added to a second preset number to obtain a new IC card serial number; Generate an access control record, wherein the access control record includes the new IC card serial number; The access control record is sent to the access control system so that the access control system can calculate the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number, or calculate the difference in numerical value between the new IC card serial number and the cached IC card serial number. When the difference in the number of characters is greater than / equal to the preset serial number interval, or the difference in numerical value is greater than / equal to the preset threshold, the IC card is treated as an abnormal IC card.

6. The IC card anti-copying method according to claim 1, characterized in that: Before respectively verifying the fixed sector key and the random sector key, the method includes: When a key master card is detected, the key information in the key master card is read; If a key card needs to be added currently, the key information is cached; If the key card needs to be deleted currently, the key information is matched with the cache key information, and when the matches are consistent, the cache key information that matches the key information is deleted.

7. An IC card anti-copying method, characterized in that: Applied to an access control system, the method comprises: When the fixed sector key and the random sector key of the IC card are verified successfully, and the local authentication of the IC card is successful, if the security level of the access control device is a high security level, an online authentication request sent by the access control device is obtained; Based on the online authentication request, performing online authentication on the IC card; When the online authentication succeeds, the authentication success result is sent to the access control device so that the access control device performs the door opening operation.

8. The IC card anti-copying method according to claim 7, characterized in that: The online authentication request includes a new IC card serial number, the new IC card serial number is obtained by adding a first preset number to a preset position in the current IC card serial number, or by adding the current IC card serial number to a second preset number. The online authentication of the IC card based on the online authentication request includes: Determine whether there is a cached IC card serial number corresponding to the new IC card serial number; If there is a cached IC card serial number corresponding to the new IC card serial number, determine whether the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to a preset serial number interval, or determine whether the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to a preset threshold; If the difference in the number of characters is less than the preset serial number interval or the difference in the value is less than the preset threshold, the online authentication is successful; If the word count difference is greater than / equal to the preset serial number interval, or the numerical value difference is greater than / equal to the preset threshold, the online authentication fails.

9. The IC card anti-copying method according to claim 8, characterized in that: After determining whether there is a cached IC card serial number corresponding to the new IC card serial number, the method includes: If there is no cached IC card serial number corresponding to the new IC card serial number, determining whether there is an IC card abnormality record for the IC card; If there is an abnormal record of the IC card, the online authentication fails; If there is no abnormal record of the IC card, the online authentication is successful.

10. The IC card anti-copying method according to claim 7, characterized in that: The security level of the access control device is medium / low security level. When the fixed sector key and random sector key of the IC card are successfully verified and the local authentication of the IC card is successful, the following steps are performed: Receiving an access control record sent by the access control device, wherein the access control record includes the new IC card serial number; Determine whether there is a cached IC card serial number corresponding to the new IC card serial number; If there is no cached IC card serial number corresponding to the new IC card serial number, cache the new IC card serial number; If there is a cached IC card serial number corresponding to the new IC card serial number, the difference between the number of characters in the new IC card serial number and the number of characters in the cached IC card serial number is greater than / equal to the preset serial number interval, or the difference between the new IC card serial number and the cached IC card serial number is greater than / equal to the preset threshold, and there is no abnormal record of the IC card, then the IC card is regarded as an abnormal IC card; and / or If there is a cached IC card serial number corresponding to the new IC card serial number, and the card swiping time of the cached IC card serial number is less than the card swiping time of the new IC card serial number, then the cached IC card serial number and the card swiping time of the cached IC card serial number are updated.