WO2020103284A1 - 智能卡认证方法、智能锁、智能卡、系统及装置 - Google Patents

智能卡认证方法、智能锁、智能卡、系统及装置

Info

Publication number
WO2020103284A1
WO2020103284A1 PCT/CN2018/124180 CN2018124180W WO2020103284A1 WO 2020103284 A1 WO2020103284 A1 WO 2020103284A1 CN 2018124180 W CN2018124180 W CN 2018124180W WO 2020103284 A1 WO2020103284 A1 WO 2020103284A1
Authority
WO
WIPO (PCT)
Prior art keywords
smart card
smart
authentication
key
card
Prior art date
Application number
PCT/CN2018/124180
Other languages
English (en)
French (fr)
Inventor
解荣康
Original Assignee
北京小米移动软件有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京小米移动软件有限公司 filed Critical 北京小米移动软件有限公司
Publication of WO2020103284A1 publication Critical patent/WO2020103284A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0853Network architectures or network communication protocols for network security for authentication of entities using an additional device, e.g. smartcard, SIM or a different communication terminal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/30Authentication, i.e. establishing the identity or authorisation of security principals
    • G06F21/31User authentication
    • G06F21/34User authentication involving the use of external additional devices, e.g. dongles or smart cards
    • G06F21/35User authentication involving the use of external additional devices, e.g. dongles or smart cards communicating wirelessly
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/045Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply hybrid encryption, i.e. combination of symmetric and asymmetric encryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network
    • H04L63/062Network architectures or network communication protocols for network security for supporting key management in a packet data network for key distribution, e.g. centrally by trusted party
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/0823Network architectures or network communication protocols for network security for authentication of entities using certificates
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/06Authentication
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C9/00309Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks
    • G07C2009/00412Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys operated with bidirectional data transmission between data carrier and locks the transmitted data signal being encrypted
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C2009/00968Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys shape of the data carrier
    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07CTIME OR ATTENDANCE REGISTERS; REGISTERING OR INDICATING THE WORKING OF MACHINES; GENERATING RANDOM NUMBERS; VOTING OR LOTTERY APPARATUS; ARRANGEMENTS, SYSTEMS OR APPARATUS FOR CHECKING NOT PROVIDED FOR ELSEWHERE
    • G07C9/00Individual registration on entry or exit
    • G07C9/00174Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys
    • G07C2009/00968Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys shape of the data carrier
    • G07C2009/00976Electronically operated locks; Circuits therefor; Nonmechanical keys therefor, e.g. passive or active electrical keys or other data carriers without mechanical keys shape of the data carrier card

Definitions

  • the present disclosure relates to the field of Internet of Things technology, and in particular, to a smart card authentication method, smart lock, smart card, system, and device.
  • smart locks have unique application scenarios and are widely used in apartment, residential, office and other scenarios.
  • the smart card serves as the key to the smart lock, and interacts with the smart lock to achieve authentication, and then based on the authenticated smart card, the smart lock can be quickly opened. Compared with the traditional unlocking method, this method is more convenient and safer.
  • the smart lock mainly authenticates the smart card based on the preset unlock key, which requires the smart lock manufacturer to preset the unlock key before the smart lock leaves the factory, and the fixed management terminal writes the set unlock key after the factory. Into a smart card and distribute it to various users.
  • the present disclosure provides a smart card authentication method, smart lock, smart card, system and device.
  • a smart card authentication method includes:
  • the smart card determine whether the smart card meets the first authentication condition
  • the smart card In response to receiving the feedback information of the smart card, the smart card is determined to be an authenticated smart card.
  • the determining whether the smart card meets the first authentication condition according to the authentication information provided by the smart card includes:
  • the authentication information includes the card identification and card status of the smart card
  • the card status is an unkeyed state
  • the card identification includes a designated number segment
  • the method further includes:
  • the sending the generated unlocking key to the smart card includes:
  • the determining that the smart card is an authenticated smart card in response to receiving the feedback information of the smart card includes:
  • the smart card In response to receiving feedback information that the smart card successfully decrypted the encrypted unlock key through the private key corresponding to the public key, the smart card is determined to be an authenticated smart card.
  • the method before sending the generated unlock key to the smart card, the method further includes:
  • the sending the generated unlocking key to the smart card includes:
  • the determining that the smart card is an authenticated smart card in response to receiving the feedback information of the smart card includes:
  • the smart card In response to receiving the smart card to decrypt the first encrypted information and verifying successful feedback information, the smart card is determined to be an authenticated smart card.
  • the method further includes:
  • the sending the generated transmission key to the smart card includes:
  • the acquiring the first random number of the smart card includes:
  • the method before determining whether the smart card meets the first authentication condition, the method further includes:
  • the method further includes:
  • the smart card In response to the result of the external authentication being that the authentication is passed, the smart card is authenticated to obtain the internal authentication result;
  • the smart lock In response to the internal authentication result being authentication passed, the smart lock is controlled to be opened.
  • the determining whether the smart card meets the second authentication condition includes:
  • the authentication information includes the card identification and card status of the smart card
  • the card status is a key issued state
  • the card identification characterizes the smart card as an authenticated smart card
  • the response to the smart card satisfying the second authentication condition to obtain the external authentication result of the smart card to the smart lock includes:
  • the responding to the external authentication result is that the authentication is passed, authenticating the smart card to obtain an internal authentication result, including:
  • a smart card authentication method includes:
  • the providing authentication information to the smart lock includes:
  • the authentication information includes a card identification and a card status of the smart card
  • the authentication information is used by the smart lock to determine that the card status is an unkeyed state
  • the card identification includes a designated number segment to determine the The smart card meets the first authentication condition.
  • the method further includes:
  • the digital certificate is verified by the smart lock to obtain the public key of the smart card, and the public key is used to encrypt the generated unlock key;
  • the receiving unlock key sent by the smart lock includes:
  • the method also includes:
  • the sending feedback information to the smart lock includes:
  • the method before sending feedback information to the smart lock, the method further includes:
  • the smart lock encrypts the generated unlock key based on the transmission key and the first random number to obtain the first encrypted information and returns;
  • the receiving unlock key sent by the smart lock includes:
  • the sending feedback information to the smart lock includes:
  • the first encrypted information is decrypted, and feedback information of successful verification is generated.
  • the method further includes:
  • the receiving the transmission key sent by the smart lock includes:
  • the method also includes:
  • the sending the generated first random number to the smart lock includes:
  • the method further includes:
  • the internal authentication result of the smart lock on the smart card is obtained, and the internal authentication result is used to control the opening of the smart lock when the authentication result is passing the authentication.
  • the providing authentication information to the smart lock includes:
  • the authentication information includes the card identification and card status of the smart card, and the authentication information is used for the smart lock to indicate when the card status is the issued key state and the card identification is in the white list
  • the smart card is an authenticated smart card, it is determined that the smart card meets the second authentication condition.
  • the external authentication of the smart lock to obtain an external authentication result includes:
  • the responding to the external authentication result is that the authentication is passed, and obtaining the internal authentication result of the smart lock on the smart card includes:
  • a smart lock includes:
  • a determining module configured to determine whether the smart card meets the first authentication condition according to the authentication information provided by the smart card
  • a sending module configured to send the generated unlock key to the smart card in response to the smart card satisfying the first authentication condition
  • the determining module is configured to determine the smart card as an authenticated smart card in response to receiving the feedback information of the smart card.
  • the determination module is configured to obtain the authentication information requested from the smart card, the authentication information includes the card identification and card status of the smart card; when it is determined that the card status is the unkeyed state, and the When the card identification includes a designated number segment, it is determined that the smart card satisfies the first authentication condition.
  • the smart lock further includes:
  • An obtaining module used to obtain a digital certificate requested from the smart card
  • a verification module for verifying the digital certificate to obtain the public key of the smart card
  • An encryption module for encrypting the generated unlock key using the public key
  • the sending module is used to send the encrypted unlock key to the smart card
  • the determining module is configured to determine that the smart card is an authenticated smart card in response to receiving feedback information that the smart card successfully decrypts the encrypted unlock key through the private key corresponding to the public key.
  • the smart lock further includes:
  • the sending module is used to send the generated transmission key to the smart card
  • An obtaining module configured to obtain the first random number generated by the smart card
  • the sending module is configured to encrypt the generated unlock key based on the transmission key and the first random number to obtain first encrypted information
  • the sending module is configured to send the first encrypted information to the smart card
  • the determining module is configured to determine the smart card as an authenticated smart card in response to receiving the smart card to decrypt the first encrypted information and verify successful feedback information.
  • the smart lock further includes:
  • the obtaining module is used to obtain the digital certificate requested from the smart card
  • a verification module for verifying the digital certificate to obtain the public key of the smart card
  • the sending module is configured to encrypt the transmission key by using the public key to obtain second encrypted information; and send the second encrypted information to the smart card.
  • the acquiring module is configured to receive third encrypted information sent by the smart card, and the third encrypted information is obtained by the smart card encrypting the first random number generated by using the transmission key ; Decrypt the third encrypted information using the transmission key to obtain the first random number.
  • the smart lock further includes:
  • the receiving module is used to receive the authentication trigger instruction from the third-party application
  • connection module is used to establish a connection with the smart card.
  • the smart lock further includes:
  • the determination module is used to determine whether the smart card meets the second authentication condition
  • An obtaining module configured to obtain an external authentication result of the smart card by the smart card in response to the smart card satisfying the second authentication condition
  • An authentication module configured to authenticate the smart card in response to the external authentication result being authenticated to obtain an internal authentication result
  • the control module is configured to control the smart lock to be opened in response to the internal authentication result indicating that the authentication is passed.
  • the determination module is configured to obtain the authentication information requested from the smart card, the authentication information includes the card identification and card status of the smart card; when it is determined that the card status is the issued key status, and the When the card identifier indicates that the smart card is an authenticated smart card, it is determined that the smart card meets the second authentication condition.
  • the acquisition module is configured to send a second random number acquisition request to the smart card, and the second random number acquisition request is used by the smart card to generate a second random number and return; Two random numbers; using the external authentication key in the pre-stored unlock key to encrypt the second random number to obtain fourth encrypted information; send the fourth encrypted information to the smart card, the first Four encrypted information is used for the smart card to decrypt using the external authentication key in the pre-stored unlock key to obtain the second random number, check the second random number to obtain the external authentication result and Return; receive the external authentication result sent by the smart card.
  • the authentication module is configured to send the generated third random number to the smart card, and the third random number is used by the smart card to use an internal authentication key in a pre-stored unlock key
  • the key is encrypted to obtain fifth encrypted information and returned; the fifth encrypted information is received; the fifth encrypted information is decrypted using an internal authentication key in a pre-stored unlock key to obtain the third random number Check the third random number to obtain the internal authentication result.
  • a smart card includes:
  • Information providing module used to provide authentication information to the smart lock
  • a receiving module configured to receive an unlock key sent by a smart lock, where the unlock key is sent when the smart lock determines that the smart card meets the first authentication condition according to the authentication information;
  • the sending module is used to send feedback information to the smart lock.
  • the information providing module is configured to provide authentication information to the smart lock in response to a request instruction for authentication information
  • the authentication information includes a card identification and a card status of the smart card
  • the authentication information is used by the smart lock to determine that the card status is an unkeyed state
  • the card identification includes a designated number segment to determine the The smart card meets the first authentication condition.
  • the sending module is configured to send the digital certificate to the smart lock in response to the request instruction for the digital certificate
  • the digital certificate is verified by the smart lock to obtain the public key of the smart card, and the public key is used to encrypt the generated unlock key;
  • the receiving module is configured to receive the encrypted unlock key sent by the smart lock
  • the smart card also includes:
  • a decryption module used to decrypt the encrypted unlocking key through a private key corresponding to the public key
  • the sending module is configured to send feedback information of successful decryption to the smart lock.
  • the receiving module is configured to receive the transmission key sent by the smart lock
  • the sending module is configured to send the generated first random number to the smart lock
  • the smart lock encrypts the generated unlock key based on the transmission key and the first random number to obtain the first encrypted information and returns;
  • the receiving module is configured to receive the first encrypted information sent by the smart lock
  • the sending module is configured to decrypt the first encrypted information based on the transmission key and the generated first random number, and generate feedback information that the verification is successful.
  • the sending module is configured to send the digital certificate to the smart lock in response to the request instruction for the digital certificate, and the digital certificate is verified by the smart lock to obtain the smart card ’s
  • the public key which is used to encrypt the generated transmission key to obtain second encrypted information
  • the receiving module is configured to receive the second encrypted information sent by the smart lock
  • the smart card also includes:
  • the obtaining module is configured to decrypt the second encrypted information by using the private key corresponding to the public key to obtain the transmission key.
  • the sending module is configured to encrypt the generated first random number by using the transmission key to obtain third encrypted information; and send the third encrypted information to the smart lock.
  • the smart card further includes:
  • the information providing module is used to provide authentication information to the smart lock
  • An authentication module configured to perform external authentication on the smart lock in response to the smart card satisfying the second authentication condition to obtain an external authentication result
  • the obtaining module is configured to obtain an internal authentication result of the smart lock on the smart card in response to the external authentication result being authenticated, and the internal authentication result is used to control the opening of the smart lock when the authentication result is authenticated.
  • the information providing module is configured to send the authentication information to the smart lock in response to the request instruction for the authentication information
  • the authentication information includes the card identification and card status of the smart card, and the authentication information is used for the smart lock to indicate when the card status is the issued key state and the card identification is in the white list
  • the smart card is an authenticated smart card, it is determined that the smart card meets the second authentication condition.
  • the authentication module is configured to receive a second random number acquisition request sent by the smart lock; generate a second random number; and send the second random number to the smart lock, the The second random number is encrypted by the smart lock using the external authentication key in the pre-stored unlock key to obtain fourth encrypted information and return; receive the fourth encrypted information; use the pre-stored unlock key The external authentication key decrypts the fourth encrypted information to obtain the second random number; based on the generated second random number, the second random number is checked to obtain the external authentication result.
  • the acquisition module is configured to receive the third random number sent by the smart lock; use the internal authentication key in the pre-stored unlock key to encrypt the third random number to obtain Fifth encrypted information; send the fifth encrypted information to the smart lock, and the fifth encrypted information is decrypted by the smart lock using an internal authentication key in a pre-stored unlock key to obtain the first Three random numbers, and check the third random number to obtain the internal authentication result.
  • a smart lock system comprising: the above-mentioned third aspect and the smart lock provided in any one embodiment of the third aspect, and the above-mentioned fourth aspect and fourth Aspect at least one smart card provided in any embodiment.
  • a smart card authentication device including:
  • Memory for storing instructions executable by the processor
  • the processor is configured to:
  • the smart card determine whether the smart card meets the first authentication condition
  • the smart card In response to receiving feedback from the smart card, the smart card is determined to be an authenticated smart card.
  • a smart card authentication device including:
  • Memory for storing instructions executable by the processor
  • the processor is configured to:
  • the generated unlock key is sent to the smart card, and upon receiving the feedback of the smart card, the smart card is authenticated, that is, the key distribution process is completed.
  • this process does not require the smart lock manufacturer to preset the unlock key, nor does it require the third party such as the cloud or data center to distribute the unlock key.
  • the smart lock first authenticates the smart card. After the authentication is passed, the smart lock itself generates the unlocking key locally and distributes it to the smart card, which not only reduces the complexity of the factory production link, but also reduces the participation of third parties and has higher security.
  • the smart lock when unlocking the smart lock, the smart lock interacts with the smart card to complete the smart lock card to the smart lock authentication and the smart lock to the smart card authentication. turn on. Based on the above unlocking authentication method, malicious copy attacks are effectively avoided, and the reliability and security of the smart lock are improved.
  • Fig. 1 is an architectural diagram of an intelligent door lock system according to an exemplary embodiment.
  • Fig. 2 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 3 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 4 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 5 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 6 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 7 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 8 is a flowchart of a smart card authentication method according to an exemplary embodiment.
  • Fig. 9 is a flow chart showing an unlocking authentication method according to an exemplary embodiment.
  • Fig. 10 is a flow chart showing an unlocking authentication method according to an exemplary embodiment.
  • Fig. 11 is a flow chart showing an unlocking authentication method according to an exemplary embodiment.
  • Fig. 12 is a block diagram of a smart lock according to an exemplary embodiment.
  • Fig. 13 is a block diagram of a smart card according to an exemplary embodiment.
  • Fig. 14 is a block diagram of a device for smart card authentication according to an exemplary embodiment.
  • FIG. 1 shows a smart door lock system to which the smart card authentication method provided by an embodiment of the present disclosure is applied.
  • the smart door lock system includes: a smart lock 101 and a smart card 102.
  • the smart lock 101 includes a front end and a back end.
  • the front end is composed of a card reader and an electronic lock cylinder, and is mainly responsible for data interaction between the back end and the outside world.
  • the card reader includes an NFC (Near-Field Communication) card reader, a Bluetooth card reader, etc., and is mainly responsible for data interaction with the smart card 102.
  • the electronic lock cylinder adds an electronic component to communicate with the external smart card.
  • the electronic lock cylinder has the function of a general mechanical lock cylinder on the one hand and the function of electronic identity authentication on the other.
  • the back end is composed of MCU (Microprogrammed Control Unit) and SE (Security Element), which is mainly responsible for smart card authentication and key distribution.
  • the key distribution is actually the process of adding the smart card ’s card identification to the whitelist .
  • Smart cards include merchant door cards that interact with smart locks, smart phones with short-distance communication functions, and physical keys.
  • business card There are two types of business card: physical card and virtual card.
  • the physical card is customized and produced by the merchant, and the virtual card is stored in the APP of the smartphone.
  • Smart phones with short-distance communication functions can simulate virtual cards to communicate with smart locks to transfer configuration information.
  • the physical key has the same appearance as the ordinary key, the difference is that a security chip is added, which can achieve the same function as the merchant's card. Except that the communication link is contact, the unlocking authentication process is consistent with the merchant's card, which can be understood as a merchant Another form of door card.
  • Smart cards belong to CPU (Central Processing Unit) cards. Each smart card has a unique identification code CID and digital certificate.
  • the CID can be composed of 16 digits, and the first 6 digits are the card issuer.
  • the identification code IIN (Issuer Identification Number) is used to classify smart cards.
  • the digital certificate is issued by the merchant and is unique on the entire network.
  • Fig. 2 is a flowchart of a smart card authentication method according to an exemplary embodiment. As shown in Fig. 2, the smart card authentication method may be used in a smart lock, including the following steps.
  • step S201 according to the authentication information provided by the smart card, it is determined whether the smart card satisfies the first authentication condition.
  • the authentication information includes the authentication information including the card identification and card status of the smart card.
  • the card status includes two states: unkey issued and key issued.
  • the smart lock needs to determine whether the smart card meets the first authentication condition.
  • the smart lock can check whether the card status is an unkeyed status and whether the card identification includes a designated number segment.
  • the process ends; if the card status is an issued key status, indicating that the smart card has been authenticated, the process ends; if the card status The key is not issued, but the card ID does not include the designated number segment, indicating that the card is not a smart card corresponding to the smart lock, the process ends; if the card status is the key unreleased state, and the card ID includes the specified number, the smart lock It is determined that the smart card meets the first authentication condition.
  • the designated number segment is the identification number of the card issuer, which is used to distinguish different smart cards.
  • the smart lock Before obtaining the authentication information provided by the smart card, the smart lock needs to establish a connection with the smart card.
  • the connection process can be triggered by a third-party application.
  • the smart lock can search for signals such as Bluetooth, wifi, infrared, NFC (Near Field Communication), and
  • the smart card establishes a connection. Further, based on the connection established with the smart card, the smart lock can obtain authentication information on the smart card side.
  • step S202 in response to the smart card satisfying the first authentication condition, the generated unlock key is sent to the smart card.
  • the smart lock In response to the smart card satisfying the first authentication condition, the smart lock generates an unlock key according to the card identification, and then sends the generated unlock key to the smart card.
  • the unlock key includes an internal authentication key and an external authentication key.
  • the external authentication key may be CCK (Card Control Key), which is used by the smart card to authenticate the smart lock during the unlock process; the internal
  • the authentication key may be IAK (Internal Authentication Key), which is used to authenticate the smart card by the smart lock during the unlocking process.
  • step S203 in response to receiving the feedback information of the smart card, the smart card is determined to be an authenticated smart card.
  • the smart lock determines the smart card as an authenticated smart card.
  • the smart lock terminal may maintain a white list, and the white list includes the card identification of the authenticated smart card. Therefore, when it is determined that the smart card is an authenticated smart card, the smart lock may also add the card identification of the smart card to the white list.
  • the method provided by the embodiment of the present disclosure based on the authentication information provided by the smart card, determines that the smart card meets the first authentication condition, sends the generated unlock key to the smart card, and completes the authentication of the smart card when receiving the feedback of the smart card.
  • This process does not require the smart lock manufacturer to preset the unlock key, but the smart lock first authenticates the smart card. After the authentication is passed, the smart lock itself generates the unlock key locally and distributes it to the smart card, which not only reduces the factory production link The complexity also reduces the participation of third parties and provides higher security.
  • the smart card authentication method can be used in smart cards, including the following steps:
  • step S301 authentication information is provided to the smart lock.
  • step S302 the unlock key sent by the smart lock is received.
  • the unlock key is sent when the smart lock determines that the smart card meets the first authentication condition according to the authentication information.
  • step S303 feedback information is sent to the smart lock.
  • the smart card In response to the received unlock key, the smart card sends feedback information to the smart lock, and the feedback information is used by the smart lock to determine the smart card as an authenticated smart card.
  • the method provided in the embodiment of the present disclosure provides the smart lock with authentication information, so that the smart lock can determine whether the smart card meets the first authentication condition based on the authentication information, and when it is determined that the smart card meets the first authentication condition, encrypt the generated unlocking key
  • the key is sent to the smart card, when the unlock key is received, the verification is performed, and the feedback information of successful verification is sent to the smart lock, thereby completing the authentication of the smart card.
  • This process does not need to generate an unlock key in advance, and based on the authentication information of the smart card and the unlock key generated by the smart lock, the authentication is performed in real time, and the authentication result is more reliable and safer.
  • FIG. 4 is a flowchart of a smart card authentication method according to an exemplary embodiment. As shown in FIG. 4, the smart card authentication method is used in a smart lock, including the following step.
  • step S401 according to the authentication information provided by the smart card, it is determined whether the smart card satisfies the first authentication condition.
  • step S402 in response to the smart card satisfying the first authentication condition, the digital certificate requested from the smart card is acquired.
  • the smart lock In response to the smart card satisfying the first authentication condition, the smart lock sends a digital certificate acquisition request to the smart card.
  • the smart card When receiving the digital certificate acquisition request, the smart card acquires the digital certificate according to the digital certificate acquisition request and sends the digital certificate to the smart lock.
  • step S403 the digital certificate is verified to obtain the public key of the smart card.
  • the digital certificate can be issued by the manufacturer and stored on the smart card end, and the smart lock end holds the public key of the issued certificate. Therefore, when the digital certificate is received, the smart lock is based on CA (Certificate Authority). The public key verifies the digital certificate, and the public key of the smart card can be obtained.
  • CA Certificate Authority
  • step S404 the public key is used to encrypt the generated unlock key.
  • the smart lock Based on the obtained public key of the smart card, the smart lock uses the public key to encrypt the generated unlock key. The security of the unlocking key during transmission is guaranteed.
  • step S405 the encrypted unlock key is sent to the smart card.
  • step S406 in response to receiving feedback information that the smart card successfully decrypts the encrypted unlock key through the private key corresponding to the public key, the smart card is determined to be an authenticated smart card.
  • the smart card authentication method can also be applied to smart cards, including the following steps:
  • step S501 authentication information is provided to the smart lock.
  • step S502 in response to the request instruction for the digital certificate, the digital certificate is sent to the smart lock.
  • step S503 the encrypted unlock key sent by the smart lock is received.
  • step S504 the encrypted unlock key is decrypted by the private key corresponding to the public key.
  • step S505 feedback information that the decryption is successful is sent to the smart lock.
  • the smart card When the encrypted unlock key is successfully decrypted using the private key corresponding to the public key, the smart card sends feedback information about the successful decryption to the smart lock. The feedback information is used by the smart lock to determine the smart card as an authenticated smart card.
  • FIG. 6 is a flowchart of a smart card authentication method according to an exemplary embodiment. As shown in FIG. 6, smart card authentication The method is used in the smart lock and includes the following steps.
  • step S601 according to the authentication information provided by the smart card, it is determined whether the smart card satisfies the first authentication condition.
  • step S602 in response to the smart card satisfying the first authentication condition, the generated transmission key is sent to the smart card.
  • the smart lock may randomly generate a transmission key and send the transmission key to the smart card.
  • the transmission key can be expressed by CTK (Card Transport Key).
  • step S603 the first random number generated by the smart card is obtained.
  • step S604 based on the transmission key and the first random number, the generated unlock key is encrypted to obtain first encrypted information.
  • the smart lock uses the transmission key and the first random number to encrypt the generated unlock key, and then performs MAC (Message Authentication Code) calculation on the encrypted information to obtain the first including MAC verification information. Encrypt the information.
  • MAC Message Authentication Code
  • step S605 the first encrypted information is sent to the smart card.
  • step S606 in response to receiving the smart card to decrypt the first encrypted information, and verifying the successful feedback information, the smart card is determined to be an authenticated smart card.
  • the smart card authentication method can also be used in smart cards, including the following steps:
  • step S701 authentication information is provided to the smart lock.
  • step S702 the transmission key sent by the smart lock is received.
  • step S703 the generated first random number is sent to the smart lock.
  • the smart card Based on the acquired transmission key, the smart card randomly generates a first random number and sends the first random number to the smart lock.
  • the smart card can also obtain the IV (Initialization Vector) of the first random number, and then send the IV of the first random number to the smart lock.
  • IV Initialization Vector
  • step S704 the first encrypted information sent by the smart lock is received.
  • step S705 based on the transmission key and the generated first random number, the first encrypted information is decrypted, and feedback information that the verification is successful is generated.
  • the smart card uses the generated first random number and the pre-stored transmission key to decrypt the first encrypted information to obtain the unlock key, and performs MAC calculation on the unlock key to obtain MAC verification information, and then compare the MAC verification information with the MAC verification information generated by the smart lock terminal, if the MAC verification information is the same as the MAC verification information generated by the smart lock terminal, it is determined that the verification is successful, and Send feedback information of successful verification to the smart lock.
  • the smart lock in order to improve the security of the transmitted transmission key, will also obtain the digital certificate requested from the smart card and verify the digital certificate to obtain the public key of the smart card.
  • the public key encrypts the transmission key to obtain second encrypted information, and then sends the second encrypted information to the smart card.
  • the smart card uses the private key corresponding to the public key to decrypt the second encrypted information to obtain the transmission key.
  • the smart card in order to improve the security of the transmitted first random number, the smart card will also use the transmission key to encrypt the generated first random number to obtain third encrypted information, and then the third 3.
  • the encrypted information is sent to the smart lock.
  • the smart lock uses the transmission key to decrypt the third encrypted information to obtain the first random number.
  • the smart card can also obtain the IV of the first random number, and encrypt the IV of the first random number using the transmission key to obtain third encrypted information, and then send the third encrypted information to the smart lock, when the smart card is received
  • the smart lock uses the transmission key to decrypt the third encrypted information to obtain the IV of the first random number.
  • the smart lock sends an information acquisition instruction for requesting authentication information to the smart card.
  • the smart card acquires the CID and card status of the smart card, and sends the CID and card status to the smart lock, and the smart lock checks Whether the CID card number segment includes the specified number segment, and check whether the card status is in the unkeyed state.
  • a digital certificate acquisition instruction is sent to the smart card.
  • the smart card acquires the digital certificate and sends the digital certificate to the smart lock.
  • the smart lock uses the CA public key to verify the digital certificate, obtain the smart card's public key, and generate a CTK, which in turn uses the smart card's public key.
  • the key encrypts the CTK and sends the encrypted CTK to the smart card.
  • the smart card uses the private key corresponding to the public key to decrypt the encrypted CTK to obtain the CTK, and then generates an 8-byte random number and obtains an 8-byte random number IV, and then send the 8-byte random number IV to the smart lock.
  • the smart lock When receiving the 8-byte random number IV, the smart lock generates CCK and IAK, and uses the CTK and 8-byte random number IV to CCK and IAK encrypts, and then performs MAC calculation to obtain encrypted information including MAC check information, and then sends the encrypted information to the smart card.
  • the smart card uses CTK and 8-byte random number IV to encrypt the encrypted information Decrypt to get CCK and IAK. Then, the smart card performs MAC calculation on CCK and IAK to obtain MAC verification information, and sends a verification success message to the smart lock when the MAC verification information is the same as the MAC verification information of the smart lock end So that the smart lock adds the CID of the smart card to the white list.
  • Fig. 9 is a flowchart of a smart card authentication method according to an exemplary embodiment. As shown in Fig. 9, the unlocking authentication method is used in a smart lock and includes the following steps.
  • step S901 according to the authentication information provided by the smart card, it is determined whether the smart card satisfies the second authentication condition.
  • the smart lock Based on the authentication information provided by the smart card, the smart lock needs to determine whether the smart card meets the second authentication condition, so that when the smart card meets the second authentication condition, a subsequent authentication process is performed.
  • the smart lock determines whether the smart card satisfies the second authentication condition, it includes but is not limited to the following ways: the smart lock checks whether the card status in the authentication information is an unkeyed state, and checks whether the card ID is an authenticated smart card ID, if the card status is the unkeyed status, the process ends; if the card status is the issued key status and the card ID is the card ID of the authenticated smart card, the smart lock determines that the smart card meets the second authentication condition.
  • step S902 in response to the smart card satisfying the second authentication condition, the external authentication result of the smart card to the smart lock is obtained.
  • the smart lock When it is determined that the smart card meets the second authentication condition, the smart lock sends a second random number acquisition request to the smart card.
  • the smart card When receiving the second random number acquisition request, the smart card generates a second random number according to the second random number acquisition request The second random number is sent to the smart lock.
  • the smart lock uses the external authentication key in the pre-stored unlock key to encrypt the second random number to obtain the fourth encrypted information, and then the The fourth encrypted information is sent to the smart card.
  • the smart card When receiving the fourth encrypted information, the smart card decrypts the fourth encrypted information using the external authentication key in the pre-stored unlock key to obtain a second random number, and according to the generated second random number, decrypts the obtained The second random number is checked to obtain the external authentication result. If the generated second random number is the same as the decrypted second random number, the external authentication result of the authentication is obtained; if the generated second random number is different from the decrypted second random number, the authentication fails External certification results.
  • step S903 in response to the external authentication result being authentication passed, the smart card is authenticated to obtain the internal authentication result.
  • the smart lock In response to the external authentication result indicating that the authentication is passed, the smart lock generates a third random number and sends the generated third random number to the smart card.
  • the smart card uses the internal The authentication key is encrypted to obtain the fifth encrypted information, and the fifth encrypted information is sent to the smart lock.
  • the smart lock uses the internal authentication key in the pre-stored unlock key to pair the fifth Decrypt the encrypted information to obtain a third random number, and check the decrypted third random number according to the generated third random number to obtain an internal authentication result. If the generated third random number is the same as the decrypted third random number, the internal authentication result of the authentication is obtained; if the generated third random number is different from the decrypted third random number, the authentication fails Results of the internal certification.
  • step S904 in response to the internal authentication result being authentication passed, the smart lock is controlled to be opened.
  • the smart lock and the smart card confirm each other as a trusted device, and then control the smart lock to open.
  • unlocking authentication method will also be applied to smart cards, including the following steps:
  • step S1001 authentication information is provided to the smart lock.
  • the smart lock can send an information acquisition instruction for providing authentication information to the smart card.
  • the smart card acquires the authentication information and sends the authentication information to the smart lock.
  • the authentication information includes the authentication information including the card identification and card status of the smart card.
  • the card status includes two states: unkey issued and key issued.
  • step S1002 in response to the smart card satisfying the second authentication condition, the smart lock is externally authenticated to obtain an external authentication result.
  • step S1003 in response to the external authentication result being authentication passed, the internal authentication result of the smart lock on the smart card is acquired.
  • the internal authentication result is used to control the smart lock to open when the authentication result is that the authentication is passed.
  • the method provided by the embodiment of the present disclosure when unlocking the smart lock, interacts with the smart card through the smart lock to complete the authentication of the smart lock card to the smart lock and the authentication of the smart lock to the smart card, and the authentication result is authentication in two times When passed, the control can be unlocked. Based on the above unlocking authentication method, malicious copy attacks are effectively avoided, and the reliability and security of the smart lock are improved.
  • the smart card when receiving an information acquisition instruction for requesting authentication information, acquires the CID and card status of the smart card, and sends the CID and card status to the smart lock.
  • the smart lock checks whether the card status is the issued key status. And check whether the CID is in the white list, when the card status is in the key issued state, and the CID is in the white list, send the challenge number acquisition request to the smart card, when receiving the challenge number acquisition request, the smart card generates a challenge number, and the The generated challenge number is sent to the smart lock.
  • the smart lock uses the pre-stored CCK to encrypt the challenge number and send the encrypted information to the smart card.
  • the smart card uses the pre-stored CCK to decrypt the encrypted information to obtain Challenge the number, and verify the decrypted random number according to the generated random number.
  • the authentication fails and the authorization is stopped; when the generated random number and the decrypted result When the random numbers are the same, the authentication is successful, and the authentication proceeds to the next step.
  • the smart lock generates a random number and sends the generated random number to the smart card.
  • the smart card uses the pre-stored IAK to encrypt the random number to obtain encrypted information, and sends the encrypted information to the smart lock.
  • the smart The lock uses the pre-stored IAK to decrypt the encrypted information to obtain a random number, and checks the decrypted random number based on the generated random number. When the generated random number is the same as the decrypted random number, the authentication passes , And control the smart lock to open.
  • Fig. 12 is a block diagram of a smart lock according to an exemplary embodiment.
  • the smart lock includes: a determination module 1201 and a sending module 1202.
  • the determining module 1201 is configured to determine whether the smart card meets the first authentication condition according to the authentication information provided by the smart card;
  • the sending module 1202 is configured to send the generated unlock key to the smart card in response to the smart card satisfying the first authentication condition
  • the determination module 1201 is configured to determine the smart card as an authenticated smart card in response to receiving the feedback information of the smart card.
  • the determination module 1201 is configured to obtain the authentication information requested from the smart card.
  • the authentication information includes the card identification and card status of the smart card; When specifying the number segment, it is determined that the smart card meets the first authentication condition.
  • the smart lock further includes: an acquisition module, a verification module, and an encryption module.
  • the obtaining module is configured to obtain the digital certificate requested from the smart card
  • the verification module is configured to verify the digital certificate to obtain the public key of the smart card
  • the encryption module is configured to use the public key to encrypt the generated unlock key
  • the sending module 1202 times is configured to send the encrypted unlock key to the smart card
  • the determination module 1201 is configured to determine that the smart card is an authenticated smart card in response to receiving feedback information that the smart card successfully decrypts the encrypted unlock key through the private key corresponding to the public key.
  • the smart lock further includes: an acquisition module.
  • the sending module 1202 is configured to send the generated transmission key to the smart card
  • the obtaining module is configured to obtain the first random number generated by the smart card
  • the sending module 1202 is configured to perform encryption processing on the generated unlock key based on the transmission key and the first random number to obtain first encrypted information
  • the sending module 1202 is configured to send the first encrypted information to the smart card
  • the determination module 1201 is configured to determine that the smart card is an authenticated smart card in response to receiving the smart card to decrypt the first encrypted information and verify the successful feedback information.
  • the smart lock further includes: an acquisition module and a verification module.
  • the obtaining module is configured to obtain the digital certificate requested from the smart card
  • the verification module is configured to verify the digital certificate to obtain the public key of the smart card
  • the sending module 1202 is configured to encrypt the transmission key with the public key to obtain second encrypted information; and send the second encrypted information to the smart card.
  • the acquisition module is configured to receive third encrypted information sent by the smart card, and the third encrypted information is obtained by encrypting the first random number generated by the smart card using the transmission key; using the transmission key Decrypt the third encrypted information to obtain the first random number.
  • the smart lock further includes: a receiving module and a connecting module.
  • the receiving module is configured to receive an authentication trigger instruction from a third-party application
  • the connection module is configured to establish a connection with the smart card.
  • the smart lock further includes: an acquisition module, an authentication module, and a control module.
  • the determination module 1201 is configured to determine whether the smart card meets the second authentication condition
  • the obtaining module is configured to obtain the external authentication result of the smart card on the smart lock in response to the smart card satisfying the second authentication condition;
  • the authentication module is configured to respond to an external authentication result that the authentication is passed, authenticate the smart card, and obtain an internal authentication result;
  • the control module is configured to control the smart lock to open in response to the internal authentication result being authenticated.
  • the determination module 1201 is configured to obtain the authentication information requested from the smart card.
  • the authentication information includes the card identification and card status of the smart card; When the smart card is an authenticated smart card, it is determined that the smart card meets the second authentication condition.
  • the acquisition module is configured to send a second random number acquisition request to the smart card, the second random number acquisition request is used by the smart card to generate a second random number and return; receive the second random number;
  • the external authentication key in the pre-stored unlock key encrypts the second random number to obtain the fourth encrypted information; the fourth encrypted information is sent to the smart card, and the fourth encrypted information is used for the smart card to use the pre-stored unlock key
  • the external authentication key in is decrypted to obtain the second random number, and the second random number is verified to obtain the external authentication result and return; receive the external authentication result sent by the smart card.
  • the authentication module is configured to send the generated third random number to the smart card, and the third random number is used for the smart card to encrypt using the internal authentication key in the pre-stored unlock key , Get the fifth encrypted information and return; receive the fifth encrypted information; use the internal authentication key in the pre-stored unlock key to decrypt the fifth encrypted information to obtain the third random number; check the third random number To get the internal certification result.
  • the generated unlock key is sent to the smart card for verification by the smart card, and a feedback of successful verification is received At the time, the authentication of the smart card is completed.
  • This process does not need to generate an unlock key in advance, and based on the authentication information of the smart card and the unlock key generated by the smart lock, the authentication is performed in real time, and the authentication result is more reliable and safer.
  • the smart lock when unlocking the smart lock, the smart lock interacts with the smart card to complete the smart lock card to the smart lock authentication and the smart lock to the smart card authentication. turn on. Based on the above unlocking authentication method, malicious copy attacks are effectively avoided, and the reliability and security of the smart lock are improved.
  • Fig. 13 is a block diagram of a smart card according to an exemplary embodiment.
  • the smart card includes: an information providing module 1301, a receiving module 1302, and a sending module 1303.
  • the information providing module 1301 is configured to provide authentication information to the smart lock
  • the receiving module is configured to receive an unlock key sent by the smart lock, and the unlock key is sent when the smart lock determines that the smart card meets the first authentication condition according to the authentication information;
  • the sending module 1303 is configured to send feedback information to the smart lock.
  • the information providing module 1301 is configured to provide authentication information to the smart lock in response to a request instruction for authentication information
  • the authentication information includes the card identification and the card status of the smart card.
  • the authentication information is used by the smart lock to determine that the card status is the unkeyed state, and when the card identification includes a designated number segment, it is determined that the smart card meets the first authentication condition.
  • the sending module 1303 is configured to send the digital certificate to the smart lock in response to the request instruction for the digital certificate
  • the digital certificate is verified by the smart lock to obtain the public key of the smart card, and the public key is used to encrypt the generated unlock key;
  • the receiving module 1302 is configured to receive the encrypted unlock key sent by the smart lock
  • the smart card also includes: a decryption module.
  • the decryption module is configured to decrypt the encrypted unlock key with the private key corresponding to the public key;
  • the sending module 1303 is configured to send feedback information of successful decryption to the smart lock.
  • the receiving module 1302 is configured to receive the transmission key sent by the smart lock
  • the sending module 1303 is configured to send the generated first random number to the smart lock
  • the smart lock encrypts the generated unlock key based on the transmission key and the first random number to obtain the first encrypted information and returns;
  • the receiving module 1302 is configured to receive the first encrypted information sent by the smart lock
  • the sending module 1303 is configured to decrypt the first encrypted information based on the transmission key and the generated first random number, and generate feedback information that the verification is successful.
  • the sending module 1303 is configured to send the digital certificate to the smart lock in response to the request instruction for the digital certificate.
  • the digital certificate is verified by the smart lock to obtain the public key of the smart card.
  • the public key is used to encrypt the generated transmission key to obtain second encrypted information;
  • the receiving module 1302 is configured to receive the second encrypted information sent by the smart lock
  • the smart card also includes: an acquisition module.
  • the acquisition module is configured to decrypt the second encrypted information by using the private key corresponding to the public key to obtain the transmission key.
  • the sending module 1303 is configured to encrypt the first random number generated using the transmission key to obtain third encrypted information; and send the third encrypted information to the smart lock.
  • the smart card further includes: an authentication module and an acquisition module.
  • the information providing module 1301 is configured to provide authentication information to the smart lock
  • the authentication module is configured to perform external authentication on the smart lock in response to the smart card satisfying the second authentication condition and obtain an external authentication result;
  • the obtaining module is configured to obtain the internal authentication result of the smart lock on the smart card in response to the external authentication result being authenticated, and the internal authentication result is used to control the opening of the smart lock when the authentication result is authenticated.
  • the information providing module 1301 is configured to send the authentication information to the smart lock in response to the request instruction for the authentication information
  • the authentication information includes the card identification and the card status of the smart card, and the authentication information is used when the smart lock is in the issued key state when the card status is in the white list and the smart card is an authenticated smart card when the card identification is in the white list, it is determined that the smart card meets the second authentication condition .
  • the authentication module is configured to receive the second random number acquisition request sent by the smart lock; generate a second random number; and send the second random number to the smart lock, the second random number is
  • the smart lock is encrypted with the external authentication key in the pre-stored unlock key to obtain the fourth encrypted information and return; receive the fourth encrypted information; use the external authentication key in the pre-stored unlock key to pair the fourth encrypted information Perform decryption to obtain a second random number; based on the generated second random number, verify the second random number to obtain an external authentication result.
  • the acquisition module is configured to receive the third random number sent by the smart lock; the third random number is encrypted using the internal authentication key in the pre-stored unlock key to obtain the third Five encrypted information; send the fifth encrypted information to the smart lock, the fifth encrypted information is decrypted by the smart lock using the internal authentication key in the pre-stored unlock key to obtain the third random number, and the third random number is processed Verification, get internal certification results.
  • the smart card provided by the embodiment of the present disclosure, by providing authentication information to the smart lock, enables the smart lock to determine whether the smart card meets the first authentication condition based on the authentication information, and when it is determined that the smart card meets the first authentication condition, the generated unlock key
  • the key is sent to the smart card, when the unlock key is received, the verification is performed, and the feedback information of successful verification is sent to the smart lock, thereby completing the authentication of the smart card.
  • This process does not need to generate an unlock key in advance, and based on the authentication information of the smart card and the unlock key generated by the smart lock, the authentication is performed in real time, and the authentication result is more reliable and safer.
  • the smart lock when unlocking the smart lock, the smart lock interacts with the smart card to complete the smart lock card to the smart lock authentication and the smart lock to the smart card authentication. turn on. Based on the above unlocking authentication method, malicious copy attacks are effectively avoided, and the reliability and security of the smart lock are improved.
  • An embodiment of the present disclosure also provides a smart lock system, including the smart lock provided by any of the foregoing embodiments, and at least one smart card provided by any of the foregoing embodiments.
  • Fig. 14 is a block diagram of a device 1400 for smart card authentication according to an exemplary embodiment.
  • the device 1400 may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and so on.
  • the device 1400 may include one or more of the following components: a processing component 1402, a memory 1404, a power supply component 1406, a multimedia component 1408, an audio component 1410, an input / output (I / O) interface 1412, a sensor component 1414, and Communication component 1416.
  • the processing component 1402 generally controls the overall operations of the device 1400, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 1402 may include one or more processors 1420 to execute instructions to complete all or part of the steps in the above method.
  • the processing component 1402 may include one or more modules to facilitate interaction between the processing component 1402 and other components.
  • the processing component 1402 may include a multimedia module to facilitate interaction between the multimedia component 1408 and the processing component 1402.
  • the memory 1404 is configured to store various types of data to support operation at the device 1400. Examples of these data include instructions for any application or method operating on the device 1400, contact data, phone book data, messages, pictures, videos, and so on.
  • the memory 1404 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable and removable Programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable and removable Programmable read only memory
  • PROM programmable read only memory
  • ROM read only memory
  • magnetic memory flash memory
  • flash memory magnetic disk or optical disk.
  • the power supply component 1406 provides power to various components of the device 1400.
  • the power component 1406 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 1400.
  • the multimedia component 1408 includes a screen between the device 1400 and the user that provides an output interface.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, swipe, and gestures on the touch panel. The touch sensor may not only sense the boundary of the touch or sliding action, but also detect the duration and pressure related to the touch or sliding operation.
  • the multimedia component 1408 includes a front camera and / or a rear camera. When the device 1400 is in an operation mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 1410 is configured to output and / or input audio signals.
  • the audio component 1410 includes a microphone (MIC).
  • the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 1404 or sent via the communication component 1416.
  • the audio component 1410 further includes a speaker for outputting audio signals.
  • the I / O interface 1412 provides an interface between the processing component 1402 and a peripheral interface module.
  • the peripheral interface module may be a keyboard, a click wheel, or a button. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor assembly 1414 includes one or more sensors for providing the device 1400 with various aspects of status assessment.
  • the sensor component 1414 can detect the on / off state of the device 1400, and the relative positioning of the components, for example, the component is the display and keypad of the device 1400, and the sensor component 1414 can also detect the position change of the device 1400 or one component of the device 1400 The presence or absence of user contact with the device 1400, the orientation or acceleration / deceleration of the device 1400, and the temperature change of the device 1400.
  • the sensor assembly 1414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact.
  • the sensor assembly 1414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor assembly 1414 may further include an acceleration sensor, a gyro sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
  • the communication component 1416 is configured to facilitate wired or wireless communication between the device 1400 and other devices.
  • the device 1400 may access a wireless network based on a communication standard, such as WiFi, 2G, or 3G, or a combination thereof.
  • the communication component 1416 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 1416 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the apparatus 1400 may be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable A gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are implemented to perform the above method.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • DSPDs digital signal processing devices
  • PLDs programmable logic devices
  • FPGA field programmable A gate array
  • controller microcontroller, microprocessor or other electronic components are implemented to perform the above method.
  • a non-transitory computer-readable storage medium including instructions such as a memory 1404 including instructions.
  • the above instructions can be executed by the processor 1420 of the device 1400 to complete the above method.
  • the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, or the like.
  • a non-transitory computer-readable storage medium when instructions in the storage medium are executed by a processor of a mobile terminal, enable the mobile terminal to perform a smart card authentication method.
  • the device provided by the embodiment of the present disclosure based on the authentication information provided by the smart card, determines that the smart card satisfies the first authentication condition, sends the generated unlock key to the smart card, and the smart card performs verification, and upon receiving the feedback of successful verification To complete the authentication of the smart card.
  • This process does not need to generate an unlock key in advance, and based on the authentication information of the smart card and the unlock key generated by the smart lock, the authentication is performed in real time, and the authentication result is more reliable and safer.
  • the smart lock when unlocking the smart lock, the smart lock interacts with the smart card to complete the smart lock card to the smart lock authentication and the smart lock to the smart card authentication. turn on. Based on the above unlocking authentication method, malicious copy attacks are effectively avoided, and the reliability and security of the smart lock are improved.

Abstract

本公开是关于一种智能卡认证方法、智能锁、智能卡、系统及装置,属于物联网技术领域。所述方法包括:根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡。本公开基于智能卡提供的认证信息确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,由智能卡进行校验,并在接收到校验成功的反馈时,完成对智能卡的认证。该过程无需预先生成开锁密钥,且基于智能卡的认证信息及智能锁所生成的开锁密钥实时进行认证,认证结果更可靠、更安全。 (图2)

Description

智能卡认证方法、智能锁、智能卡、系统及装置
本申请基于申请号为201811410112.9、申请日为2018年11月23日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
技术领域
本公开涉及物联网技术领域,尤其涉及一种智能卡认证方法、智能锁、智能卡、系统及装置。
背景技术
随着物联网技术的发展,智能生活理念逐渐走入用户的生活中,用户对智能家居产品的需求量越来越大。在众多智能家居产品中,智能锁具有独特的应用场景,被广泛应用于公寓、住宅、写字楼等场景中。智能卡作为智能锁的钥匙,通过与智能锁进行交互实现认证,进而基于所认证的智能卡,可以快速打开智能锁。与传统的开锁方式相比,该种方式操作更便捷,安全性更高。
目前,智能锁主要基于预先设置的开锁密钥对智能卡进行认证,这就需要智能锁厂商在智能锁出厂前预先设置开锁密钥,在出厂后由固定的管理终端将所设置的开锁密钥写入到智能卡中,并分发给各个用户。
发明内容
本公开提供一种智能卡认证方法、智能锁、智能卡、系统及装置。
根据本公开实施例的第一方面,提供一种智能卡认证方法,所述方法包括:
根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;
响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;
响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡。
在一个实施例中,所述根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件,包括:
获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;
当确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
在一个实施例中,所述方法还包括:
获取从所述智能卡请求的数字证书;
对所述数字证书进行校验,得到所述智能卡的公钥;
采用所述公钥对生成的开锁密钥进行加密;
所述将生成的开锁密钥发送至所述智能卡,包括:
将加密的开锁密钥发送至所述智能卡;
所述响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡,包括:
响应于接收到所述智能卡通过与所述公钥对应的私钥对所述加密的开锁密钥解密成功的反馈信息,将所述智能卡确定为已认证智能卡。
在一个实施例中,在将生成的开锁密钥发送至所述智能卡之前,还包括:
将生成的传输密钥发送至所述智能卡;
获取所述智能卡生成的第一随机数;
所述将生成的开锁密钥发送至所述智能卡,包括:
基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息;
将所述第一加密信息发送至所述智能卡;
所述响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡,包括:
响应于接收到所述智能卡对所述第一加密信息进行解密,并校验成功的反馈信息,将所述智能卡确定为已认证智能卡。
在一个实施例中,所述方法还包括:
获取从所述智能卡请求的数字证书;
对所述数字证书进行校验,得到所述智能卡的公钥;
所述将所生成的传输密钥发送至所述智能卡,包括:
采用所述公钥对所述传输密钥进行加密,得到第二加密信息;
将所述第二加密信息发送至所述智能卡。
在一个实施例中,所述获取所述智能卡的第一随机数,包括:
接收所述智能卡发送的第三加密信息,所述第三加密信息由所述智能卡采用所述传输密钥对所生成的第一随机数加密得到;
采用所述传输密钥对所述第三加密信息进行解密,得到所述第一随机数。
在一个实施例中,所述确定智能卡是否满足第一认证条件之前,还包括:
从第三方应用接收认证触发指令;
与所述智能卡建立连接。
在一个实施例中,将所述智能卡确定为已认证智能卡之后,还包括:
确定所述智能卡是否满足第二认证条件;
响应于所述智能卡满足第二认证条件,获取所述智能卡对智能锁的外部认证结果;
响应于所述外部认证结果为认证通过,对所述智能卡进行认证,得到内部认证结果;
响应于所述内部认证结果为认证通过,控制所述智能锁打开。
在一个实施例中,所述确定所述智能卡是否满足第二认证条件,包括:
获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;
当确定所述卡状态为已发钥匙状态,且所述卡标识表征所述智能卡为已认证智能卡时,确定所述智能卡满足第二认证条件。
在一个实施例中,所述响应于所述智能卡满足第二认证条件,获取所述智能卡对所述智能锁的外部认证结果,包括:
向所述智能卡发送第二随机数获取请求,所述第二随机数获取请求用于所述智能卡生成第二随机数并返回;
接收所述第二随机数;
采用预先存储的开锁密钥中的外部认证密钥,对所述第二随机数进行加密,得到第四加密信息;
将所述第四加密信息发送至所述智能卡,所述第四加密信息用于所述智能卡采用预先存储的开锁密钥中的外部认证密钥进行解密,得到所述第二随机数,对所述第二随机数进行校验,得到所述外部认证结果并返回;
接收所述智能卡发送的所述外部认证结果。
在一个实施例中,所述响应于所述外部认证结果为认证通过,对所述智能卡进行认证,得到内部认证结果,包括:
将所生成的第三随机数发送至所述智能卡,所述第三随机数用于所述智能卡采用预先存储的开锁密钥中的内部认证密钥进行加密,得到第五加密信息并返回;
接收所述第五加密信息;
采用预先存储的开锁密钥中的内部认证密钥对所述第五加密信息进行解密,得到所述第三随机数;
对所述第三随机数进行校验,得到所述内部认证结果。
根据本公开实施例的第二方面,提供一种智能卡认证方法,所述方法包括:
向智能锁提供认证信息;
接收智能锁发送的开锁密钥,所述开锁密钥为所述智能锁根据所述认证信息确定所述智能卡满足第一认证条件时发送;
向所述智能锁发送反馈信息。
在一个实施例中,所述向智能锁提供认证信息,包括:
响应于对认证信息的请求指令,向智能锁提供认证信息;
其中,所述认证信息包括智能卡的卡标识和卡状态,所述认证信息用于所述智能锁确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
在一个实施例中,所述方法还包括:
响应于对数字证书的请求指令,将数字证书发送至所述智能锁;
其中,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,所述公钥用于对所生成的开锁密钥进行加密;
所述接收智能锁发送的开锁密钥,包括:
接收所述智能锁发送的加密的开锁密钥;
所述方法还包括:
通过与所述公钥对应的私钥对所述加密的开锁密钥进行解密;
所述向所述智能锁发送反馈信息,包括:
向所述智能锁发送解密成功的反馈信息。
在一个实施例中,所述向所述智能锁发送反馈信息之前,还包括:
接收所述智能锁发送的传输密钥;
将所生成的第一随机数发送至所述智能锁;
其中,由所述智能锁基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息并返回;
所述接收智能锁发送的开锁密钥,包括:
接收智能锁发送的第一加密信息;
所述向所述智能锁发送反馈信息,包括:
基于所述传输密钥和所生成的第一随机数,对所述第一加密信息进行解密,并生成校验成功的反馈信息。
在一个实施例中,所述方法还包括:
响应于对数字证书的请求指令,将数字证书发送至所述智能锁,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,采用所述公钥用于对所生成的传输密钥进行加密,得到第二加密信息;
所述接收所述智能锁发送的传输密钥,包括:
接收所述智能锁发送的所述第二加密信息;
所述方法还包括:
通过与所述公钥对应的私钥对所述第二加密信息进行解密,得到传输密钥。
在一个实施例中,所述将所生成的第一随机数发送至所述智能锁,包括:
采用所述传输密钥对所生成的第一随机数进行加密,得到第三加密信息;
将所述第三加密信息发送至所述智能锁。
在一个实施例中,所述方法还包括:
向所述智能锁提供认证信息;
响应于智能卡满足第二认证条件,对所述智能锁进行外部认证,得到外部认证结果;
响应于所述外部认证结果为认证通过,获取所述智能锁对智能卡的内部认证结果,所述内部认证结果用于在认证结果为认证通过时,控制所述智能锁打开。
在一个实施例中,所述向所述智能锁提供认证信息,包括:
响应于对认证信息的请求指令,将认证信息发送至所述智能锁;
其中,所述认证信息包括所述智能卡的卡标识和卡状态,所述认证信息用于所述智能 锁在所述卡状态为已发钥匙状态,且所述卡标识位于所述白名单时表征所述智能卡为已认证智能卡时,确定智能卡满足第二认证条件。
在一个实施例中,所述对所述智能锁进行外部认证,得到外部认证结果,包括:
接收所述智能锁发送的第二随机数获取请求;
生成第二随机数;并
将所述第二随机数发送至所述智能锁,所述第二随机数由所述智能锁采用预先存储的开锁密钥中的外部认证密钥进行加密,得到第四加密信息并返回;
接收所述第四加密信息;
采用预先存储的开锁密钥中的外部认证密钥对所述第四加密信息进行解密,得到所述第二随机数;
根据所生成的第二随机数,对所述第二随机数进行校验,得到所述外部认证结果。
在一个实施例中,所述响应于所述外部认证结果为认证通过,获取所述智能锁对智能卡的内部认证结果,包括:
接收所述智能锁发送的第三随机数;
采用预先存储的开锁密钥中的内部认证密钥,对所述第三随机数进行加密,得到第五加密信息;
将所述第五加密信息发送至所述智能锁,所述第五加密信息由所述智能锁采用预先存储的开锁密钥中的内部认证密钥进行解密,得到所述第三随机数,并对所述第三随机数进行校验,得到所述内部认证结果。
根据本公开实施例的第三方面,提供一种智能锁,所述智能锁包括:
确定模块,用于根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;
发送模块,用于响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;
所述确定模块,用于响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡。
在一个实施例中,所述确定模块,用于获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;当确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
在一个实施例中,所述智能锁还包括:
获取模块,用于获取从所述智能卡请求的数字证书;
校验模块,用于对所述数字证书进行校验,得到所述智能卡的公钥;
加密模块,用于采用所述公钥对生成的开锁密钥进行加密;
所述发送模块,用于将加密的开锁密钥发送至所述智能卡;
所述确定模块,用于响应于接收到所述智能卡通过与所述公钥对应的私钥对所述加密的开锁密钥解密成功的反馈信息,将所述智能卡确定为已认证智能卡。
在一个实施例中,所述智能锁还包括:
所述发送模块,用于将生成的传输密钥发送至所述智能卡;
获取模块,用于获取所述智能卡生成的第一随机数;
所述发送模块,用于基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息;
所述发送模块,用于将所述第一加密信息发送至所述智能卡;
所述确定模块,用于响应于接收到所述智能卡对所述第一加密信息进行解密,并校验成功的反馈信息,将所述智能卡确定为已认证智能卡。
在一个实施例中,所述智能锁还包括:
所述获取模块,用于获取从所述智能卡请求的数字证书;
校验模块,用于对所述数字证书进行校验,得到所述智能卡的公钥;
所述发送模块,用于采用所述公钥对所述传输密钥进行加密,得到第二加密信息;将所述第二加密信息发送至所述智能卡。
在一个实施例中,所述获取模块,用于接收所述智能卡发送的第三加密信息,所述第三加密信息由所述智能卡采用所述传输密钥对所生成的第一随机数加密得到;采用所述传输密钥对所述第三加密信息进行解密,得到所述第一随机数。
在一个实施例中,所述智能锁还包括:
接收模块,用于从第三方应用接收认证触发指令;
连接模块,用于与所述智能卡建立连接。
在一个实施例中,所述智能锁还包括:
所述确定模块,用于确定所述智能卡是否满足第二认证条件;
获取模块,用于响应于所述智能卡满足第二认证条件,获取所述智能卡对智能锁的外部认证结果;
认证模块,用于响应于所述外部认证结果为认证通过,对所述智能卡进行认证,得到内部认证结果;
控制模块,用于响应于所述内部认证结果为认证通过,控制所述智能锁打开。
在一个实施例中,所述确定模块,用于获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;当确定所述卡状态为已发钥匙状态,且所述卡标识表征所述智能卡为已认证智能卡时,确定所述智能卡满足第二认证条件。
在一个实施例中,所述获取模块,用于向所述智能卡发送第二随机数获取请求,所述第二随机数获取请求用于所述智能卡生成第二随机数并返回;接收所述第二随机数;采用预先存储的开锁密钥中的外部认证密钥,对所述第二随机数进行加密,得到第四加密信息;将所述第四加密信息发送至所述智能卡,所述第四加密信息用于所述智能卡采用预先存储的开锁密钥中的外部认证密钥进行解密,得到所述第二随机数,对所述第二随机数进行校验,得到所述外部认证结果并返回;接收所述智能卡发送的所述外部认证结果。
在一个实施例中,所述认证模块,用于将所生成的第三随机数发送至所述智能卡,所述第三随机数用于所述智能卡采用预先存储的开锁密钥中的内部认证密钥进行加密,得到第五加密信息并返回;接收所述第五加密信息;采用预先存储的开锁密钥中的内部认证密钥对所述第五加密信息进行解密,得到所述第三随机数;对所述第三随机数进行校验,得到所述内部认证结果。
根据本公开实施例的第四方面,提供一种智能卡,所述智能卡包括:
信息提供模块,用于向智能锁提供认证信息;
接收模块,用于接收智能锁发送的开锁密钥,所述开锁密钥为所述智能锁根据所述认证信息确定所述智能卡满足第一认证条件时发送;
发送模块,用于向所述智能锁发送反馈信息。
在一个实施例中,所述信息提供模块,用于响应于对认证信息的请求指令,向智能锁提供认证信息;
其中,所述认证信息包括智能卡的卡标识和卡状态,所述认证信息用于所述智能锁确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
在一个实施例中,所述发送模块,用于响应于对数字证书的请求指令,将数字证书发送至所述智能锁;
其中,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,所述公钥用于对所生成的开锁密钥进行加密;
所述接收模块,用于接收所述智能锁发送的加密的开锁密钥;
所述智能卡还包括:
解密模块,用于通过与所述公钥对应的私钥对所述加密的开锁密钥进行解密;
所述发送模块,用于向所述智能锁发送解密成功的反馈信息。
在一个实施例中,所述接收模块,用于接收所述智能锁发送的传输密钥;
所述发送模块,用于将所生成的第一随机数发送至所述智能锁;
其中,由所述智能锁基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息并返回;
所述接收模块,用于接收智能锁发送的第一加密信息;
所述发送模块,用于基于所述传输密钥和所生成的第一随机数,对所述第一加密信息进行解密,并生成校验成功的反馈信息。
在一个实施例中,所述发送模块,用于响应于对数字证书的请求指令,将数字证书发送至所述智能锁,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,采用所述公钥用于对所生成的传输密钥进行加密,得到第二加密信息;
所述接收模块,用于接收所述智能锁发送的所述第二加密信息;
所述智能卡还包括:
获取模块,用于通过与所述公钥对应的私钥对所述第二加密信息进行解密,得到传输密钥。
在一个实施例中,所述发送模块,用于采用所述传输密钥对所生成的第一随机数进行加密,得到第三加密信息;将所述第三加密信息发送至所述智能锁。
在一个实施例中,所述智能卡还包括:
所述信息提供模块,用于向所述智能锁提供认证信息;
认证模块,用于响应于智能卡满足第二认证条件,对所述智能锁进行外部认证,得到外部认证结果;
获取模块,用于响应于所述外部认证结果为认证通过,获取所述智能锁对智能卡的内部认证结果,所述内部认证结果用于在认证结果为认证通过时,控制所述智能锁打开。
在一个实施例中,所述信息提供模块,用于响应于对认证信息的请求指令,将认证信息发送至所述智能锁;
其中,所述认证信息包括所述智能卡的卡标识和卡状态,所述认证信息用于所述智能锁在所述卡状态为已发钥匙状态,且所述卡标识位于所述白名单时表征所述智能卡为已认证智能卡时,确定智能卡满足第二认证条件。
在一个实施例中,所述认证模块,用于接收所述智能锁发送的第二随机数获取请求;生成第二随机数;并将所述第二随机数发送至所述智能锁,所述第二随机数由所述智能锁采用预先存储的开锁密钥中的外部认证密钥进行加密,得到第四加密信息并返回;接收所述第四加密信息;采用预先存储的开锁密钥中的外部认证密钥对所述第四加密信息进行解密,得到所述第二随机数;根据所生成的第二随机数,对所述第二随机数进行校验,得到所述外部认证结果。
在一个实施例中,所述获取模块,用于接收所述智能锁发送的第三随机数;采用预先存储的开锁密钥中的内部认证密钥,对所述第三随机数进行加密,得到第五加密信息;将所述第五加密信息发送至所述智能锁,所述第五加密信息由所述智能锁采用预先存储的开锁密钥中的内部认证密钥进行解密,得到所述第三随机数,并对所述第三随机数进行校验,得到所述内部认证结果。
根据本公开实施例的第五方面,提供一种智能锁系统,所述智能锁系统包括:上述第三方面以及第三方面任一种实施方式提供的智能锁,以及上述第四方面以及第四方面任一种实施方式提供的至少一个智能卡。
根据本公开实施例的第六方面,提供了一种智能卡认证装置,包括:
处理器;
用于存储处理器可执行的指令的存储器;
其中,所述处理器被配置为:
根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;
响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;
响应于接收到所述智能卡的反馈,将所述智能卡确定为已认证智能卡。
根据本公开实施例的第七方面,提供了一种智能卡认证装置,包括:
处理器;
用于存储处理器可执行的指令的存储器;
其中,所述处理器被配置为:
向智能锁提供认证信息;
接收智能锁发送的开锁密钥,所述开锁密钥为所述智能锁根据所述认证信息确定所述智能卡满足第一认证条件时发送;
向所述智能锁发送反馈信息。
本公开的实施例提供的技术方案可以包括以下有益效果:
基于智能卡提供的认证信息确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,并在接收到智能卡的反馈时,完成对智能卡的认证,即完成了钥匙分发流程。与现有技术中的钥匙分发流程相比,该过程无需智能锁厂商预置开锁密钥,也不需要云端或者数据中心等第三方分配开锁密钥,而是由智能锁先对智能卡进行认证,认证通过后由智能锁本身在本地生成开锁密钥并分配给智能卡,不但减小了工厂生产环节的复杂度,还减少了第三方的参与,安全性更高。
另外,在对智能锁进行开锁操作时,通过智能锁与智能卡进行交互,完成智能锁卡对智能锁的认证及智能锁对智能卡的认证,并在两次认证结果为认证通过时,控制能锁打开。基于上述开锁认证方法,有效地避免了恶意复制攻击,提高了智能锁的可靠性和安全性。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。
图1是根据一示例性实施例示出的一种智能门锁系统的架构图。
图2是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图3是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图4是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图5是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图6是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图7是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图8是根据一示例性实施例示出的一种智能卡认证方法的流程图。
图9是根据一示例性实施例示出的一种开锁认证方法的流程图。
图10是根据一示例性实施例示出的一种开锁认证方法的流程图。
图11是根据一示例性实施例示出的一种开锁认证方法的流程图。
图12是根据一示例性实施例示出的一种智能锁的框图。
图13是根据一示例性实施例示出的一种智能卡的框图。
图14是根据一示例性实施例示出的一种用于智能卡认证的装置的框图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
参见图1,其示出了本公开实施例提供的智能卡认证方法所应用的智能门锁系统,该智能门锁系统包括:智能锁101和智能卡102。
其中,智能锁101包括前端和后端。前端由读卡器和电子锁芯组成,主要负责后端与外界的数据交互。该读卡器包括NFC(Near-Field Communication,近场通信)读卡器、蓝牙读卡器等,主要负责与智能卡102进行数据交互。电子锁芯在原通用机械锁芯基础上,添加了与外界智能卡进行通信的电子组件,该电子锁芯一方面具有通用机械锁芯的功能,另一方面还具有电子身份认证的功能。后端由MCU(Microprogrammed Control Unit,微程序控制器)和SE(Security Element,安全组件)组成,主要负责智能卡认证及钥匙分发,该钥匙分发实际上是将智能卡的卡标识添加到白名单的过程。
智能卡包括与智能锁交互的商家门卡、具有短距离通信功能的智能手机及物理钥匙等。商家门卡有实体卡和虚拟卡两种形态。实体卡由商家定制生产,虚拟卡存储于智能手机的APP中。具有短距离通信功能的智能手机可模拟虚拟卡与智能锁进行通信,以传递配置信息。物理钥匙与普通钥匙外观相同,所不同的是增加了安全芯片,可实现与商家门卡同样的功能,即除了通信链路为接触式外,开锁认证过程与商家门卡一致,可以理解为商家门卡的另一种形态。智能卡属于CPU(Central Processing Unit,中央处理器)卡,每张智能卡具有唯一的识别码CID及数字证书,在一种实施方式中,该CID可以由16位数字组成,前6位数字为发卡方的标识代码IIN(Issuer Identification Number,发行人识别号码),用于对智能卡进行分类,数字证书由商家进行签发且全网唯一。
图2是根据一示例性实施例示出的一种智能卡认证方法的流程图,如图2所示,智能卡认证方法可以用于智能锁中,包括以下步骤。
在步骤S201中,根据智能卡提供的认证信息,确定智能卡是否满足第一认证条件。
其中,认证信息包括认证信息包括智能卡的卡标识和卡状态等。卡状态包括未发钥匙状态和已发钥匙状态两种。当获取到智能卡提供的认证信息时,智能锁需要确定智能卡是否满足第一认证条件。示例性地,智能锁可检查卡状态是否为未发钥匙状态,卡标识是否 包括指定号段,如果卡状态为已发钥匙状态,说明已对将该智能卡进行认证,则流程结束;如果卡状态为未发钥匙状态,但卡标识中未包括指定号段,说明该卡不是与智能锁对应的智能卡,则流程结束;如果卡状态为未发钥匙状态,且卡标识包括指定号码,则智能锁确定智能卡满足第一认证条件。其中,指定号段为发卡方的标识号码,用于区别不同的智能卡。
在获取智能卡提供的认证信息之前,智能锁需要先与智能卡建立连接。该连接过程可由第三方应用进行触发,当智能锁从第三方应用接收到认证触发指令时,智能锁可通过搜索蓝牙、wifi、红外、NFC(Near Field Communication,近距离无线通信)等信号,与智能卡建立连接。进一步地,基于与智能卡所建立的连接,智能锁可以获取智能卡端的认证信息。
在步骤S202中,响应于智能卡满足第一认证条件,将生成的开锁密钥发送至智能卡。
响应于智能卡满足第一认证条件,智能锁根据卡标识生成开锁密钥,进而将所生成的开锁密钥发送至智能卡。其中,开锁密钥包括内部认证密钥和外部认证密钥,该外部认证密钥可以为CCK(Card Control Key,卡控制密钥),用于在开锁过程中智能卡对智能锁进行认证;该内部认证密钥可以为IAK(Internal Authentication Key,内部认证密钥),用于在开锁过程中智能锁对智能卡进行认证。
在步骤S203中,响应于接收到智能卡的反馈信息,将智能卡确定为已认证智能卡。
当接收到智能卡发送的反馈信息,响应于接收到的反馈信息,智能锁将智能卡确定为已认证智能卡。
为了便于查找已认证的智能卡,智能锁端可以维护一个白名单,该白名单中包括已认证智能卡的卡标识。因此,当确定智能卡为已认证智能卡后,智能锁还可将该智能卡的卡标识添加到该白名单中。
本公开实施例提供的方法,基于智能卡提供的认证信息确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,并在接收到智能卡的反馈时,完成对智能卡的认证。该过程无需智能锁生产厂商预置开锁密钥,而是由智能锁先对智能卡进行认证,认证通过后由智能锁本身在本地生成开锁密钥并分配给智能卡,不但减小了工厂生产环节的复杂度,还减少了第三方的参与,安全性更高。
相应地,智能卡认证方法可以用于智能卡中,包括以下步骤:
在步骤S301中,向智能锁提供认证信息。
在步骤S302中,接收智能锁发送的开锁密钥。
其中,开锁密钥为智能锁根据认证信息确定智能卡满足第一认证条件时发送。
在步骤S303中,向智能锁发送反馈信息。
响应于所接收到的开锁密钥,智能卡向智能锁发送反馈信息,该反馈信息用于智能锁将智能卡确定为已认证智能卡。
本公开实施例提供的方法,通过向智能锁提供认证信息,使得智能锁能够基于该认证信息确定智能卡是否满足第一认证条件,并在确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,当接收到开锁密钥后进行校验,并将校验成功的反馈信息发送至智能锁,从而完成对智能卡的认证。该过程无需预先生成开锁密钥,且基于智能卡的认证信息及智能锁所生成的开锁密钥实时进行认证,认证结果更可靠、更安全。
为了增强开锁密钥在传输过程中的安全性,图4是根据一示例性实施例示出的一种智能卡认证方法的流程图,如图4所示,智能卡认证方法用于智能锁中,包括以下步骤。
在步骤S401中,根据智能卡提供的认证信息,确定智能卡是否满足第一认证条件。
在步骤S402中,响应于智能卡满足第一认证条件,获取从智能卡请求的数字证书。
响应于智能卡满足第一认证条件,智能锁向智能卡发送数字证书获取请求,当接收到数字证书获取请求时,智能卡根据该数字证书获取请求,获取数字证书,并将数字证书发送至智能锁。
在步骤S403中,对数字证书进行校验,得到智能卡的公钥。
进一步地,数字证书可以由生产厂商签发,并保存于智能卡端,智能锁端保存有签发证书的公钥,因此,当接收到数字证书时,智能锁根据CA(Certificate Authority,数字证书认证机构)公钥对数字证书进行校验,可以得到智能卡的公钥。
在步骤S404中,采用公钥对生成的开锁密钥进行加密。
基于所获取到的智能卡的公钥,智能锁采用该公钥对生成的开锁密钥进行加密。保证了开锁密钥在传输过程中的安全性。
在步骤S405中,将加密的开锁密钥发送至智能卡。
在步骤S406中,响应于接收到智能卡通过与公钥对应的私钥对加密的开锁密钥解密成功的反馈信息,将智能卡确定为已认证智能卡。
与图4相应地,智能卡认证方法也可以应用于智能卡中,包括以下步骤:
在步骤S501中,向智能锁提供认证信息。
在步骤S502中,响应于对数字证书的请求指令,将数字证书发送至智能锁。
在步骤S503中,接收智能锁发送的加密的开锁密钥。
在步骤S504中,通过与公钥对应的私钥对加密的开锁密钥进行解密。
在步骤S505中,向智能锁发送解密成功的反馈信息。
当采用与公钥对应的私钥对加密的开锁密钥成功解密后,智能卡向智能锁发送解密成功的反馈信息,该反馈信息用于智能锁将智能卡确定为已认证智能卡。
为了进一步增强开锁密钥在传输过程中的安全性,可以生成专门的传输密钥,图6是根据一示例性实施例示出的一种智能卡认证方法的流程图,如图6所示,智能卡认证方法用于智能锁中,包括以下步骤。
在步骤S601中,根据智能卡提供的认证信息,确定智能卡是否满足第一认证条件。
在步骤S602中,响应于智能卡满足第一认证条件,将生成的传输密钥发送至智能卡。
响应于智能卡满足第一认证条件,智能锁可以随机生成一个传输密钥,并将该传输密钥发送至智能卡。其中,传输密钥可用CTK(Card Transport Key,卡传输密钥)表示。
在步骤S603中,获取智能卡生成的第一随机数。
在步骤S604中,基于传输密钥和第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息。
智能锁采用传输密钥和第一随机数,对所生成的开锁密钥进行加密,然后对加密后的信息进行MAC(Message Authentication Code,消息认证码)计算,得到包括MAC校验信息的第一加密信息。
在步骤S605中,将第一加密信息发送至智能卡。
在步骤S606中,响应于接收到智能卡对第一加密信息进行解密,并校验成功的反馈信息,将智能卡确定为已认证智能卡。
与图6相应地,智能卡认证方法也可以用于智能卡中,包括以下步骤:
在步骤S701中,向智能锁提供认证信息。
在步骤S702中,接收智能锁发送的传输密钥。
在步骤S703中,将所生成的第一随机数发送至智能锁。
基于所获取到的传输密钥,智能卡随机生成第一随机数,并将第一随机数发送至智能锁。当然,智能卡还可获取第一随机数的IV(Initialization Vector,初始化向量),进而将第一随机数的IV发送至智能锁。
在步骤S704中,接收智能锁发送的第一加密信息。
在步骤S705中,基于传输密钥和所生成的第一随机数,对第一加密信息进行解密,并生成校验成功的反馈信息。
对于所接收到的第一加密信息,智能卡采用所生成的第一随机数和预先存储的传输密钥,对第一加密信息进行解密,得到开锁密钥,并对开锁密钥进行MAC计算,得到MAC校验信息,进而将该MAC校验信息与智能锁端生成的MAC校验信息进行比较,如果该MAC校验信息与智能锁端生成的MAC校验信息相同,则确定校验成功,进而向智能锁发送校验成功的反馈信息。
在本公开的另一个实施例中,为了提高所传输的传输密钥的安全性,智能锁还将获取从智能卡请求的数字证书,并对该数字证书进行校验,得到智能卡的公钥,采用公钥对传输密钥进行加密,得到第二加密信息,进而将该第二加密信息发送至智能卡。当接收到第二加密信息时,智能卡采用与该公钥对应的私钥对第二加密信息进行解密,得到传输密钥。
在本公开的另一个实施例中,为了提高所传输的第一随机数的安全性,智能卡还将采用传输密钥对所生成的第一随机数进行加密,得到第三加密信息,进而将第三加密信息发送至智能锁。当接收到智能卡发送的第三加密信息,智能锁采用传输密钥对第三加密信息 进行解密,得到第一随机数。当然,智能卡还可获取第一随机数的IV,并采用传输密钥对该第一随机数的IV进行加密,得到第三加密信息,进而将第三加密信息发送至智能锁,当接收到智能卡发送的第三加密信息时,智能锁采用传输密钥对第三加密信息进行解密,得到第一随机数的IV。
上述对智能卡的认证方法,下面将结合图8,以智能卡与智能锁之间的交互过程为例进行说明。
参见图8,智能锁向智能卡发送用于请求认证信息的信息获取指令,当接收到信息获取指令时,智能卡获取智能卡的CID和卡状态,并将CID和卡状态发送至智能锁,智能锁检查CID的卡号段是否包括指定号段,并检查卡状态是否为未发钥匙状态,当CID的卡号段包括指定号段,且卡状态为未发钥匙状态时,向智能卡发送数字证书获取指令,当接收到数字证书获取指令时,智能卡获取数字证书,并将数字证书发送至智能锁,智能锁采用CA公钥对数字证书进行校验,得到智能卡的公钥,并生成CTK,进而采用智能卡的公钥对CTK进行加密,并将加密的CTK发送至智能卡,智能卡采用与公钥对应的私钥对加密的CTK进行解密,得到CTK,然后生成8字节的随机数,并获取8字节随机数的IV,进而将该8字节随机数的IV发送至智能锁,当接收到8字节随机数的IV,智能锁生成CCK和IAK,并采用CTK和8字节随机数的IV对CCK和IAK进行加密,然后进行MAC计算,得到包括MAC校验信息的加密信息,进而将加密信息发送至智能卡,当接收到该加密信息,智能卡采用CTK和8字节随机数的IV对该加密信息进行解密,得到CCK和IAK,接着,智能卡对CCK和IAK进行MAC计算,得到MAC校验信息,并在该MAC校验信息与智能锁端的MAC校验信息相同时,向智能锁发送校验成功消息,使得智能锁将该智能卡的CID添加到白名单中。
图9是根据一示例性实施例示出的一种智能卡认证方法的流程图,如图9所示,开锁认证方法用于智能锁中,包括以下步骤。
在步骤S901中,根据智能卡提供的认证信息,确定智能卡是否满足第二认证条件。
基于智能卡提供的认证信息,智能锁需要确定智能卡是否满足第二认证条件,从而在智能卡满足第二认证条件时,进行后续认证过程。示例性地,智能锁确定智能卡是否满足第二认证条件时,包括但不限于如下方式:智能锁检查认证信息中的卡状态是否为未发钥匙状态,并检查卡标识是否为已认证智能卡的卡标识,如果卡状态为未发钥匙状态,则流程结束;如果卡状态为已发钥匙状态,且卡标识为已认证智能卡的卡标识,则智能锁确定智能卡满足第二认证条件。
在步骤S902中,响应于智能卡满足第二认证条件,获取智能卡对智能锁的外部认证结果。
当确定智能卡满足第二认证条件时,智能锁向智能卡发送第二随机数获取请求,当接 收到第二随机数获取请求时,智能卡根据第二随机数获取请求,生成第二随机数,并将第二随机数发送至智能锁,当接收到第二随机数时,智能锁采用预先存储的开锁密钥中的外部认证密钥,对第二随机数进行加密,得到第四加密信息,进而将第四加密信息发送至智能卡。
当接收到第四加密信息时,智能卡采用预先存储的开锁密钥中的外部认证密钥对第四加密信息进行解密,得到第二随机数,并根据所生成的第二随机数,对解密得到的第二随机数进行校验,得到外部认证结果。如果所生成的第二随机数与解密得到的第二随机数相同,则得到认证通过的外部认证结果;如果所生成的第二随机数与解密得到的第二随机数不同,则得到认证失败的外部认证结果。
在步骤S903中,响应于外部认证结果为认证通过,对智能卡进行认证,得到内部认证结果。
响应于外部认证结果为认证通过,智能锁生成第三随机数,并将所生成的第三随机数发送至智能卡,当接收到第三随机数时,智能卡采用预先存储的开锁密钥中的内部认证密钥进行加密,得到第五加密信息,并将第五加密信息发送至智能锁,当接收到第五加密信息时,智能锁采用预先存储的开锁密钥中的内部认证密钥对第五加密信息进行解密,得到第三随机数,并根据所生成的第三随机数,对解密得到的第三随机数进行校验,得到内部认证结果。如果所生成的第三随机数与解密得到的第三随机数相同,则得到认证通过的内部认证结果;如果所生成的第三随机数与解密得到的第三随机数不同时,则得到认证失败的内部认证结果。
在步骤S904中,响应于内部认证结果为认证通过,控制智能锁打开。
响应于内部认证结果为认证通过,智能锁与智能卡彼此确认对方为可信任设备,进而控制智能锁打开。
与图9相应地,开锁认证方法还将应用于智能卡中,包括以下步骤:
在步骤S1001中,向智能锁提供认证信息。
基于与智能锁所建立的连接,智能锁可向智能卡发送用于提供认证信息的信息获取指令,当接收到该信息获取指令时,智能卡获取认证信息,并将认证信息发送至智能锁。其中,认证信息包括认证信息包括智能卡的卡标识和卡状态等。卡状态包括未发钥匙状态和已发钥匙状态两种。
在步骤S1002中,响应于智能卡满足第二认证条件,对智能锁进行外部认证,得到外部认证结果。
在步骤S1003中,响应于外部认证结果为认证通过,获取智能锁对智能卡的内部认证结果。
其中,内部认证结果用于在认证结果为认证通过时,控制智能锁打开。
本公开实施例提供的方法,在对智能锁进行开锁操作时,通过智能锁与智能卡进行交互,完成智能锁卡对智能锁的认证及智能锁对智能卡的认证,并在两次认证结果为认证通 过时,控制能锁打开。基于上述开锁认证方法,有效地避免了恶意复制攻击,提高了智能锁的可靠性和安全性。
对于上述开锁认证方法,下面将结合图11,以智能卡与智能锁之间的交互过程为例进行说明。
参见图11,当接收到用于请求认证信息的信息获取指令时,智能卡获取智能卡的CID和卡状态,并将CID和卡状态发送至智能锁,智能锁检查卡状态是否为已发钥匙状态,并检查CID是否位于白名单中,当卡状态为已发钥匙状态,且CID位于白名单中,向智能卡发送挑战数获取请求,当接收到挑战数获取请求时,智能卡生成挑战数,并将所生成的挑战数发送至智能锁,智能锁采用预先存储的CCK对挑战数进行加密,并将加密信息发送至智能卡,当接收到加密信息时,智能卡采用预先存储的CCK对加密信息进行解密,得到挑战数,并根据所生成的随机数,对解密得到的随机数进行校验,当所生成的随机数和解密得到的随机数不同时,认证失败,停止授权;当所生成的随机数和解密得到的随机数相同时,认证成功,继续进行下一步认证。智能锁生成随机数,并将所生成的随机数发送至智能卡,智能卡采用预先存储的IAK对随机数进行加密,得到加密信息,并将加密信息发送至智能锁,当接收到加密信息时,智能锁采用预先存储的IAK对加密信息进行解密,得到随机数,并根据所生成的随机数,对解密得到的随机数进行校验,当所生成的随机数与解密得到的随机数相同时,认证通过,并控制智能锁打开。
图12是根据一示例性实施例示出的一种智能锁的框图。参照图12,该智能锁包括:确定模块1201和发送模块1202。
该确定模块1201被配置为根据智能卡提供的认证信息,确定智能卡是否满足第一认证条件;
该发送模块1202被配置为响应于智能卡满足第一认证条件,将生成的开锁密钥发送至智能卡;
该确定模块1201被配置为响应于接收到智能卡的反馈信息,将智能卡确定为已认证智能卡。
在本公开的另一个实施例中,该确定模块1201被配置为获取从智能卡请求的认证信息,认证信息包括智能卡的卡标识和卡状态;当确定卡状态为未发钥匙状态,且卡标识包括指定号段时,确定智能卡满足第一认证条件。
在本公开的另一个实施例中,智能锁还包括:获取模块、校验模块及加密模块。
该获取模块被配置为获取从智能卡请求的数字证书;
该校验模块被配置为对数字证书进行校验,得到智能卡的公钥;
该加密模块被配置为采用公钥对生成的开锁密钥进行加密;
该发送模块1202倍配置为将加密的开锁密钥发送至智能卡;
该确定模块1201被配置为响应于接收到智能卡通过与公钥对应的私钥对加密的开锁密钥解密成功的反馈信息,将智能卡确定为已认证智能卡。
在本公开的另一个实施例中,智能锁还包括:获取模块。
该发送模块1202被配置为将生成的传输密钥发送至智能卡;
该获取模块被配置为获取智能卡生成的第一随机数;
该发送模块1202被配置为基于传输密钥和第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息;
该发送模块1202被配置为将第一加密信息发送至智能卡;
该确定模块1201被配置为响应于接收到智能卡对第一加密信息进行解密,并校验成功的反馈信息,将智能卡确定为已认证智能卡。
在本公开的另一个实施例中,智能锁还包括:获取模块和校验模块。
该获取模块被配置为获取从智能卡请求的数字证书;
该校验模块被配置为对数字证书进行校验,得到智能卡的公钥;
该发送模块1202被配置为采用公钥对传输密钥进行加密,得到第二加密信息;将第二加密信息发送至智能卡。
在本公开的另一个实施例中,该获取模块被配置为接收智能卡发送的第三加密信息,第三加密信息由智能卡采用传输密钥对所生成的第一随机数加密得到;采用传输密钥对第三加密信息进行解密,得到第一随机数。
在本公开的另一个实施例中,智能锁还包括:接收模块和连接模块。
该接收模块被配置为从第三方应用接收认证触发指令;
该连接模块被配置为与智能卡建立连接。
在本公开的另一个实施例中,智能锁还包括:获取模块、认证模块及控制模块。
该确定模块1201被配置为确定智能卡是否满足第二认证条件;
该获取模块被配置为响应于智能卡满足第二认证条件,获取智能卡对智能锁的外部认证结果;
该认证模块被配置为响应于外部认证结果为认证通过,对智能卡进行认证,得到内部认证结果;
该控制模块被配置为响应于内部认证结果为认证通过,控制智能锁打开。
在本公开的另一个实施例中,该确定模块1201被配置为获取从智能卡请求的认证信息,认证信息包括智能卡的卡标识和卡状态;当确定卡状态为已发钥匙状态,且卡标识表征智能卡为已认证智能卡时,确定智能卡满足第二认证条件。
在本公开的另一个实施例中,该获取模块被配置为向智能卡发送第二随机数获取请求,第二随机数获取请求用于智能卡生成第二随机数并返回;接收第二随机数;采用预先存储的开锁密钥中的外部认证密钥,对第二随机数进行加密,得到第四加密信息;将第四加密信息发送至智能卡,第四加密信息用于智能卡采用预先存储的开锁密钥中的外部认证 密钥进行解密,得到第二随机数,对第二随机数进行校验,得到外部认证结果并返回;接收智能卡发送的外部认证结果。
在本公开的另一个实施例中,该认证模块被配置为将所生成的第三随机数发送至智能卡,第三随机数用于智能卡采用预先存储的开锁密钥中的内部认证密钥进行加密,得到第五加密信息并返回;接收第五加密信息;采用预先存储的开锁密钥中的内部认证密钥对第五加密信息进行解密,得到第三随机数;对第三随机数进行校验,得到内部认证结果。
本公开实施例提供的智能锁,基于智能卡提供的认证信息确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,由智能卡进行校验,并在接收到校验成功的反馈时,完成对智能卡的认证。该过程无需预先生成开锁密钥,且基于智能卡的认证信息及智能锁所生成的开锁密钥实时进行认证,认证结果更可靠、更安全。
另外,在对智能锁进行开锁操作时,通过智能锁与智能卡进行交互,完成智能锁卡对智能锁的认证及智能锁对智能卡的认证,并在两次认证结果为认证通过时,控制能锁打开。基于上述开锁认证方法,有效地避免了恶意复制攻击,提高了智能锁的可靠性和安全性。
关于上述实施例中的智能锁,其中各个模块执行操作的实施方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图13是根据一示例性实施例示出的一种智能卡的框图。参照图13,该智能卡包括:信息提供模块1301、接收模块1302及发送模块1303。
该信息提供模块1301被配置为向智能锁提供认证信息;
该接收模块被配置为接收智能锁发送的开锁密钥,开锁密钥为智能锁根据认证信息确定智能卡满足第一认证条件时发送;
该发送模块1303被配置为向智能锁发送反馈信息。
在本公开的另一个实施例中,该信息提供模块1301被配置为响应于对认证信息的请求指令,向智能锁提供认证信息;
其中,认证信息包括智能卡的卡标识和卡状态,认证信息用于智能锁确定卡状态为未发钥匙状态,且卡标识包括指定号段时,确定智能卡满足第一认证条件。
在本公开的另一个实施例中,该发送模块1303被配置为响应于对数字证书的请求指令,将数字证书发送至智能锁;
其中,数字证书由智能锁进行校验,得到智能卡的公钥,公钥用于对所生成的开锁密钥进行加密;
该接收模块1302被配置为接收智能锁发送的加密的开锁密钥;
该智能卡还包括:解密模块。
该解密模块被配置为通过与公钥对应的私钥对加密的开锁密钥进行解密;
该发送模块1303被配置为向智能锁发送解密成功的反馈信息。
在本公开的另一个实施例中,该接收模块1302被配置为接收智能锁发送的传输密钥;
该发送模块1303被配置为将所生成的第一随机数发送至智能锁;
其中,由智能锁基于传输密钥和第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息并返回;
该接收模块1302被配置为接收智能锁发送的第一加密信息;
该发送模块1303被配置为基于传输密钥和所生成的第一随机数,对第一加密信息进行解密,并生成校验成功的反馈信息。
在本公开的另一个实施例中,该发送模块1303被配置为响应于对数字证书的请求指令,将数字证书发送至智能锁,数字证书由智能锁进行校验,得到智能卡的公钥,采用公钥用于对所生成的传输密钥进行加密,得到第二加密信息;
该接收模块1302被配置为接收智能锁发送的第二加密信息;
该智能卡还包括:获取模块。
该获取模块被配置为通过与公钥对应的私钥对第二加密信息进行解密,得到传输密钥。
在本公开的另一个实施例中,该发送模块1303被配置为采用传输密钥对所生成的第一随机数进行加密,得到第三加密信息;将第三加密信息发送至智能锁。
在本公开的另一个实施例中,该智能卡还包括:认证模块和获取模块。
该信息提供模块1301被配置为向智能锁提供认证信息;
该认证模块被配置为响应于智能卡满足第二认证条件,对智能锁进行外部认证,得到外部认证结果;
该获取模块被配置为响应于外部认证结果为认证通过,获取智能锁对智能卡的内部认证结果,内部认证结果用于在认证结果为认证通过时,控制智能锁打开。
在本公开的另一个实施例中,该信息提供模块1301被配置为响应于对认证信息的请求指令,将认证信息发送至智能锁;
其中,认证信息包括智能卡的卡标识和卡状态,认证信息用于智能锁在卡状态为已发钥匙状态,且卡标识位于白名单时表征智能卡为已认证智能卡时,确定智能卡满足第二认证条件。
在本公开的另一个实施例中,该认证模块被配置为接收智能锁发送的第二随机数获取请求;生成第二随机数;并将第二随机数发送至智能锁,第二随机数由智能锁采用预先存储的开锁密钥中的外部认证密钥进行加密,得到第四加密信息并返回;接收第四加密信息;采用预先存储的开锁密钥中的外部认证密钥对第四加密信息进行解密,得到第二随机数;根据所生成的第二随机数,对第二随机数进行校验,得到外部认证结果。
在本公开的另一个实施例中,该获取模块被配置为接收智能锁发送的第三随机数;采用预先存储的开锁密钥中的内部认证密钥,对第三随机数进行加密,得到第五加密信息;将第五加密信息发送至智能锁,第五加密信息由智能锁采用预先存储的开锁密钥中的内部认证密钥进行解密,得到第三随机数,并对第三随机数进行校验,得到内部认证结果。
本公开实施例提供的智能卡,通过向智能锁提供认证信息,使得智能锁能够基于该认证信息确定智能卡是否满足第一认证条件,并在确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,当接收到开锁密钥后进行校验,并将校验成功的反馈信息发送至智能锁,从而完成对智能卡的认证。该过程无需预先生成开锁密钥,且基于智能卡的认证信息及智能锁所生成的开锁密钥实时进行认证,认证结果更可靠、更安全。
另外,在对智能锁进行开锁操作时,通过智能锁与智能卡进行交互,完成智能锁卡对智能锁的认证及智能锁对智能卡的认证,并在两次认证结果为认证通过时,控制能锁打开。基于上述开锁认证方法,有效地避免了恶意复制攻击,提高了智能锁的可靠性和安全性。
本公开实施例还提供一种智能锁系统,包括上述任一实施例提供的智能锁,以及上述任一实施例提供的至少一个智能卡。
图14是根据一示例性实施例示出的一种用于智能卡认证的装置1400的框图。例如,装置1400可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。
参照图14,装置1400可以包括以下一个或多个组件:处理组件1402,存储器1404,电源组件1406,多媒体组件1408,音频组件1410,输入/输出(I/O)接口1412,传感器组件1414,以及通信组件1416。
处理组件1402通常控制装置1400的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件1402可以包括一个或多个处理器1420来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件1402可以包括一个或多个模块,便于处理组件1402和其他组件之间的交互。例如,处理组件1402可以包括多媒体模块,以方便多媒体组件1408和处理组件1402之间的交互。
存储器1404被配置为存储各种类型的数据以支持在装置1400的操作。这些数据的示例包括用于在装置1400上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器1404可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件1406为装置1400的各种组件提供电力。电源组件1406可以包括电源管理系统,一个或多个电源,及其他与为装置1400生成、管理和分配电力相关联的组件。
多媒体组件1408包括在所述装置1400和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例 中,多媒体组件1408包括一个前置摄像头和/或后置摄像头。当装置1400处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜系统或具有焦距和光学变焦能力。
音频组件1410被配置为输出和/或输入音频信号。例如,音频组件1410包括一个麦克风(MIC),当装置1400处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器1404或经由通信组件1416发送。在一些实施例中,音频组件1410还包括一个扬声器,用于输出音频信号。
I/O接口1412为处理组件1402和外围接口模块之间提供接口,上述外围接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件1414包括一个或多个传感器,用于为装置1400提供各个方面的状态评估。例如,传感器组件1414可以检测到装置1400的打开/关闭状态,组件的相对定位,例如所述组件为装置1400的显示器和小键盘,传感器组件1414还可以检测装置1400或装置1400一个组件的位置改变,用户与装置1400接触的存在或不存在,装置1400方位或加速/减速和装置1400的温度变化。传感器组件1414可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件1414还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件1414还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件1416被配置为便于装置1400和其他设备之间有线或无线方式的通信。装置1400可以接入基于通信标准的无线网络,如WiFi,2G或3G,或它们的组合。在一个示例性实施例中,通信组件1416经由广播信道接收来自外部广播管理系统的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件1416还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,装置1400可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的非临时性计算机可读存储介质,例如包括指令的存储器1404,上述指令可由装置1400的处理器1420执行以完成上述方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
一种非临时性计算机可读存储介质,当所述存储介质中的指令由移动终端的处理器执行时,使得移动终端能够执行一种智能卡认证方法。
本公开实施例提供的装置,基于智能卡提供的认证信息确定智能卡满足第一认证条件时,将所生成的开锁密钥发送至智能卡,由智能卡进行校验,并在接收到校验成功的反馈时,完成对智能卡的认证。该过程无需预先生成开锁密钥,且基于智能卡的认证信息及智能锁所生成的开锁密钥实时进行认证,认证结果更可靠、更安全。
另外,在对智能锁进行开锁操作时,通过智能锁与智能卡进行交互,完成智能锁卡对智能锁的认证及智能锁对智能卡的认证,并在两次认证结果为认证通过时,控制能锁打开。基于上述开锁认证方法,有效地避免了恶意复制攻击,提高了智能锁的可靠性和安全性。
本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (45)

  1. 一种智能卡认证方法,其特征在于,所述方法包括:
    根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;
    响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;
    响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡。
  2. 根据权利要求1所述的方法,其特征在于,所述根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件,包括:
    获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;
    当确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
  3. 根据权利要求1所述的方法,其特征在于,所述方法还包括:
    获取从所述智能卡请求的数字证书;
    对所述数字证书进行校验,得到所述智能卡的公钥;
    采用所述公钥对生成的开锁密钥进行加密;
    所述将生成的开锁密钥发送至所述智能卡,包括:
    将加密的开锁密钥发送至所述智能卡;
    所述响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡,包括:
    响应于接收到所述智能卡通过与所述公钥对应的私钥对所述加密的开锁密钥解密成功的反馈信息,将所述智能卡确定为已认证智能卡。
  4. 根据权利要求1所述的方法,其特征在于,在将生成的开锁密钥发送至所述智能卡之前,还包括:
    将生成的传输密钥发送至所述智能卡;
    获取所述智能卡生成的第一随机数;
    所述将生成的开锁密钥发送至所述智能卡,包括:
    基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息;
    将所述第一加密信息发送至所述智能卡;
    所述响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡,包括:
    响应于接收到所述智能卡对所述第一加密信息进行解密,并校验成功的反馈信息,将所述智能卡确定为已认证智能卡。
  5. 根据权利要求4所述的方法,其特征在于,所述方法还包括:
    获取从所述智能卡请求的数字证书;
    对所述数字证书进行校验,得到所述智能卡的公钥;
    所述将所生成的传输密钥发送至所述智能卡,包括:
    采用所述公钥对所述传输密钥进行加密,得到第二加密信息;
    将所述第二加密信息发送至所述智能卡。
  6. 根据权利要求4所述的方法,其特征在于,所述获取所述智能卡的第一随机数,包括:
    接收所述智能卡发送的第三加密信息,所述第三加密信息由所述智能卡采用所述传输密钥对所生成的第一随机数加密得到;
    采用所述传输密钥对所述第三加密信息进行解密,得到所述第一随机数。
  7. 根据权利要求1所述的方法,其特征在于,所述确定智能卡是否满足第一认证条件之前,还包括:
    从第三方应用接收认证触发指令;
    与所述智能卡建立连接。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,将所述智能卡确定为已认证智能卡之后,还包括:
    确定所述智能卡是否满足第二认证条件;
    响应于所述智能卡满足第二认证条件,获取所述智能卡对智能锁的外部认证结果;
    响应于所述外部认证结果为认证通过,对所述智能卡进行认证,得到内部认证结果;
    响应于所述内部认证结果为认证通过,控制所述智能锁打开。
  9. 根据权利要求8所述的方法,其特征在于,所述确定所述智能卡是否满足第二认证条件,包括:
    获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;
    当确定所述卡状态为已发钥匙状态,且所述卡标识表征所述智能卡为已认证智能卡时,确定所述智能卡满足第二认证条件。
  10. 根据权利要求8所述的方法,其特征在于,所述响应于所述智能卡满足第二认证条件,获取所述智能卡对所述智能锁的外部认证结果,包括:
    向所述智能卡发送第二随机数获取请求,所述第二随机数获取请求用于所述智能卡生成第二随机数并返回;
    接收所述第二随机数;
    采用预先存储的开锁密钥中的外部认证密钥,对所述第二随机数进行加密,得到第四加密信息;
    将所述第四加密信息发送至所述智能卡,所述第四加密信息用于所述智能卡采用预先存储的开锁密钥中的外部认证密钥进行解密,得到所述第二随机数,对所述第二随机数进行校验,得到所述外部认证结果并返回;
    接收所述智能卡发送的所述外部认证结果。
  11. 根据权利要求8所述的方法,其特征在于,所述响应于所述外部认证结果为认证通过,对所述智能卡进行认证,得到内部认证结果,包括:
    将所生成的第三随机数发送至所述智能卡,所述第三随机数用于所述智能卡采用预先存储的开锁密钥中的内部认证密钥进行加密,得到第五加密信息并返回;
    接收所述第五加密信息;
    采用预先存储的开锁密钥中的内部认证密钥对所述第五加密信息进行解密,得到所述第三随机数;
    对所述第三随机数进行校验,得到所述内部认证结果。
  12. 一种智能卡认证方法,其特征在于,所述方法包括:
    向智能锁提供认证信息;
    接收智能锁发送的开锁密钥,所述开锁密钥为所述智能锁根据所述认证信息确定所述智能卡满足第一认证条件时发送;
    向所述智能锁发送反馈信息。
  13. 根据权利要求12所述的方法,其特征在于,所述向智能锁提供认证信息,包括:
    响应于对认证信息的请求指令,向智能锁提供认证信息;
    其中,所述认证信息包括智能卡的卡标识和卡状态,所述认证信息用于所述智能锁确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
  14. 根据权利要求12所述的方法,其特征在于,所述方法还包括:
    响应于对数字证书的请求指令,将数字证书发送至所述智能锁;
    其中,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,所述公钥用于对所生成的开锁密钥进行加密;
    所述接收智能锁发送的开锁密钥,包括:
    接收所述智能锁发送的加密的开锁密钥;
    所述方法还包括:
    通过与所述公钥对应的私钥对所述加密的开锁密钥进行解密;
    所述向所述智能锁发送反馈信息,包括:
    向所述智能锁发送解密成功的反馈信息。
  15. 根据权利要求12所述的方法,其特征在于,所述向所述智能锁发送反馈信息之前,还包括:
    接收所述智能锁发送的传输密钥;
    将所生成的第一随机数发送至所述智能锁;
    其中,由所述智能锁基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息并返回;
    所述接收智能锁发送的开锁密钥,包括:
    接收智能锁发送的第一加密信息;
    所述向所述智能锁发送反馈信息,包括:
    基于所述传输密钥和所生成的第一随机数,对所述第一加密信息进行解密,并生成校验成功的反馈信息。
  16. 根据权利要求15所述的方法,其特征在于,所述方法还包括:
    响应于对数字证书的请求指令,将数字证书发送至所述智能锁,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,采用所述公钥用于对所生成的传输密钥进行加密,得到第二加密信息;
    所述接收所述智能锁发送的传输密钥,包括:
    接收所述智能锁发送的所述第二加密信息;
    所述方法还包括:
    通过与所述公钥对应的私钥对所述第二加密信息进行解密,得到传输密钥。
  17. 根据权利要求15所述的方法,其特征在于,所述将所生成的第一随机数发送至所述智能锁,包括:
    采用所述传输密钥对所生成的第一随机数进行加密,得到第三加密信息;
    将所述第三加密信息发送至所述智能锁。
  18. 根据权利要求12至17中任一项所述的方法,其特征在于,所述方法还包括:
    向所述智能锁提供认证信息;
    响应于智能卡满足第二认证条件,对所述智能锁进行外部认证,得到外部认证结果;
    响应于所述外部认证结果为认证通过,获取所述智能锁对智能卡的内部认证结果,所述内部认证结果用于在认证结果为认证通过时,控制所述智能锁打开。
  19. 根据权利要求18所述的方法,其特征在于,所述向所述智能锁提供认证信息,包括:
    响应于对认证信息的请求指令,将认证信息发送至所述智能锁;
    其中,所述认证信息包括所述智能卡的卡标识和卡状态,所述认证信息用于所述智能锁在所述卡状态为已发钥匙状态,且所述卡标识位于所述白名单时表征所述智能卡为已认证智能卡时,确定智能卡满足第二认证条件。
  20. 根据权利要求18所述的方法,其特征在于,所述对所述智能锁进行外部认证,得到外部认证结果,包括:
    接收所述智能锁发送的第二随机数获取请求;
    生成第二随机数;并
    将所述第二随机数发送至所述智能锁,所述第二随机数由所述智能锁采用预先存储的开锁密钥中的外部认证密钥进行加密,得到第四加密信息并返回;
    接收所述第四加密信息;
    采用预先存储的开锁密钥中的外部认证密钥对所述第四加密信息进行解密,得到所述第二随机数;
    根据所生成的第二随机数,对所述第二随机数进行校验,得到所述外部认证结果。
  21. 根据权利要求18所述的方法,其特征在于,所述响应于所述外部认证结果为认证通过,获取所述智能锁对智能卡的内部认证结果,包括:
    接收所述智能锁发送的第三随机数;
    采用预先存储的开锁密钥中的内部认证密钥,对所述第三随机数进行加密,得到第五加密信息;
    将所述第五加密信息发送至所述智能锁,所述第五加密信息由所述智能锁采用预先存储的开锁密钥中的内部认证密钥进行解密,得到所述第三随机数,并对所述第三随机数进行校验,得到所述内部认证结果。
  22. 一种智能锁,其特征在于,所述智能锁包括:
    确定模块,用于根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;
    发送模块,用于响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;
    所述确定模块,用于响应于接收到所述智能卡的反馈信息,将所述智能卡确定为已认证智能卡。
  23. 根据权利要求22所述的智能锁,其特征在于,所述确定模块,用于获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;当确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
  24. 根据权利要求22所述的智能锁,其特征在于,所述智能锁还包括:
    获取模块,用于获取从所述智能卡请求的数字证书;
    校验模块,用于对所述数字证书进行校验,得到所述智能卡的公钥;
    加密模块,用于采用所述公钥对生成的开锁密钥进行加密;
    所述发送模块,用于将加密的开锁密钥发送至所述智能卡;
    所述确定模块,用于响应于接收到所述智能卡通过与所述公钥对应的私钥对所述加密的开锁密钥解密成功的反馈信息,将所述智能卡确定为已认证智能卡。
  25. 根据权利要求22所述的智能锁,其特征在于,所述智能锁还包括:
    所述发送模块,用于将生成的传输密钥发送至所述智能卡;
    获取模块,用于获取所述智能卡生成的第一随机数;
    所述发送模块,用于基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息;
    所述发送模块,用于将所述第一加密信息发送至所述智能卡;
    所述确定模块,用于响应于接收到所述智能卡对所述第一加密信息进行解密,并校验成功的反馈信息,将所述智能卡确定为已认证智能卡。
  26. 根据权利要求25所述的智能锁,其特征在于,所述智能锁还包括:
    所述获取模块,用于获取从所述智能卡请求的数字证书;
    校验模块,用于对所述数字证书进行校验,得到所述智能卡的公钥;
    所述发送模块,用于采用所述公钥对所述传输密钥进行加密,得到第二加密信息;将所述第二加密信息发送至所述智能卡。
  27. 根据权利要求25所述的智能锁,其特征在于,所述获取模块,用于接收所述智能卡发送的第三加密信息,所述第三加密信息由所述智能卡采用所述传输密钥对所生成的第一随机数加密得到;采用所述传输密钥对所述第三加密信息进行解密,得到所述第一随机数。
  28. 根据权利要求22所述的智能锁,其特征在于,所述智能锁还包括:
    接收模块,用于从第三方应用接收认证触发指令;
    连接模块,用于与所述智能卡建立连接。
  29. 根据权利要求22至28中任一项所述的智能锁,其特征在于,所述智能锁还包括:
    所述确定模块,用于确定所述智能卡是否满足第二认证条件;
    获取模块,用于响应于所述智能卡满足第二认证条件,获取所述智能卡对智能锁的外部认证结果;
    认证模块,用于响应于所述外部认证结果为认证通过,对所述智能卡进行认证,得到内部认证结果;
    控制模块,用于响应于所述内部认证结果为认证通过,控制所述智能锁打开。
  30. 根据权利要求29所述的智能锁,其特征在于,所述确定模块,用于获取从所述智能卡请求的认证信息,所述认证信息包括智能卡的卡标识和卡状态;当确定所述卡状态为已发钥匙状态,且所述卡标识表征所述智能卡为已认证智能卡时,确定所述智能卡满足第二认证条件。
  31. 根据权利要求29所述的智能锁,其特征在于,所述获取模块,用于向所述智能卡发送第二随机数获取请求,所述第二随机数获取请求用于所述智能卡生成第二随机数并返回;接收所述第二随机数;采用预先存储的开锁密钥中的外部认证密钥,对所述第二随机数进行加密,得到第四加密信息;将所述第四加密信息发送至所述智能卡,所述第四加密信息用于所述智能卡采用预先存储的开锁密钥中的外部认证密钥进行解密,得到所述第二随机数,对所述第二随机数进行校验,得到所述外部认证结果并返回;接收所述智能卡发送的所述外部认证结果。
  32. 根据权利要求29所述的智能锁,其特征在于,所述认证模块,用于将所生成的第三随机数发送至所述智能卡,所述第三随机数用于所述智能卡采用预先存储的开锁密钥中的内部认证密钥进行加密,得到第五加密信息并返回;接收所述第五加密信息;采用预先存储的开锁密钥中的内部认证密钥对所述第五加密信息进行解密,得到所述第三随机数;对所述第三随机数进行校验,得到所述内部认证结果。
  33. 一种智能卡,其特征在于,所述智能卡包括:
    信息提供模块,用于向智能锁提供认证信息;
    接收模块,用于接收智能锁发送的开锁密钥,所述开锁密钥为所述智能锁根据所述认证信息确定所述智能卡满足第一认证条件时发送;
    发送模块,用于向所述智能锁发送反馈信息。
  34. 根据权利要求33所述的智能卡,其特征在于,所述信息提供模块,用于响应于 对认证信息的请求指令,向智能锁提供认证信息;
    其中,所述认证信息包括智能卡的卡标识和卡状态,所述认证信息用于所述智能锁确定所述卡状态为未发钥匙状态,且所述卡标识包括指定号段时,确定所述智能卡满足第一认证条件。
  35. 根据权利要求33所述的智能卡,其特征在于,所述发送模块,用于响应于对数字证书的请求指令,将数字证书发送至所述智能锁;
    其中,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,所述公钥用于对所生成的开锁密钥进行加密;
    所述接收模块,用于接收所述智能锁发送的加密的开锁密钥;
    所述智能卡还包括:
    解密模块,用于通过与所述公钥对应的私钥对所述加密的开锁密钥进行解密;
    所述发送模块,用于向所述智能锁发送解密成功的反馈信息。
  36. 根据权利要求33所述的智能卡,其特征在于,所述接收模块,用于接收所述智能锁发送的传输密钥;
    所述发送模块,用于将所生成的第一随机数发送至所述智能锁;
    其中,由所述智能锁基于所述传输密钥和所述第一随机数,对所生成的开锁密钥进行加密处理,得到第一加密信息并返回;
    所述接收模块,用于接收智能锁发送的第一加密信息;
    所述发送模块,用于基于所述传输密钥和所生成的第一随机数,对所述第一加密信息进行解密,并生成校验成功的反馈信息。
  37. 根据权利要求36所述的智能卡,其特征在于,所述发送模块,用于响应于对数字证书的请求指令,将数字证书发送至所述智能锁,所述数字证书由所述智能锁进行校验,得到所述智能卡的公钥,采用所述公钥用于对所生成的传输密钥进行加密,得到第二加密信息;
    所述接收模块,用于接收所述智能锁发送的所述第二加密信息;
    所述智能卡还包括:
    获取模块,用于通过与所述公钥对应的私钥对所述第二加密信息进行解密,得到传输密钥。
  38. 根据权利要求36所述的智能卡,其特征在于,所述发送模块,用于采用所述传输密钥对所生成的第一随机数进行加密,得到第三加密信息;将所述第三加密信息发送至所述智能锁。
  39. 根据权利要求33至38中任一项所述的智能卡,其特征在于,所述智能卡还包括:
    所述信息提供模块,用于向所述智能锁提供认证信息;
    认证模块,用于响应于智能卡满足第二认证条件,对所述智能锁进行外部认证,得到外部认证结果;
    获取模块,用于响应于所述外部认证结果为认证通过,获取所述智能锁对智能卡的内部认证结果,所述内部认证结果用于在认证结果为认证通过时,控制所述智能锁打开。
  40. 根据权利要求39所述的智能卡,其特征在于,所述信息提供模块,用于响应于对认证信息的请求指令,将认证信息发送至所述智能锁;
    其中,所述认证信息包括所述智能卡的卡标识和卡状态,所述认证信息用于所述智能锁在所述卡状态为已发钥匙状态,且所述卡标识位于所述白名单时表征所述智能卡为已认证智能卡时,确定智能卡满足第二认证条件。
  41. 根据权利要求39所述的智能卡,其特征在于,所述认证模块,用于接收所述智能锁发送的第二随机数获取请求;生成第二随机数;并将所述第二随机数发送至所述智能锁,所述第二随机数由所述智能锁采用预先存储的开锁密钥中的外部认证密钥进行加密,得到第四加密信息并返回;接收所述第四加密信息;采用预先存储的开锁密钥中的外部认证密钥对所述第四加密信息进行解密,得到所述第二随机数;根据所生成的第二随机数,对所述第二随机数进行校验,得到所述外部认证结果。
  42. 根据权利要求39所述的智能卡,其特征在于,所述获取模块,用于接收所述智能锁发送的第三随机数;采用预先存储的开锁密钥中的内部认证密钥,对所述第三随机数进行加密,得到第五加密信息;将所述第五加密信息发送至所述智能锁,所述第五加密信息由所述智能锁采用预先存储的开锁密钥中的内部认证密钥进行解密,得到所述第三随机数,并对所述第三随机数进行校验,得到所述内部认证结果。
  43. 一种智能锁系统,其特征在于,包括:如权利要求22至32任一项提供的智能锁,以及如权利要求33至42任一项提供的至少一个智能卡。
  44. 一种智能卡认证装置,其特征在于,包括:
    处理器;
    用于存储处理器可执行的指令的存储器;
    其中,所述处理器被配置为:
    根据智能卡提供的认证信息,确定所述智能卡是否满足第一认证条件;
    响应于所述智能卡满足所述第一认证条件,将生成的开锁密钥发送至所述智能卡;
    响应于接收到所述智能卡的反馈,将所述智能卡确定为已认证智能卡。
  45. 一种智能卡认证装置,其特征在于,包括:
    处理器;
    用于存储处理器可执行的指令的存储器;
    其中,所述处理器被配置为:
    向智能锁提供认证信息;
    接收智能锁发送的开锁密钥,所述开锁密钥为所述智能锁根据所述认证信息确定所述智能卡满足第一认证条件时发送;
    向所述智能锁发送反馈信息。
PCT/CN2018/124180 2018-11-23 2018-12-27 智能卡认证方法、智能锁、智能卡、系统及装置 WO2020103284A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811410112.9 2018-11-23
CN201811410112.9A CN109493488B (zh) 2018-11-23 2018-11-23 智能卡认证方法、智能锁、智能卡、系统及装置

Publications (1)

Publication Number Publication Date
WO2020103284A1 true WO2020103284A1 (zh) 2020-05-28

Family

ID=65697604

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/124180 WO2020103284A1 (zh) 2018-11-23 2018-12-27 智能卡认证方法、智能锁、智能卡、系统及装置

Country Status (4)

Country Link
US (1) US20200169550A1 (zh)
EP (1) EP3657370B1 (zh)
CN (1) CN109493488B (zh)
WO (1) WO2020103284A1 (zh)

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104765999B (zh) * 2014-01-07 2020-06-30 腾讯科技(深圳)有限公司 一种对用户资源信息进行处理的方法、终端及服务器
CN112102524A (zh) * 2019-06-18 2020-12-18 杭州萤石软件有限公司 开锁方法和开锁系统
CN112149099B (zh) * 2019-06-26 2024-02-13 天地融科技股份有限公司 一种办公安全控制方法、安全键盘及办公系统
CN112150682A (zh) 2019-06-27 2020-12-29 北京小米移动软件有限公司 一种智能门禁卡、智能门锁终端及智能门禁卡识别方法
CN110473327B (zh) * 2019-09-05 2020-11-24 广东纬德信息科技股份有限公司 一种基于nfc的锁控制方法、系统及存储介质
CN110784541A (zh) * 2019-10-31 2020-02-11 北京小米移动软件有限公司 信息处理方法、装置、系统和存储介质
CN111132127B (zh) * 2019-12-19 2023-05-23 恒宝股份有限公司 一种智能卡及其管理方法
CN111065081A (zh) * 2019-12-30 2020-04-24 上海博泰悦臻网络技术服务有限公司 一种基于蓝牙的信息交互方法及其装置
CN111460427A (zh) * 2020-02-26 2020-07-28 上海钧正网络科技有限公司 一种供电设备的绑定方法、装置、存储介质及设备
CN113873513A (zh) * 2020-06-30 2021-12-31 云丁网络技术(北京)有限公司 用于处理控制密钥的方法和装置
CN112598827B (zh) * 2020-12-25 2023-01-20 北京智芯微电子科技有限公司 智能锁认证方法、安全芯片、智能锁及其管理系统
CN112712623A (zh) * 2020-12-29 2021-04-27 北京深思数盾科技股份有限公司 门禁系统及其处理方法以及终端子系统
TWI773072B (zh) * 2021-01-05 2022-08-01 亞旭電腦股份有限公司 場域的登入系統和登入方法
CN112950817B (zh) * 2021-01-28 2022-12-02 深圳市凯迪仕智能科技有限公司 一种分体式智能锁的加密通讯方法及分体式智能锁
CN113162771B (zh) * 2021-04-25 2022-09-16 广州羊城通有限公司 一种智能卡应用管理方法、装置及系统
CN113840270A (zh) * 2021-08-16 2021-12-24 百度在线网络技术(北京)有限公司 蓝牙连接的建立方法、装置、设备和存储介质
CN113596842B (zh) * 2021-09-26 2022-02-22 云丁网络技术(北京)有限公司 一种控制方法、系统、以及相关装置
CN113823024A (zh) * 2021-11-23 2021-12-21 云丁网络技术(北京)有限公司 一种智能卡识别方法、装置及系统
CN115086072B (zh) * 2022-07-20 2022-12-16 紫光同芯微电子有限公司 一种智能卡攻击测试方法及装置
CN115915131B (zh) * 2022-10-20 2023-11-10 远峰科技股份有限公司 车辆钥匙双向加密认证方法、系统、车辆绑定装置及nfc卡

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246607A (zh) * 2007-02-13 2008-08-20 陈年 门禁系统的数字认证控制方法以及应用该方法的门禁系统
US20130307691A1 (en) * 2012-05-18 2013-11-21 Ojmar, S.A. Electronic lock with optical detection for detecting an enabler
JP6123197B2 (ja) * 2012-09-12 2017-05-10 中国電力株式会社 入退室管理システム
CN107978047A (zh) * 2017-12-04 2018-05-01 北京深思数盾科技股份有限公司 使用密码开锁的方法、装置和系统
CN108551455A (zh) * 2018-04-24 2018-09-18 北京小米移动软件有限公司 智能卡的配置方法及装置

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5268963A (en) * 1992-06-09 1993-12-07 Audio Digital Imaging Inc. System for encoding personalized identification for storage on memory storage devices
US7389530B2 (en) * 2003-09-12 2008-06-17 International Business Machines Corporation Portable electronic door opener device and method for secure door opening
CN201145918Y (zh) * 2008-01-16 2008-11-05 湖南工业职业技术学院 一种联网安全门禁装置
CN102257540A (zh) * 2008-12-19 2011-11-23 Nxp股份有限公司 增强智能卡使用
CN101798889B (zh) * 2010-03-15 2013-05-01 郎孙俊 电子密码开锁方法和电子密码锁装置
CN103839305B (zh) * 2012-11-22 2016-08-24 海尔集团公司 一种门禁系统及门禁系统权限管理的方法
CN203520493U (zh) * 2013-11-07 2014-04-02 国家电网公司 一种智能锁芯、智能锁及智能钥匙
CN104376631B (zh) * 2014-12-09 2017-01-04 天津光电安辰信息技术有限公司 一种基于商用密码算法的安全门禁系统的实现方法
CN104933797A (zh) * 2015-06-30 2015-09-23 武汉天喻信息产业股份有限公司 一种基于动态令牌的智能卡门禁控制系统及方法
CN105184929B (zh) * 2015-09-30 2018-09-14 深圳市章陈融通科技有限公司 智能门锁控制方法及装置
EP3374740A4 (en) * 2015-12-07 2019-09-25 Capital One Services, LLC ELECTRONIC ACCESS CONTROL SYSTEM
CN105608775B (zh) * 2016-01-27 2018-12-28 大唐微电子技术有限公司 一种鉴权的方法、终端、门禁卡及sam卡
WO2017212659A1 (ja) * 2016-06-07 2017-12-14 Connected Design株式会社 管理装置、制御方法およびプログラム
CN107886600A (zh) * 2016-09-30 2018-04-06 凯健企业股份有限公司 具有认证功能的锁系统、电子锁、便携装置以及配对方法
JP6857725B2 (ja) * 2016-11-18 2021-04-14 パーマネント プライバシー エルティディー 不正コピー用の保護(アンチクローニング)方法とシステム

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246607A (zh) * 2007-02-13 2008-08-20 陈年 门禁系统的数字认证控制方法以及应用该方法的门禁系统
US20130307691A1 (en) * 2012-05-18 2013-11-21 Ojmar, S.A. Electronic lock with optical detection for detecting an enabler
JP6123197B2 (ja) * 2012-09-12 2017-05-10 中国電力株式会社 入退室管理システム
CN107978047A (zh) * 2017-12-04 2018-05-01 北京深思数盾科技股份有限公司 使用密码开锁的方法、装置和系统
CN108551455A (zh) * 2018-04-24 2018-09-18 北京小米移动软件有限公司 智能卡的配置方法及装置

Also Published As

Publication number Publication date
CN109493488B (zh) 2020-11-10
EP3657370B1 (en) 2023-11-29
CN109493488A (zh) 2019-03-19
US20200169550A1 (en) 2020-05-28
EP3657370A1 (en) 2020-05-27

Similar Documents

Publication Publication Date Title
WO2020103284A1 (zh) 智能卡认证方法、智能锁、智能卡、系统及装置
JP6374010B2 (ja) 情報交信方法、装置および電子機器
WO2020143414A1 (zh) 无线网络接入方法、装置、设备及系统
CN108269334A (zh) 开锁方法、终端设备以及智能锁
WO2019104690A1 (zh) 移动网络接入认证方法、装置、存储介质及区块链节点
WO2017035988A1 (zh) 确定用户设备控制权限的方法、装置及终端设备
CN110245144A (zh) 协议数据管理方法、装置、存储介质及系统
CN109146470A (zh) 生成付款码的方法及装置
CN104852911A (zh) 安全验证方法、装置及系统
KR101688182B1 (ko) 위조 방지 검증 방법, 장치, 시스템, 프로그램 및 저장매체
KR101639147B1 (ko) 음성 서비스에서의 정보 송신 방법, 장치, 프로그램 및 기록매체
KR102301742B1 (ko) 키패드 없는 스마트 도어락 키 등록 및 사용방법과 그 출입관리 시스템
CN105491250A (zh) 来电号码真伪的识别方法、装置及设备
CN107766701A (zh) 电子设备、动态库文件保护方法及装置
CN108898388B (zh) 支付方法及装置
CN108696361B (zh) 智能卡的配置方法、生成方法及装置
CN112182647A (zh) 数据读取方法及装置、数据授权方法及装置、存储介质
CN105282162A (zh) 账号管理业务的处理方法及装置
CN114221764A (zh) 基于区块链的公钥更新方法、装置和设备
CN105120452B (zh) 传输信息的方法、装置及系统
CN106534083B (zh) 刷机工具验证方法及装置
CN112115464A (zh) 解锁处理方法、装置、电子设备及存储介质
CN108924136B (zh) 授权认证方法、装置及存储介质
WO2023245356A1 (zh) 电子设备的充电方法、充电装置、电子设备及存储介质
WO2023236042A1 (zh) 一种生物特征识别方法、装置、电子设备及存储介质

Legal Events

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

Ref document number: 18940725

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18940725

Country of ref document: EP

Kind code of ref document: A1