An anti-counterfeiting method based on NFC
By encrypting on the server and writing ciphertext information in the NFC tag, combined with SAES or AES algorithm and key processing, the problem of insufficient data security after the NFC tag key is acquired is solved, and higher security performance is achieved. Data protection.
Patent Information
- Application Number
- CN202111247872.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-26
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-10-26
AI Technical Summary
Even if existing NFC tags are encrypted using secure chips, there is still a risk of stolen keys after they are acquired, resulting in insufficient data security.
After plaintext encryption is performed on the server, the ciphertext is written to the NFC tag, and the instruction information is identified through the ciphertext information to perform operations, reducing the key transfer process, using SAES or AES algorithm for encryption, and through key processing and cyclic shifting, etc. Steps to generate an encryption key.
It greatly increases data security, reduces the risk of terminal tags being cracked, avoids the determination of ciphertext encryption methods, improves security performance, and gets rid of the limitations of a single algorithm for security chips.
Smart Images

Figure CN113873488B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of NFC encryption and decryption, and in particular to an anti-counterfeiting method based on NFC. Background Art
[0002] Near field communication technology is an integration of contactless radio frequency identification (RFID) and interconnection technology. It combines the functions of inductive card reader, inductive card and point-to-point on a single chip, and can identify and exchange data with compatible devices within a short distance.
[0003] There are four basic tag types, identified as 1 to 4, with different formats and capacities. These tag types are based on the ISO 14443 A and B types, and Sony FeliCa, the former is the international standard for contactless smart cards, and the latter complies with the ISO 18092 passive communication mode standard.
[0004] Currently, most NFC tags can be copied through technical means. Even if they are encrypted through a security chip, the plain text and key are required to be stored in the chip. Each time, a fixed algorithm (such as the AES algorithm) is used to form a ciphertext for transmission. Once the key is obtained on the chip side, the security is completely lost and there is a risk of theft. Summary of the invention
[0005] The main purpose of the present invention is to provide an anti-counterfeiting method based on NFC to increase the security of data.
[0006] To achieve the above object, the present invention proposes an anti-counterfeiting method based on NFC, comprising:
[0007] After the plain text to be encrypted is encrypted on the server, the ciphertext is written into the NFC tag;
[0008] The server reads the encrypted information in the NFC tag;
[0009] Obtaining instruction information corresponding to the ciphertext information according to the ciphertext information identification;
[0010] Execute corresponding operations according to the instruction information.
[0011] Preferably, it also includes:
[0012] The ciphertext information carried in the NFC tag has the right to obtain the plaintext information of the server;
[0013] Check whether the plain text information on the current server is consistent with the instruction information;
[0014] When the plain text information of the current server is consistent with the instruction information, a step of identifying the instruction information corresponding to the cipher text information according to the cipher text information is performed.
[0015] Preferably, the encrypted plaintext is encrypted on the server side including: configuring an initial key and plaintext; performing key processing on the initial key and key expansion on the initial key; obtaining an encryption key as a result of the processing; and encrypting the plaintext using the encryption key according to an encryption algorithm to generate an initial key.
[0016] Preferably, performing key processing on the initial key comprises: performing a cyclic shift on data in the initial key, and performing a key selection step on the data subjected to the cyclic shift step.
[0017] Preferably, the encryption algorithm includes SAES and / or AES algorithm.
[0018] The present invention provides an anti-counterfeiting method based on NFC, which reduces the key transfer process and the risk of terminal tags being cracked. Even if the key is obtained, the plain text cannot be obtained through the key, and the encryption method of the ciphertext cannot be determined, which greatly increases data security. Through this solution, an encryption method or a mixed encryption algorithm can be defined for each batch or even each single tag, thereby getting rid of the limitations of the single algorithm of the security chip and greatly improving security performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying creative work.
[0020] Figure 1 A schematic diagram of an implementation environment of an NFC-based anti-counterfeiting method provided by an embodiment of the present invention;
[0021] Figure 2 A schematic diagram of an NFC-based anti-counterfeiting method provided by an embodiment of the present invention.
[0022] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0025] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0026] In the embodiment of the present invention, refer to Figures 1 to 2 , the anti-counterfeiting method based on NFC includes encrypting the plain text to be encrypted on the server side and then writing the cipher text into the NFC tag;
[0027] The server reads the encrypted information in the NFC tag;
[0028] Obtaining instruction information corresponding to the ciphertext information according to the ciphertext information identification;
[0029] Execute corresponding operations according to the instruction information.
[0030] The server reads the encrypted information in the NFC tag; the server identifies the instruction information corresponding to the encrypted information based on the encrypted information; the server performs corresponding operations based on the instruction information; this solves the problem that the operation instructions in the NFC tag can be easily read by other applications, resulting in the leakage of user information; even if other applications can read the encrypted information in the NFC tag, they cannot obtain the real instruction information, thereby protecting the user information.
[0031] In this embodiment, after the server with NFC function opens the NFC application, when the server is close to the NFC tag, the server will read the ciphertext information in the NFC tag.
[0032] It should be noted that the ciphertext information in the NFC tag may be pre-written by a server installed with an NFC tag application.
[0033] Furthermore, it also includes:
[0034] The ciphertext information carried in the NFC tag has the right to obtain the plaintext information of the server;
[0035] Check whether the plain text information of the current server is consistent with the instruction information;
[0036] When the plain text information of the current server is consistent with the instruction information, a step of identifying the instruction information corresponding to the cipher text information according to the cipher text information is performed.
[0037] Searching for instruction information corresponding to the ciphertext information in a plaintext information table pre-stored in the server according to the ciphertext information, the plaintext information table storing the corresponding relationship between the ciphertext information and the instruction information;
[0038] The plaintext information table stores the correspondence between ciphertext information and instruction information, wherein one instruction information may correspond to one or more ciphertext information. This exemplary embodiment is described with one instruction information corresponding to one ciphertext information, which does not constitute a limitation on this embodiment.
[0039] The preset plain text information table may be set by the user himself, or may be an information identification table preset in the NFC application, which is not limited in this embodiment.
[0040] In this embodiment, the NFC tag is used in an anti-counterfeiting remote control toy based on NFC. When other NFC applications are close to the NFC tag, they can only obtain the ciphertext information in the NFC tag, but cannot obtain the instruction information corresponding to the ciphertext information, thereby protecting the user's information.
[0041] Optionally, encrypting the encrypted plaintext on the server side includes: configuring an initial key and plaintext; performing key processing on the initial key, and performing key expansion on the initial key; obtaining an encryption key as a result of the processing; and encrypting the plaintext using the encryption key according to an encryption algorithm to generate an initial key.
[0042] The initial key and plaintext are generally configured as random numbers, where the initial key is M groups of N-bit data, and N is generally less than or equal to 256 bits;
[0043] Further, performing key processing on the initial key includes: performing a cyclic shift on the data in the initial key, and performing a key selection step on the data subjected to the cyclic shift step.
[0044] The processing of the initial key mainly includes a cyclic shift step for the data in the initial key, and a key selection step for the data after the cyclic shift step.
[0045] In this embodiment, the encryption algorithm includes SAES and / or AES algorithm, which will not be described in detail here.
[0046] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.
Claims
1. An anti-counterfeiting method based on NFC, characterized in that: include: After the plain text information to be encrypted is encrypted on the server, the ciphertext information is written into the NFC tag; The server reads the encrypted information in the NFC tag; Obtaining instruction information corresponding to the ciphertext information according to the ciphertext information identification; Execute corresponding operations according to the instruction information; The ciphertext information carried in the NFC tag has the right to obtain the plaintext information of the server; Check whether the plain text information on the current server is consistent with the instruction information; Searching for instruction information corresponding to the ciphertext information in a plaintext information table pre-stored in the server according to the ciphertext information, the plaintext information table storing the corresponding relationship between the ciphertext information and the instruction information; The plaintext information table stores the correspondence between ciphertext information and instruction information, where one instruction information may correspond to one or more ciphertext information; When the plain text information of the current server is consistent with the instruction information, the step of identifying the instruction information corresponding to the ciphertext information according to the ciphertext information is performed; The encryption of the encrypted plaintext information on the server side includes: configuring the initial key and the plaintext information; performing key processing on the initial key and key expansion on the initial key; obtaining the encryption key from the processing result; encrypting the plaintext information using the encryption key according to the encryption algorithm to generate the initial key; Key processing of the initial key includes cyclically shifting the data in the initial key and performing a key selection step on the data subjected to the cyclic shift step.
2. The NFC-based anti-counterfeiting method according to claim 1, characterized in that: The encryption algorithm includes SAES and / or AES algorithm.
3. The NFC-based anti-counterfeiting method according to claim 1, characterized in that: The NFC tag is applied to an anti-counterfeiting remote-controlled toy based on NFC.
Citation Information
Patent Citations
Production RFID false proof method with logic control unit
CN101038634A
Method for identifying and reading anti-counterfeiting codes
CN102236778A
Commodity information identification method
CN104239944A
Protective password resetting method, device and system based on decryption cryptograph of server
CN106341227A
Commodity anti-counterfeiting traceability system and implementation method thereof
CN106548352A
