CN113327371B - Card swiping authentication method and system for charging pile - Google Patents

Card swiping authentication method and system for charging pile Download PDF

Info

Publication number
CN113327371B
CN113327371B CN202110556877.9A CN202110556877A CN113327371B CN 113327371 B CN113327371 B CN 113327371B CN 202110556877 A CN202110556877 A CN 202110556877A CN 113327371 B CN113327371 B CN 113327371B
Authority
CN
China
Prior art keywords
uid
information
card
serial number
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110556877.9A
Other languages
Chinese (zh)
Other versions
CN113327371A (en
Inventor
刘作斌
熊刚
王粦鹏
陈冬冬
纪龙治
陈崇滨
陈见超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Nebula Electronics Co Ltd
Original Assignee
Fujian Nebula Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Nebula Electronics Co Ltd filed Critical Fujian Nebula Electronics Co Ltd
Priority to CN202110556877.9A priority Critical patent/CN113327371B/en
Publication of CN113327371A publication Critical patent/CN113327371A/en
Application granted granted Critical
Publication of CN113327371B publication Critical patent/CN113327371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F15/00Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity
    • G07F15/003Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity for electricity
    • G07F15/005Coin-freed apparatus with meter-controlled dispensing of liquid, gas or electricity for electricity dispensed for the electrical charging of vehicles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/0013Methods or arrangements for sensing record carriers, e.g. for reading patterns by galvanic contacts, e.g. card connectors for ISO-7816 compliant smart cards or memory cards, e.g. SD card readers
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07FCOIN-FREED OR LIKE APPARATUS
    • G07F7/00Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus
    • G07F7/08Mechanisms actuated by objects other than coins to free or to actuate vending, hiring, coin or paper currency dispensing or refunding apparatus by coded identity card or credit card or other personal identification means
    • G07F7/12Card verification

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Control Of Vending Devices And Auxiliary Devices For Vending Devices (AREA)

Abstract

The invention provides a card swiping authentication method and system for a charging pile in the technical field of charging piles, wherein the method comprises the following steps: step S10, acquiring a stub U ID and a card U ID, creating a key, a sequence number list and two I D information lists, randomly generating I D information, and respectively storing the card U ID and I D information into two I D information lists; step S20, creating an encryption rule, encrypting the information of the stub U ID, the card U ID and the card I D by using the encryption rule and the key to generate encrypted I D information, and storing the information to the card; s30, identifying the user card by the charging pile to obtain a user card U ID, and performing first authentication on the user card U ID based on a first I D information list; and S40, identifying the user card by the charging pile to obtain user encryption I D information, decrypting the user encryption I D information by using an encryption rule and a key, and performing second authentication by combining the user card U ID, the charging pile local pile U ID, a second I D information list and a sequence number list. The invention has the advantages that: very big promotion fill the security that electric pile punched the card.

Description

Card swiping authentication method and system for charging pile
Technical Field
The invention relates to the technical field of charging piles, in particular to a card swiping authentication method and system for a charging pile.
Background
The electric vehicle (BEV) is a vehicle which takes a vehicle-mounted power supply as power and drives wheels by a motor to run, meets various requirements of road traffic and safety regulations, and has a wide prospect due to smaller influence on the environment compared with the traditional vehicle. Along with the development of electric automobile, electric automobile's the demand of charging increases day by day, and the construction quantity of filling electric pile presents the explosive growth.
At present, three payment modes of coin-feed, card swiping and code scanning exist in a charging pile. The code scanning is realized by using a charging pile through a mobile phone client, is deeply pursued by young people, but has low acceptance degree in middle-aged and old people; the coin-freed needs to carry cash, and with the development of mobile payment, people are gradually used to carry no cash, and the payment mode is gradually marginalized; the card swiping is to update the balance by reading and writing data in the card (radio frequency card and IC card) through the card reader, and is convenient to carry, does not need to carry out complex operation on a mobile phone, and is widely accepted by middle and old aged groups.
Therefore, how to provide a method and a system for authenticating a card swiping of a charging pile to improve the card swiping safety of the charging pile becomes a problem to be solved urgently.
Disclosure of Invention
The invention aims to solve the technical problem of providing a card swiping authentication method and system for a charging pile, and improving the card swiping safety of the charging pile.
In a first aspect, the invention provides a card swiping authentication method for a charging pile, which comprises the following steps:
step S10, acquiring pile UIDs of charging piles and card UIDs of cards, creating a secret key, a serial number list, a first ID information list and a second ID information list, randomly generating a plurality of ID information, storing the card UIDs into the first ID information list, and storing the ID information into the second ID information list;
step S20, creating an encryption rule, encrypting the stub UID, the card UID and the ID information by using the encryption rule and the secret key to generate encrypted ID information, storing the encrypted ID information into the card, and updating and maintaining the serial number list;
step S30, the charging pile identifies the user card by the card reader to obtain the user card UID, and first authentication is carried out on the user card UID based on the first ID information list;
and step S40, the charging pile identifies the user card by using the card reader to obtain user encrypted ID information, decrypts the user encrypted ID information by using the encryption rule and the secret key, and performs second authentication by combining the user card UID, the charging pile local UID, a second ID information list and a serial number list.
Further, the step S10 is specifically:
acquiring the stake UID of each charging pile and the card UID of each card, and creating a secret key, a serial number list, a first ID information list for storing the card UID and a second ID information list for storing the ID information;
the serial number list is used for storing one-to-one correspondence of the stub UID, the card UID and the serial number; the ID information is generated randomly, and the number of the ID information is consistent with that of the UIDs.
Further, in step S20, the encryption rule is specifically:
encrypting the type + UID + ID information + serial number by using the key to obtain encrypted information, calculating the length len of the encrypted information, and obtaining encrypted ID information based on the len + encrypted information;
the value of the type is 00 or 01; when the value of the type is 00, the UID is 'card UID', and when the value of the type is 01, the UID is 'stub UID + card UID'; the value of the serial number is a positive integer, and the serial number is increased by taking 1 as a step length.
Further, the step S30 is specifically:
the charging pile identifies the user card by using the card reader to obtain a user card UID, judges whether the user card UID exists in a first ID information list, if so, passes the first authentication, and enters step S40; if not, the first authentication fails, and the process is ended.
Further, the step S40 specifically includes:
step S41, the charging pile identifies a user card by using a card reader to obtain user encryption ID information, and reads out encryption information based on a len field carried by the user encryption ID information;
step S42, the charging pile decrypts the encrypted information by using the key to obtain the type, UID, ID information and serial number;
step S43, judging the value of the type by the charging pile, and if the value is 00, entering the step S44; if the value is 01, the step S45 is entered;
step S44, comparing whether the UID carried by the UID field is consistent with the UID of the user card obtained by direct identification, if so, entering step S46; if not, ending the flow;
step S45, comparing whether the UID carried by the UID field is consistent with the user card UID obtained by direct identification, and whether the stake UID carried by the UID field is consistent with the stake UID local to the charging pile, if so, entering step S46; if not, ending the flow;
step S46, judging whether the ID information exists in a second ID information list, if so, entering step S47; if not, ending the flow;
step S47, searching a corresponding serial number in a serial number list based on the user card UID and the stub UID, judging whether the serial number carried by the user card is greater than or equal to the corresponding serial number in the serial number list, if so, passing the second authentication, and updating the corresponding serial number in the serial number list; if not, the second authentication fails, and the process is ended.
In a second aspect, the invention provides a card swiping authentication system of a charging pile, which comprises the following modules:
the initialization module is used for acquiring the pile UID of each charging pile and the card UID of each card, creating a secret key, a serial number list, a first ID information list and a second ID information list, randomly generating a plurality of ID information, storing each card UID into the first ID information list, and storing each ID information into the second ID information list;
the encryption module is used for creating an encryption rule, encrypting the stake UID, the card UID and the ID information by using the encryption rule and a secret key to generate encrypted ID information, storing the encrypted ID information into the card, and updating and maintaining the serial number list;
the first authentication module is used for identifying a user card by the charging pile through a card reader to obtain a user card UID and carrying out first authentication on the user card UID based on the first ID information list;
and the second authentication module is used for identifying the user card by the charging pile through the card reader to obtain user encrypted ID information, decrypting the user encrypted ID information through the encryption rule and the secret key, and performing second authentication by combining the user card UID, the charging pile local pile UID, the second ID information list and the serial number list.
Further, the initialization module specifically includes:
acquiring the stake UID of each charging pile and the card UID of each card, and creating a secret key, a serial number list, a first ID information list for storing the card UID and a second ID information list for storing the ID information;
the serial number list is used for storing one-to-one correspondence of the stub UID, the card UID and the serial number; the ID information is generated randomly, and the number of the ID information is consistent with that of the UIDs.
Further, in the encryption module, the encryption rule specifically includes:
encrypting the type + UID + ID information + serial number by using the key to obtain encrypted information, calculating the length len of the encrypted information, and obtaining encrypted ID information based on the len + encrypted information;
the value of the type is 00 or 01; when the value of the type is 00, the UID is 'card UID', and when the value of the type is 01, the UID is 'stub UID + card UID'; the value of the serial number is a positive integer, and the serial number is increased by taking 1 as a step length.
Further, the first authentication module specifically includes:
the charging pile identifies the user card by using the card reader to obtain a user card UID, judges whether the user card UID exists in a first ID information list, if so, passes the first authentication and enters a second authentication module; if not, the first authentication fails, and the process is ended.
Further, the second authentication module specifically includes:
the charging pile is used for identifying a user card by using a card reader to obtain user encryption ID information, and reading out encryption information based on a len field carried by the user encryption ID information;
the charging pile comprises an encrypted information analyzing unit, a charging pile identification unit and a charging pile identification unit, wherein the encrypted information analyzing unit is used for decrypting the encrypted information by using a secret key to obtain type, UID, ID information and serial numbers;
the type judging unit is used for judging the value of the type by the charging pile, and if the value is 00, the charging pile enters the card UID comparing unit; if the value is 01, entering a card UID and pile UID comparison unit;
the card UID comparison unit is used for comparing whether the card UID carried by the UID field is consistent with the user card UID obtained by direct identification, and if so, entering the ID information comparison unit; if not, ending the flow;
the card UID and pile UID comparison unit is used for comparing whether the card UID carried by the UID field is consistent with the user card UID obtained by direct identification, and whether the pile UID carried by the UID field is consistent with the pile UID local to the charging pile, and if so, entering the ID information comparison unit; if not, ending the flow;
the ID information comparison unit is used for judging whether the ID information exists in a second ID information list or not, and if so, the ID information enters the serial number comparison unit; if not, ending the flow;
the serial number comparison unit is used for searching a corresponding serial number in a serial number list based on the user card UID and the stub UID, judging whether the serial number carried by the user card is greater than or equal to the corresponding serial number in the serial number list, if so, passing the second authentication, and updating the corresponding serial number in the serial number list; if not, the second authentication fails, and the process is ended.
The invention has the advantages that:
1. encrypting the pile UID, the card UID and the ID information through a randomly generated secret key and a preset encryption rule to generate encrypted ID information, fusing a serial number in the encrypted ID information, and storing a first ID information list comprising all the card UIDs; when a user holds a user card for authentication, whether a user card UID of the user card exists in a first ID information list or not is read, then user encrypted ID information of the user card is read, encrypted information with a specific length is read based on a len field, the encrypted information is decrypted by using a key, the card UID is verified based on a value of a type or the card UID and a stake UID, and then the ID information and a serial number are sequentially verified, namely quintuple security authentication is adopted, wherein authentication failure is caused by any link with a problem, for example, the length of the encrypted information is inconsistent with the length of a len identifier, and the subsequent authentication failure is directly caused by incomplete reading of the encrypted information; value based on type needs to verify card UID and stake UID simultaneously, and only card UID that can solve the secret actually will lead to authentication failure etc. and finally very big promotion fills the security of electric pile card swiping.
2. The serial number carried by the user card is larger than or equal to the corresponding serial number in the serial number list, the corresponding serial number in the serial number list is updated synchronously when the serial number carried by the user card is larger than the corresponding serial number in the serial number list, namely, a new user card is regenerated based on the stake UID and the card UID aiming at the condition that the user card is lost, the serial number of the new user card is accumulated upwards based on the latest serial number list, and when the serial number carried by the user card is smaller than the corresponding serial number in the serial number list, the old card which is lost by the user card cannot be used, so that the safety of card swiping of the charging pile is further improved.
Drawings
The invention will be further described with reference to the following examples with reference to the accompanying drawings.
Fig. 1 is a flowchart of a card swiping authentication method of a charging pile according to the invention.
Fig. 2 is a schematic structural diagram of a card swiping authentication system of a charging pile according to the present invention.
Detailed Description
The technical scheme in the embodiment of the application has the following general idea: encrypting the pile UID, the card UID and the ID information through a randomly generated secret key and a preset encryption rule to generate encrypted ID information, fusing a serial number in the encrypted ID information, and storing a first ID information list comprising all the card UIDs; when a user holds a user card for authentication, whether the user card UID of the user card exists in a first ID information list or not is read firstly, then the user encrypted ID information of the user card is read, the encrypted information with a specific length is read based on a len field, the encrypted information is decrypted by using a secret key, the card UID is verified based on the value of type or the card UID and the pile UID, and then the ID information and the serial number are verified in sequence, namely five-time safety authentication is adopted to improve the safety of card swiping of the charging pile.
Referring to fig. 1 to 2, a preferred embodiment of a card swiping authentication method for a charging pile according to the present invention includes the following steps:
step S10, acquiring a PILE UID (PILE _ UID) of each charging PILE and a CARD UID (CARD _ UID) of a CARD, creating a secret key, a serial number list, a first ID information list and a second ID information list, randomly generating a plurality of ID information, storing each CARD UID into the first ID information list, and storing each ID information into the second ID information list; the secret key is generated randomly;
step S20, creating an encryption rule, encrypting the stub UID, the card UID and the ID information by using the encryption rule and the secret key to generate encrypted ID information, storing the encrypted ID information into the card, and updating and maintaining the serial number list; in specific implementation, a plurality of pieces of encrypted ID information can be stored in a card so as to realize a one-card multi-pile card swiping mode;
step S30, the charging pile identifies the user card by the card reader to obtain the user card UID, and first authentication is carried out on the user card UID based on the first ID information list;
and step S40, the charging pile identifies the user card by using the card reader to obtain user encrypted ID information, decrypts the user encrypted ID information by using the encryption rule and the secret key, and performs second authentication by combining the user card UID, the charging pile local UID, a second ID information list and a serial number list.
The step S10 specifically includes:
acquiring the stake UID of each charging pile and the card UID of each card, and creating a secret key, a serial number list, a first ID information list for storing the card UID and a second ID information list for storing the ID information;
the serial number list is used for storing the one-to-one corresponding relation of the pile UID, the card UID and the serial numbers, and the values of the serial numbers in the serial number list are default to be null; the ID information is generated randomly, and the number of the ID information is consistent with that of the UIDs.
In step S20, the encryption rule is specifically:
encrypting the type + UID + ID information + serial number by using the key to obtain encrypted information, calculating the length len of the encrypted information, and obtaining encrypted ID information based on the len + encrypted information;
the value of the type is 00 or 01; when the value of the type is 00, the UID is 'card UID', and when the value of the type is 01, the UID is 'stub UID + card UID'; and the value of the sequence number is a positive integer, is increased by taking 1 as a step length, and is synchronously updated into the sequence number list.
The step S30 specifically includes:
the charging pile identifies the user card by using the card reader to obtain a user card UID, judges whether the user card UID exists in a first ID information list, if so, passes the first authentication, and enters step S40; if not, the first authentication fails, and the process is ended.
The step S40 specifically includes:
step S41, the charging pile identifies a user card by using a card reader to obtain user encryption ID information, and reads out encryption information based on a len field carried by the user encryption ID information; that is, data with the length identified by len is read out after the len field, and when the length of the encrypted information is inconsistent with the length identified by len, the encrypted information is incompletely read, so that authentication fails;
step S42, the charging pile decrypts the encrypted information by using the key to obtain the type, UID, ID information and serial number;
step S43, judging the value of the type by the charging pile, and if the value is 00, entering the step S44; if the value is 01, the step S45 is entered;
step S44, comparing whether the UID carried by the UID field is consistent with the UID of the user card obtained by direct identification, if so, entering step S46; if not, ending the flow;
step S45, comparing whether the UID carried by the UID field is consistent with the user card UID obtained by direct identification, and whether the stake UID carried by the UID field is consistent with the stake UID local to the charging pile, if so, entering step S46; if not, ending the flow;
when the value of the type is 00, the UID carries the card UID and the stub UID, so that authentication failure is caused; when the value of the type is 01, the UID only carries the UID of the card, which leads to authentication failure;
step S46, judging whether the ID information exists in the second ID information list, if yes, entering step S47; if not, ending the flow; because the ID information is randomly produced, the safety is greatly improved by verifying the ID information;
step S47, searching a corresponding serial number in a serial number list based on the user card UID and the stub UID, judging whether the serial number carried by the user card is greater than or equal to the corresponding serial number in the serial number list, if so, passing the second authentication, and updating the corresponding serial number in the serial number list; if not, the second authentication fails, and the process is ended. Namely, after the user loses the original card and newly manages the card, the original card is directly abandoned based on the serial number, so that the safety is improved.
The invention discloses a preferred embodiment of a card swiping authentication system of a charging pile, which comprises the following modules:
the initialization module is used for acquiring a PILE UID (PILE _ UID) of each charging PILE and a CARD UID (CARD _ UID) of each CARD, creating a secret key, a serial number list, a first ID information list and a second ID information list, randomly generating a plurality of ID information, storing each CARD UID into the first ID information list, and storing each ID information into the second ID information list; the secret key is generated randomly;
the encryption module is used for creating an encryption rule, encrypting the pile UID, the card UID and the ID information by using the encryption rule and a secret key to generate encrypted ID information, storing the encrypted ID information into the card, and updating and maintaining the serial number list; in specific implementation, a plurality of pieces of encrypted ID information can be stored in a card so as to realize a one-card multi-pile card swiping mode;
the first authentication module is used for identifying a user card by the charging pile through a card reader to obtain a user card UID and carrying out first authentication on the user card UID based on the first ID information list;
and the second authentication module is used for identifying the user card by the charging pile through the card reader to obtain user encrypted ID information, decrypting the user encrypted ID information through the encryption rule and the secret key, and performing second authentication by combining the user card UID, the charging pile local pile UID, the second ID information list and the serial number list.
The initialization module specifically comprises:
acquiring the stake UID of each charging pile and the card UID of each card, and creating a secret key, a serial number list, a first ID information list for storing the card UID and a second ID information list for storing the ID information;
the serial number list is used for storing the one-to-one corresponding relation of the pile UID, the card UID and the serial numbers, and the values of the serial numbers in the serial number list are default to be null; the ID information is generated randomly, and the number of the ID information is consistent with that of the UIDs.
In the encryption module, the encryption rule is specifically as follows:
encrypting the type + UID + ID information + serial number by using the key to obtain encrypted information, calculating the length len of the encrypted information, and obtaining encrypted ID information based on the len + encrypted information;
the value of the type is 00 or 01; when the value of the type is 00, the UID is 'card UID', and when the value of the type is 01, the UID is 'stub UID + card UID'; and the value of the sequence number is a positive integer, is increased by taking 1 as a step length, and is synchronously updated into the sequence number list.
The first authentication module specifically comprises:
the charging pile identifies the user card by using the card reader to obtain a user card UID, judges whether the user card UID exists in a first ID information list, if so, passes the first authentication and enters a second authentication module; if not, the first authentication fails, and the process is ended.
The second authentication module specifically includes:
the charging pile is used for identifying a user card by using a card reader to obtain user encryption ID information, and reading out encryption information based on a len field carried by the user encryption ID information; that is, data with the length identified by len is read out after the len field, and when the length of the encrypted information is inconsistent with the length identified by len, the encrypted information is incompletely read, so that authentication fails;
the charging pile comprises an encrypted information analyzing unit, a charging pile identification unit and a charging pile identification unit, wherein the encrypted information analyzing unit is used for decrypting the encrypted information by using a secret key to obtain type, UID, ID information and serial numbers;
the type judging unit is used for judging the value of the type by the charging pile, and if the value is 00, the charging pile enters the card UID comparing unit; if the value is 01, entering a card UID and pile UID comparison unit;
the card UID comparison unit is used for comparing whether the card UID carried by the UID field is consistent with the user card UID obtained by direct identification, and if so, entering the ID information comparison unit; if not, ending the flow;
the card UID and pile UID comparison unit is used for comparing whether the card UID carried by the UID field is consistent with the user card UID obtained by direct identification, and whether the pile UID carried by the UID field is consistent with the pile UID local to the charging pile, and if so, entering the ID information comparison unit; if not, ending the flow;
when the value of the type is 00, the UID carries the card UID and the stub UID, so that authentication failure is caused; when the value of the type is 01, the UID only carries the UID of the card, which leads to authentication failure;
the ID information comparison unit is used for judging whether the ID information exists in a second ID information list or not, and if so, the ID information enters the serial number comparison unit; if not, ending the flow; because the ID information is randomly produced, the safety is greatly improved by verifying the ID information;
the serial number comparison unit is used for searching a corresponding serial number in a serial number list based on the user card UID and the stub UID, judging whether the serial number carried by the user card is greater than or equal to the corresponding serial number in the serial number list, if so, passing the second authentication, and updating the corresponding serial number in the serial number list; if not, the second authentication fails, and the process is ended. Namely, after the user loses the original card and newly manages the card, the original card is directly abandoned based on the serial number, so that the safety is improved.
In summary, the invention has the advantages that:
1. encrypting the pile UID, the card UID and the ID information through a randomly generated secret key and a preset encryption rule to generate encrypted ID information, fusing a serial number in the encrypted ID information, and storing a first ID information list comprising all the card UIDs; when a user holds a user card for authentication, whether a user card UID of the user card exists in a first ID information list or not is read, then user encrypted ID information of the user card is read, encrypted information with a specific length is read based on a len field, the encrypted information is decrypted by using a key, the card UID is verified based on a value of a type or the card UID and a stake UID, and then the ID information and a serial number are sequentially verified, namely quintuple security authentication is adopted, wherein authentication failure is caused by any link with a problem, for example, the length of the encrypted information is inconsistent with the length of a len identifier, and the subsequent authentication failure is directly caused by incomplete reading of the encrypted information; value based on type needs to verify card UID and stake UID simultaneously, and only card UID that can solve the secret actually will lead to authentication failure etc. and finally very big promotion fills the security of electric pile card swiping.
2. The serial number carried by the user card is larger than or equal to the corresponding serial number in the serial number list, the corresponding serial number in the serial number list is updated synchronously when the serial number carried by the user card is larger than the corresponding serial number in the serial number list, namely, a new user card is regenerated based on the stake UID and the card UID aiming at the condition that the user card is lost, the serial number of the new user card is accumulated upwards based on the latest serial number list, and when the serial number carried by the user card is smaller than the corresponding serial number in the serial number list, the old card which is lost by the user card cannot be used, so that the safety of card swiping of the charging pile is further improved.
Although specific embodiments of the invention have been described above, it will be understood by those skilled in the art that the specific embodiments described are illustrative only and are not limiting upon the scope of the invention, and that equivalent modifications and variations can be made by those skilled in the art without departing from the spirit of the invention, which is to be limited only by the appended claims.

Claims (8)

1. A card swiping authentication method of a charging pile is characterized by comprising the following steps: the method comprises the following steps:
step S10, acquiring pile UIDs of charging piles and card UIDs of cards, creating a secret key, a serial number list, a first ID information list and a second ID information list, randomly generating a plurality of ID information, storing the card UIDs into the first ID information list, and storing the ID information into the second ID information list;
step S20, creating an encryption rule, encrypting the stub UID, the card UID and the ID information by using the encryption rule and the secret key to generate encrypted ID information, storing the encrypted ID information into the card, and updating and maintaining the serial number list;
the encryption rule is specifically as follows:
encrypting the 'type + UID + ID information + serial number' by using the key to obtain encrypted information, calculating the length len of the encrypted information, and obtaining encrypted ID information based on the len + encrypted information;
the value of the type is 00 or 01; when the value of the type is 00, the UID is 'card UID', and when the value of the type is 01, the UID is 'stub UID + card UID'; the value of the serial number is a positive integer, and is increased by taking 1 as a step length;
step S30, the charging pile identifies the user card by the card reader to obtain the user card UID, and first authentication is carried out on the user card UID based on the first ID information list;
and step S40, the charging pile identifies the user card by using the card reader to obtain user encrypted ID information, decrypts the user encrypted ID information by using the encryption rule and the secret key, and performs second authentication by combining the user card UID, the charging pile local UID, a second ID information list and a serial number list.
2. The card-swiping authentication method for the charging pile according to claim 1, wherein the card-swiping authentication method comprises the following steps: the step S10 specifically includes:
acquiring the stake UID of each charging pile and the card UID of each card, and creating a secret key, a serial number list, a first ID information list for storing the card UID and a second ID information list for storing the ID information;
the serial number list is used for storing one-to-one correspondence of the stub UID, the card UID and the serial number; the ID information is generated randomly, and the number of the ID information is consistent with that of the UIDs.
3. The card-swiping authentication method for the charging pile according to claim 1, wherein the card-swiping authentication method comprises the following steps: the step S30 specifically includes:
the charging pile identifies the user card by using the card reader to obtain a user card UID, judges whether the user card UID exists in a first ID information list, if so, passes the first authentication, and enters step S40; if not, the first authentication fails, and the process is ended.
4. The card-swiping authentication method for the charging pile according to claim 1, wherein the card-swiping authentication method comprises the following steps: the step S40 specifically includes:
step S41, the charging pile identifies a user card by using a card reader to obtain user encryption ID information, and reads out encryption information based on a len field carried by the user encryption ID information;
step S42, the charging pile decrypts the encrypted information by using the key to obtain the type, UID, ID information and serial number;
step S43, judging the value of the type by the charging pile, and if the value is 00, entering the step S44; if the value is 01, the step S45 is entered;
step S44, comparing whether the UID carried by the UID field is consistent with the UID of the user card obtained by direct identification, if so, entering step S46; if not, ending the flow;
step S45, comparing whether the UID carried by the UID field is consistent with the user card UID obtained by direct identification, and whether the stake UID carried by the UID field is consistent with the stake UID local to the charging pile, if so, entering step S46; if not, ending the flow;
step S46, judging whether the ID information exists in a second ID information list, if so, entering step S47; if not, ending the flow;
step S47, searching a corresponding serial number in a serial number list based on the user card UID and the stub UID, judging whether the serial number carried by the user card is greater than or equal to the corresponding serial number in the serial number list, if so, passing the second authentication, and updating the corresponding serial number in the serial number list; if not, the second authentication fails, and the process is ended.
5. The utility model provides a fill electric pile's authentication system of punching card which characterized in that: the system comprises the following modules:
the initialization module is used for acquiring the pile UID of each charging pile and the card UID of each card, creating a secret key, a serial number list, a first ID information list and a second ID information list, randomly generating a plurality of ID information, storing each card UID into the first ID information list, and storing each ID information into the second ID information list;
the encryption module is used for creating an encryption rule, encrypting the pile UID, the card UID and the ID information by using the encryption rule and a secret key to generate encrypted ID information, storing the encrypted ID information into the card, and updating and maintaining the serial number list;
the encryption rule is specifically as follows:
encrypting the type + UID + ID information + serial number by using the key to obtain encrypted information, calculating the length len of the encrypted information, and obtaining encrypted ID information based on the len + encrypted information;
the value of the type is 00 or 01; when the value of the type is 00, the UID is 'card UID', and when the value of the type is 01, the UID is 'stub UID + card UID'; the value of the serial number is a positive integer, and is increased by taking 1 as a step length;
the first authentication module is used for identifying a user card by the charging pile through a card reader to obtain a user card UID and carrying out first authentication on the user card UID based on the first ID information list;
and the second authentication module is used for identifying the user card by the charging pile through the card reader to obtain user encrypted ID information, decrypting the user encrypted ID information through the encryption rule and the secret key, and performing second authentication by combining the user card UID, the charging pile local pile UID, the second ID information list and the serial number list.
6. The system of claim 5, wherein the system comprises: the initialization module specifically comprises:
acquiring the stake UID of each charging pile and the card UID of each card, and creating a secret key, a serial number list, a first ID information list for storing the card UID and a second ID information list for storing the ID information;
the serial number list is used for storing one-to-one correspondence of the stub UID, the card UID and the serial number; the ID information is generated randomly, and the number of the ID information is consistent with that of the UIDs.
7. The system of claim 5, wherein the system comprises: the first authentication module specifically comprises:
the charging pile identifies the user card by using the card reader to obtain a user card UID, judges whether the user card UID exists in a first ID information list, if so, passes the first authentication and enters a second authentication module; if not, the first authentication fails, and the process is ended.
8. The system of claim 7, wherein the system further comprises: the second authentication module specifically includes:
the charging pile is used for identifying a user card by using a card reader to obtain user encryption ID information, and reading out encryption information based on a len field carried by the user encryption ID information;
the charging pile comprises an encrypted information analyzing unit, a charging pile identification unit and a charging pile identification unit, wherein the encrypted information analyzing unit is used for decrypting the encrypted information by using a secret key to obtain type, UID, ID information and serial numbers;
the type judging unit is used for judging the value of the type by the charging pile, and if the value is 00, the charging pile enters the card UID comparing unit; if the value is 01, entering a card UID and pile UID comparison unit;
the card UID comparison unit is used for comparing whether the card UID carried by the UID field is consistent with the user card UID obtained by direct identification, and if so, entering the ID information comparison unit; if not, ending the flow;
the card UID and pile UID comparison unit is used for comparing whether the card UID carried by the UID field is consistent with the user card UID obtained by direct identification, and whether the pile UID carried by the UID field is consistent with the pile UID local to the charging pile, and if so, entering the ID information comparison unit; if not, ending the flow;
the ID information comparison unit is used for judging whether the ID information exists in a second ID information list or not, and if so, the ID information enters the serial number comparison unit; if not, ending the flow;
the serial number comparison unit is used for searching a corresponding serial number in a serial number list based on the user card UID and the stub UID, judging whether the serial number carried by the user card is greater than or equal to the corresponding serial number in the serial number list, if so, passing the second authentication, and updating the corresponding serial number in the serial number list; if not, the second authentication fails, and the process is ended.
CN202110556877.9A 2021-05-21 2021-05-21 Card swiping authentication method and system for charging pile Active CN113327371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110556877.9A CN113327371B (en) 2021-05-21 2021-05-21 Card swiping authentication method and system for charging pile

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110556877.9A CN113327371B (en) 2021-05-21 2021-05-21 Card swiping authentication method and system for charging pile

Publications (2)

Publication Number Publication Date
CN113327371A CN113327371A (en) 2021-08-31
CN113327371B true CN113327371B (en) 2022-08-05

Family

ID=77416208

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110556877.9A Active CN113327371B (en) 2021-05-21 2021-05-21 Card swiping authentication method and system for charging pile

Country Status (1)

Country Link
CN (1) CN113327371B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115471952B (en) * 2022-09-29 2024-04-05 石家庄科林电气股份有限公司 Card swiping authentication method for charging pile, charging pile and charging management system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103138932A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Allocation method of mifare card sector secret key and allocation system of mifare card sector secret key
CN104219626A (en) * 2014-08-25 2014-12-17 北京乐富科技有限责任公司 Identity authentication method and device
CN107392001A (en) * 2016-09-09 2017-11-24 天地融科技股份有限公司 A kind of authorization method, system and card
CN109272609A (en) * 2018-08-19 2019-01-25 天津新泰基业电子股份有限公司 A kind of CPU safety door inhibition control method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005122402A (en) * 2003-10-15 2005-05-12 Systemneeds Inc Ic card system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103138932A (en) * 2011-12-05 2013-06-05 中兴通讯股份有限公司 Allocation method of mifare card sector secret key and allocation system of mifare card sector secret key
CN104219626A (en) * 2014-08-25 2014-12-17 北京乐富科技有限责任公司 Identity authentication method and device
CN107392001A (en) * 2016-09-09 2017-11-24 天地融科技股份有限公司 A kind of authorization method, system and card
CN109272609A (en) * 2018-08-19 2019-01-25 天津新泰基业电子股份有限公司 A kind of CPU safety door inhibition control method and system

Also Published As

Publication number Publication date
CN113327371A (en) 2021-08-31

Similar Documents

Publication Publication Date Title
CN106415611B (en) Self-authentication chip
US7360091B2 (en) Secure data transfer method of using a smart card
CN103150770A (en) On board unit embedded secure access module (ESAM) for free stream toll collection and use method thereof
CN112491843B (en) Database multiple authentication method, system, terminal and storage medium
CN103150771A (en) Lane purchase secure access module (PSAM) for city road bridge free stream toll collection and use method thereof
CN113792561B (en) NFC electronic tag verification method and terminal
CN113327371B (en) Card swiping authentication method and system for charging pile
CN111968256A (en) Electronic tag anti-dismounting method and device, vehicle and storage medium
CN104182786B (en) The safety control of partition management is realized to ultrahigh frequency electronic tag storage region
CN107248212A (en) A kind of intelligent lock system and its method for unlocking based on NFC
CN110769410B (en) Method, application module, system and terminal for activating a vehicle-mounted unit device
CN113506119A (en) APP-based charging pile transaction management method and system
CN1182493C (en) Method for authenticating a portable object, corresponding portable object, and apparatus therefor
CN110659470A (en) Authentication method and authentication system for off-line physical isolation
CN111539702B (en) Payment record processing method
CN111340969B (en) Non-card ETC offline processing method and device, computer equipment and storage medium
CN112073967B (en) Method and device for downloading identity certificate of mobile phone shield equipment and electronic equipment
KR101919693B1 (en) Anonymous payment method to provide location privacy for wireless charging of electrical vehicles and system therefor
CN102833072A (en) Dynamic generation method for access key of automobile electronic information card
CN117131552A (en) Chip operation method and device, electronic equipment and storage medium
CN106230821A (en) The recognition methods of a kind of smart card and equipment
CN115240298A (en) Vehicle digital key acquisition method and device, computer equipment and storage medium
CN112822019B (en) Method and system for writing information of pre-installed vehicle-mounted unit
CN112583595B (en) Vehicle charging safety management method
CN104424453A (en) System and method for verifying non-contact inductive label

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant