WO2019161674A1 - Battery recognition method, unmanned aerial vehicle and battery - Google Patents

Battery recognition method, unmanned aerial vehicle and battery Download PDF

Info

Publication number
WO2019161674A1
WO2019161674A1 PCT/CN2018/111730 CN2018111730W WO2019161674A1 WO 2019161674 A1 WO2019161674 A1 WO 2019161674A1 CN 2018111730 W CN2018111730 W CN 2018111730W WO 2019161674 A1 WO2019161674 A1 WO 2019161674A1
Authority
WO
WIPO (PCT)
Prior art keywords
authentication code
battery
key
code
sha
Prior art date
Application number
PCT/CN2018/111730
Other languages
French (fr)
Chinese (zh)
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 WO2019161674A1 publication Critical patent/WO2019161674A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3239Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving non-keyed hash functions, e.g. modification detection codes [MDCs], MD5, SHA or RIPEMD
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • H04L9/3242Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions involving keyed hash functions, e.g. message authentication codes [MACs], CBC-MAC or HMAC

Definitions

  • the present invention relates to the field of battery identification technologies, and in particular, to a battery identification method, a drone, and a battery.
  • drones can be applied to many fields, such as electric power inspection, map mapping, traffic control security, advertising celebrations, etc., with broad development space.
  • the UAV industry is limited by the battery technology.
  • the flight time of a battery is generally short, and the high-rate battery is generally used.
  • the high-current charge and discharge makes the battery cycle performance worse.
  • Batteries generally support disassembly, so drone enthusiasts typically purchase multiple batteries for replacement. However, users are more likely to purchase batteries that are not produced by legally authorized manufacturers. Due to the unstable performance of the illegal battery, the drone cannot obtain stable power from the battery during use, and the probability of the drone falling from the air is greatly increased, thereby shortening the service life of the drone. Therefore, on the one hand, the UAV manufacturers use genuine batteries to protect consumers, and on the other hand, in order to protect their own commercial interests, the batteries are certified and recognized when they are used.
  • the conventional battery identification method is a method of hardware resistance recognition, but the security is low and easy to crack.
  • Embodiments of the present invention provide a battery identification method, a drone, and a battery to improve the safety of the battery identification of the drone.
  • an embodiment of the present invention provides a battery identification method, including:
  • the first key is the same as the second key.
  • an embodiment of the present invention provides a battery identification method, including:
  • the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm
  • the first key is the same as the second key.
  • an embodiment of the present invention provides a drone, including:
  • a processing module for generating an input code
  • a sending module configured to send the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
  • a receiving module configured to receive the first authentication code sent by the battery
  • the processing module is further configured to generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
  • the first key is the same as the second key.
  • an embodiment of the present invention provides a battery, including:
  • a receiving module configured to receive an input code sent by the drone
  • a processing module configured to generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key
  • a sending module configured to send the first authentication code to the drone, so that the drone according to the first authentication code and the second authentication code generated by the drone Identifying, by the battery, the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm; wherein the first key is the same as the second key .
  • the battery identification method, the drone, and the battery provided by the embodiment of the present invention generate an input code, and send the input code to the battery, so that the battery utilizes a secure hash algorithm according to the input code and the first key.
  • the SHA-1 algorithm generates a first authentication code, receives the first authentication code sent by the battery, and generates a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
  • the authentication code and the second authentication code identify the battery, wherein the first key is the same as the second key, and the SHA-1 algorithm uses a SHA-1 algorithm because of the high security of the SHA-1 algorithm.
  • the identification process is highly secure, as long as the key in the battery is different from the key of the drone, the identification is unsuccessful and the use of illegal batteries is avoided.
  • FIG. 1 is a schematic flow chart of an embodiment of a battery identification method provided by the present invention.
  • FIG. 2 is a schematic flow chart of another embodiment of a battery identification method provided by the present invention.
  • FIG. 3 is a schematic flow chart of still another embodiment of a battery identification method provided by the present invention.
  • FIG. 4 is a schematic structural view of an embodiment of a drone provided by the present invention.
  • FIG. 5 is a schematic structural view of an embodiment of a battery provided by the present invention.
  • FIG. 6 is a schematic structural view of another embodiment of the drone provided by the present invention.
  • FIG. 7 is a schematic structural view of another embodiment of a battery provided by the present invention.
  • the method of the embodiment of the present invention can be applied to the UAV to identify the battery used in the UAV. It should be noted that the method of the embodiment of the present invention can also be applied to other devices, and the present invention does not limited.
  • the battery identification method of the embodiment of the present invention aims to improve the safety of the battery identification process, thereby preventing the user from using the illegal battery and avoiding the problem that the life of the drone is shortened due to the use of the illegal battery.
  • FIG. 1 is a schematic flow chart of an embodiment of a battery identification method provided by the present invention. As shown in FIG. 1 and FIG. 2, the method provided in this embodiment includes:
  • Step 101 Generate an input code, and send the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key.
  • SHA Secure Hash Algorithm
  • the SHA-1 algorithm is one of the five algorithms in the SHA family.
  • step 101 can be implemented in the following manner:
  • the 160-bit input code that satisfies the security criteria required by the SHA-1 algorithm is generated using a random function.
  • the host of the drone will first randomly generate a 160-bit input code M that satisfies safety standards, such as the FIPS PUB 140-2 standard (NIST issued safety requirements standard), using a random function.
  • safety standards such as the FIPS PUB 140-2 standard (NIST issued safety requirements standard)
  • the battery After the input code M is generated, it needs to be sent to the battery, so that the battery can generate the first authentication code by using the SHA-1 algorithm according to the input code and the first key (such as the key K2 in FIG. 2) (as shown in FIG. 2).
  • Authentication code HMAC2 The first key is the key of the SHA-1 algorithm saved in the battery.
  • Step 102 Receive the first authentication code sent by the battery.
  • Step 103 Generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key.
  • the drone In this step, the drone generates a second authentication code by using the SHA-1 algorithm according to the input code and the second key.
  • the second key is the same as the first key, so as to ensure that the generated first authentication code and the second authentication code are the same, so that the success can be recognized.
  • step 103 can be implemented in the following manner:
  • the data is divided into blocks according to the 512-bit data of each block.
  • the SHA-1 algorithm is a data encryption algorithm.
  • the idea of the algorithm is to receive a plaintext, then embed the key, and then convert it into a set of 160-bit (20-byte) message digests with an irreversible hash operation. It can also be simply understood as a process of taking a sequence of input sequences and converting the input sequence into a short-length, fixed-digit output sequence, a hash value (also known as a message digest or information authentication code). Since the SHA-1 algorithm is irreversible and has a good avalanche effect, it is generally impossible to derive any original input sequence from the hash result, and any change in the original input sequence, even one bit, will result in a difference in hash results.
  • the specific generation process of the authentication code is: inserting the input code into the second key (such as the key K1 in FIG. 2) to generate the first data string; then performing the complement, complementing to a multiple of 512, and then following each block 512.
  • the bit is subjected to data partitioning to obtain at least one data block, and then a hash operation of the SHA-1 algorithm is used to obtain a 160-bit second authentication code (such as the authentication code HMAC1 in FIG. 2).
  • Step 104 Identify the battery according to the first authentication code and the second authentication code.
  • step 104 can be implemented in the following manner:
  • the battery is allowed to be used
  • the first authentication code and the second authentication code are used for identification. If the first authentication code and the second authentication code are the same, the identification is successful, and the drone is allowed to use.
  • the battery if the first authentication code and the second authentication code are different, indicating that the first key and the second key are different, the battery may not be a battery produced by a legal authorized manufacturer, and the drone will not allow the battery to be used. An error message or shut down the system of the drone.
  • the battery powers the drone before the battery is successfully identified, and the drone uses the power provided by the battery to identify the battery. Once the battery is identified as an illegal smart battery, the battery is no longer allowed to be used. .
  • the error prompt can be a voice prompt and/or a text prompt or the like.
  • steps 102 and 103 are not in any order, and 102 may be executed before 103, or after, or simultaneously, which is not limited by the present invention.
  • the SHA-1 encryption algorithm is irreversible, anti-collision, and has a good avalanche effect, if the crack requires an operation of the order of 2 ⁇ 160, the security is high.
  • the reliability of the identification method is high as long as the key is not leaked.
  • an input code is generated, and the input code is sent to a battery, so that the battery generates a first authentication by using a secure hash algorithm SHA-1 algorithm according to the input code and the first key.
  • receiving the first authentication code sent by the battery generating a second authentication code by using a SHA-1 algorithm according to the input code and the second key; and according to the first authentication code and the second authentication
  • the code identifies the battery, wherein the first key is the same as the second key, and the security of the SHA-1 algorithm is higher because of the higher security of the SHA-1 algorithm. As long as the key in the battery is different from the key of the drone, the identification is unsuccessful and the use of illegal batteries is avoided.
  • the above identification process using the SHA-1 algorithm is a process of communicating with each other, which requires the battery and the host of the drone to follow the SHA-1 protocol. Since the battery generally uses the power management chip with SHA-1 protocol, the SHA-1 protocol of the power management chip can be directly used without adding code to the battery microprocessor. If the power management chip used does not support SHA- 1 protocol, you need to add the code supporting the SHA-1 protocol in the battery's microprocessor. The host of the same drone also adds code to support the SHA-1 protocol. In order for the drone to successfully identify the battery, we need to set the same 128-bit key in the battery and the host of the drone. Take the Texas Instruments TI's power management chip as an example.
  • the battery-side power management chip can use the bqstudio host computer software to change the key K2 through the Change Key option in the SHA authentication function module. (The power must be decrypted before changing the value. Management chip), the initial default value is "0123456789ABCDEFFEDCBA9876543210", the default value is hexadecimal, for example, changed to "FEDCBA98765432100123456789ABCDEF". The host side of the drone only needs to modify the key K1 to "FEDCBA98765432100123456789ABCDEF" in the system code.
  • the SHA-1 encryption algorithm of the power management chip of the battery itself is fully utilized, which can greatly reduce the program space of the microprocessor, and can reduce the development cost and the development cycle.
  • FIG. 3 is a schematic flow chart of another embodiment of a battery identification method provided by the present invention. As shown in FIG. 3, the method provided in this embodiment includes:
  • Step 301 Receive an input code sent by the drone
  • Step 302 Generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key.
  • Step 303 Send the first authentication code to the drone, so that the drone performs the battery according to the first authentication code and the second authentication code generated by the drone. Identifying; the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm.
  • the first key is the same as the second key.
  • the UAV when the UAV recognizes the battery, the generated input code is sent to the battery, and the battery generates the first authentication code by using the SHA-1 algorithm according to the input code and the first key, and then sends the first authentication code.
  • the UAV identifies the second authentication code generated by itself and the received first authentication code, specifically comparing whether the first authentication code and the second authentication code are the same. If the same, the identification is successful, otherwise the identification fails.
  • step 302 can be implemented in the following manner:
  • the data is divided into blocks according to the 512-bit data of each block.
  • the process of generating the first authentication code in the battery is similar to that in the drone, and details are not described herein again.
  • the battery identification method of the embodiment receiving an input code sent by the drone; generating a first authentication code by using a SHA-1 algorithm according to the input code and the first key; and sending the first authentication code to the a drone, wherein the drone identifies the battery according to the first authentication code and a second authentication code generated by the drone; the second authentication code is the drone Generating according to the input code and the second key by using a SHA-1 algorithm, where the first key is the same as the second key, and because the security of the SHA-1 algorithm is high, the SHA- is adopted. 1
  • the identification process of the algorithm is highly secure. As long as the key in the battery is different from the key of the drone, the identification is unsuccessful and the use of illegal batteries is avoided.
  • the unmanned aerial vehicle of the present embodiment includes:
  • a processing module 401 configured to generate an input code
  • the sending module 402 is configured to send the input code to the battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
  • the receiving module 403 is configured to receive the first authentication code sent by the battery
  • the processing module 401 is further configured to generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
  • the first key is the same as the second key.
  • processing module 401 is specifically configured to:
  • the 160-bit input code that satisfies the security criteria required by the SHA-1 algorithm is generated using a random function.
  • processing module 401 is specifically configured to:
  • the processing module 401 is specifically configured to:
  • Data is divided into blocks of 512 bits of data.
  • processing module 401 is specifically configured to:
  • the battery is allowed to be used
  • the device in this embodiment may be used to perform the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
  • FIG. 5 is a structural diagram of an embodiment of a battery provided by the present invention. As shown in FIG. 5, the battery of this embodiment includes:
  • the receiving module 501 is configured to receive an input code sent by the drone
  • the processing module 502 is configured to generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
  • the sending module 503 is configured to send the first authentication code to the drone, so that the drone is based on the first authentication code and the second authentication code generated by the drone.
  • the battery is identified; the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm; wherein the first key and the second key are the same.
  • processing module 502 is specifically configured to:
  • the processing module 401 is specifically configured to:
  • Data is divided into blocks of 512 bits of data.
  • the device in this embodiment may be used to perform the technical solution of the method embodiment shown in FIG. 3, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • FIG. 6 is a structural diagram of another embodiment of a drone provided by the present invention. As shown in FIG. 6, the drone includes:
  • the processor 601 is configured to perform the corresponding method in the foregoing method embodiment by executing the executable instruction.
  • the drone communication port enables communication between the drone and the battery for information transmission and reception.
  • FIG. 7 is a structural diagram of another embodiment of a battery provided by the present invention. As shown in FIG. 7, the battery includes:
  • a processor 701 a battery communication port (not shown), and a memory 702 for storing executable instructions of the processor 701.
  • a power module is further included for supplying power to the drone.
  • the processor 701 is configured to perform the corresponding method in the foregoing method embodiment by executing the executable instruction.
  • the battery communication port enables communication between the battery and the drone for information transmission and reception.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer program is stored, and when the computer program is executed by the processor, the corresponding method in the foregoing method embodiment is implemented, and the specific implementation process can be implemented by referring to the foregoing method. For example, the implementation principle and technical effects are similar, and will not be described here.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The present invention provides a battery recognition method, an unmanned aerial vehicle and a battery. The method is applied to unmanned aerial vehicles, and the method comprises: generating an input code, and sending the input code to a battery, so that the battery generates a first authentication code by using an SHA-1 algorithm according to the input code and a first key; receiving the first authentication code sent by the battery; according to the input code and a second key, generating a second authentication code by using the SHA-1 algorithm; recognizing the battery according to the first authentication code and the second authentication code; the first key being the same as the second key. The recognition algorithm provided in the embodiment of the present invention uses the SHA-1 algorithm for encryption, and achieves high security.

Description

电池识别方法、无人机及电池Battery identification method, drone and battery
申请要求于2018年2月24日申请的、申请号为201810157670.2、申请名称为“电池识别方法、无人机及电池”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The application claims priority to Chinese Patent Application No. 20110115767, filed on Feb. 24, 20,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
技术领域Technical field
本发明涉及电池识别技术领域,尤其涉及一种电池识别方法、无人机及电池。The present invention relates to the field of battery identification technologies, and in particular, to a battery identification method, a drone, and a battery.
背景技术Background technique
随着科学技术的进步,无人机可应用于诸多领域,如电力巡检、地图测绘、交管安防、广告庆典等,具有广阔的发展空间。With the advancement of science and technology, drones can be applied to many fields, such as electric power inspection, map mapping, traffic control security, advertising celebrations, etc., with broad development space.
目前无人机行业,由于受到电池技术的限制,一块电池的飞行时间普遍偏短,而且一般使用的是高倍率的电池,加上大电流充放电使得电池的循环性能较差,由于无人机电池一般都支持拆卸使用,因此无人机爱好者一般都会购买多个电池,以便替换使用。但是用户很有可能购买到不是合法授权厂家生产的电池。由于非法电池的性能不稳定,在使用过程中无人机无法从电池中获得稳定电能,导致无人机从空中摔下来的概率大大增加,从而缩短无人机的使用寿命。因此无人机厂家一方面为了保护消费者使用的是正品电池,另一方面为了保护自己的商业利益,在使用时都会对电池进行认证识别。At present, the UAV industry is limited by the battery technology. The flight time of a battery is generally short, and the high-rate battery is generally used. The high-current charge and discharge makes the battery cycle performance worse. Batteries generally support disassembly, so drone enthusiasts typically purchase multiple batteries for replacement. However, users are more likely to purchase batteries that are not produced by legally authorized manufacturers. Due to the unstable performance of the illegal battery, the drone cannot obtain stable power from the battery during use, and the probability of the drone falling from the air is greatly increased, thereby shortening the service life of the drone. Therefore, on the one hand, the UAV manufacturers use genuine batteries to protect consumers, and on the other hand, in order to protect their own commercial interests, the batteries are certified and recognized when they are used.
目前常规的电池识别方式,是硬件电阻识别的方式,但是安全性较低,容易破解。At present, the conventional battery identification method is a method of hardware resistance recognition, but the security is low and easy to crack.
发明内容Summary of the invention
本发明实施例提供一种电池识别方法、无人机及电池,以提高无人机电池识别的安全性。Embodiments of the present invention provide a battery identification method, a drone, and a battery to improve the safety of the battery identification of the drone.
第一方面,本发明实施例提供一种电池识别方法,包括:In a first aspect, an embodiment of the present invention provides a battery identification method, including:
生成输入码,并将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用SHA-1算法生成第一认证码;Generating an input code, and transmitting the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
接收所述电池发送的所述第一认证码;Receiving the first authentication code sent by the battery;
根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;Generating a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
根据所述第一认证码和所述第二认证码对所述电池进行识别;Identifying the battery according to the first authentication code and the second authentication code;
其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
第二方面,本发明实施例提供一种电池识别方法,包括:In a second aspect, an embodiment of the present invention provides a battery identification method, including:
接收无人机发送的输入码;Receiving an input code sent by the drone;
根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;Generating a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的;Sending the first authentication code to the drone, so that the drone identifies the battery according to the first authentication code and the second authentication code generated by the drone; The second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm;
其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
第三方面,本发明实施例提供一种无人机,包括:In a third aspect, an embodiment of the present invention provides a drone, including:
处理模块,用于生成输入码;a processing module for generating an input code;
发送模块,用于将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用SHA-1算法生成第一认证码;a sending module, configured to send the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
接收模块,用于接收所述电池发送的所述第一认证码;a receiving module, configured to receive the first authentication code sent by the battery;
所述处理模块,还用于根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;The processing module is further configured to generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
根据所述第一认证码和所述第二认证码对所述电池进行识别;Identifying the battery according to the first authentication code and the second authentication code;
其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
第四方面,本发明实施例提供一种电池,包括:In a fourth aspect, an embodiment of the present invention provides a battery, including:
接收模块,用于接收无人机发送的输入码;a receiving module, configured to receive an input code sent by the drone;
处理模块,用于根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;a processing module, configured to generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
发送模块,用于将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的;其中,所述第一秘钥与所述第二秘钥相同。a sending module, configured to send the first authentication code to the drone, so that the drone according to the first authentication code and the second authentication code generated by the drone Identifying, by the battery, the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm; wherein the first key is the same as the second key .
本发明实施例提供的电池识别方法、无人机及电池,生成输入码,并将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用安全哈希算法SHA-1算法生成第一认证码;接收所述电池发送的所述第一认证码;根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;根据所述第一认证码和所述第二认证码对所述电池进行识别,其中,所述第一秘钥与所述第二秘钥相同,由于SHA-1算法的安全性较高,因此采用SHA-1算法的识别过程安全性较高,只要电池中的密钥与无人机的密钥不同则就会识别不成功,避免了使用非法电池的情况发生。The battery identification method, the drone, and the battery provided by the embodiment of the present invention generate an input code, and send the input code to the battery, so that the battery utilizes a secure hash algorithm according to the input code and the first key. The SHA-1 algorithm generates a first authentication code, receives the first authentication code sent by the battery, and generates a second authentication code by using a SHA-1 algorithm according to the input code and the second key; The authentication code and the second authentication code identify the battery, wherein the first key is the same as the second key, and the SHA-1 algorithm uses a SHA-1 algorithm because of the high security of the SHA-1 algorithm. The identification process is highly secure, as long as the key in the battery is different from the key of the drone, the identification is unsuccessful and the use of illegal batteries is avoided.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他实施例的附图。此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and those skilled in the art can obtain drawings of other embodiments according to the drawings without any creative work. The accompanying drawings, which are incorporated in the specification
图1是本发明提供的电池识别方法一实施例的流程示意图;1 is a schematic flow chart of an embodiment of a battery identification method provided by the present invention;
图2是本发明提供的电池识别方法另一实施例的流程示意图;2 is a schematic flow chart of another embodiment of a battery identification method provided by the present invention;
图3是本发明提供的电池识别方法又一实施例的流程示意图3 is a schematic flow chart of still another embodiment of a battery identification method provided by the present invention.
图4是本发明提供的无人机一实施例的结构示意图;4 is a schematic structural view of an embodiment of a drone provided by the present invention;
图5是本发明提供的电池一实施例的结构示意图;5 is a schematic structural view of an embodiment of a battery provided by the present invention;
图6是本发明提供的无人机另一实施例的结构示意图;6 is a schematic structural view of another embodiment of the drone provided by the present invention;
图7是本发明提供的电池另一实施例的结构示意图。FIG. 7 is a schematic structural view of another embodiment of a battery provided by the present invention.
通过上述附图,已示出本公开明确的实施例,后文中将有更详细的描述。这些附图和文字描述并不是为了通过任何方式限制本公开构思的范围,而是通过参考特定实施例为本领域技术人员说明本公开的概念。The embodiments of the present disclosure have been shown by the above-described drawings, which will be described in more detail later. The drawings and the text are not intended to limit the scope of the present disclosure in any way, and the description of the present disclosure will be described by those skilled in the art by reference to the specific embodiments.
具体实施方式Detailed ways
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相 似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的方法和装置的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. The following description of the drawings refers to the same or similar elements in the different figures unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of methods and apparatus consistent with aspects of the present disclosure as detailed in the appended claims.
本发明的说明书和权利要求书及所述附图中的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。The terms "comprises" and "comprising" and variations of the invention are intended to be inclusive of the invention. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively Other steps or units inherent to these processes, methods, products or equipment.
本发明实施例的方法可以应用于无人机中,对无人机中使用的电池进行识别,需要说明的是,本发明实施例的方法还可以应用于其他设备中,本发明对此并不限定。The method of the embodiment of the present invention can be applied to the UAV to identify the battery used in the UAV. It should be noted that the method of the embodiment of the present invention can also be applied to other devices, and the present invention does not limited.
本发明实施例的电池识别方法,旨在提高电池识别过程的安全性,从而避免用户使用非法电池,以及避免由于使用非法电池导致的无人机的使用寿命缩短的问题。The battery identification method of the embodiment of the present invention aims to improve the safety of the battery identification process, thereby preventing the user from using the illegal battery and avoiding the problem that the life of the drone is shortened due to the use of the illegal battery.
下面以具体地实施例对本发明的技术方案进行详细说明。下面这几个具体的实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。The technical solutions of the present invention will be described in detail below with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in some embodiments.
图1是本发明提供的电池识别方法一实施例的流程示意图。如图1、图2所示,本实施例提供的方法,包括:FIG. 1 is a schematic flow chart of an embodiment of a battery identification method provided by the present invention. As shown in FIG. 1 and FIG. 2, the method provided in this embodiment includes:
步骤101、生成输入码,并将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用SHA-1算法生成第一认证码。Step 101: Generate an input code, and send the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key.
SHA(Secure Hash Algorithm,安全散列算法)又称哈希算法,其中SHA-1算法是SHA家族中五个算法之一。SHA (Secure Hash Algorithm) is also called hash algorithm. The SHA-1 algorithm is one of the five algorithms in the SHA family.
本步骤中,在电池安装于无人机上,需要生成输入码,以便后续步骤识别该电池是否为合法授权厂商生产的电池,一旦识别为非法电池,则无人机将不允许使用该电池。In this step, when the battery is installed on the drone, an input code needs to be generated, so that the subsequent step identifies whether the battery is a battery produced by a legal authorized manufacturer. Once the battery is identified as an illegal battery, the drone will not be allowed to use the battery.
可选的,步骤101具体可以采用如下方式实现:Optionally, step 101 can be implemented in the following manner:
利用随机函数生成满足所述SHA-1算法要求的安全标准的160位的所述输入码。The 160-bit input code that satisfies the security criteria required by the SHA-1 algorithm is generated using a random function.
具体的,在识别时,首先无人机的主机将利用随机函数随机产生一个满 足安全标准,如FIPS PUB 140–2标准(NIST发布的安全需求标准)的160位输入码M。Specifically, at the time of identification, the host of the drone will first randomly generate a 160-bit input code M that satisfies safety standards, such as the FIPS PUB 140-2 standard (NIST issued safety requirements standard), using a random function.
在生成输入码M后,需要发送给电池,使得电池可以根据该输入码和第一密钥(如图2中的密钥K2)利用SHA-1算法生成第一认证码(如图2中的认证码HMAC2)。第一密钥为电池中保存的SHA-1算法的密钥。After the input code M is generated, it needs to be sent to the battery, so that the battery can generate the first authentication code by using the SHA-1 algorithm according to the input code and the first key (such as the key K2 in FIG. 2) (as shown in FIG. 2). Authentication code HMAC2). The first key is the key of the SHA-1 algorithm saved in the battery.
步骤102、接收所述电池发送的所述第一认证码。Step 102: Receive the first authentication code sent by the battery.
步骤103、根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码。Step 103: Generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key.
本步骤中,无人机根据输入码和第二密钥,利用SHA-1算法生成第二认证码。In this step, the drone generates a second authentication code by using the SHA-1 algorithm according to the input code and the second key.
其中,第二密钥与第一密钥相同,以保证生成的第一认证码和第二认证码相同,从而能够识别成功。The second key is the same as the first key, so as to ensure that the generated first authentication code and the second authentication code are the same, so that the success can be recognized.
可选的,步骤103具体可以采用如下方式实现:Optionally, step 103 can be implemented in the following manner:
将所述输入码嵌入所述第二密钥中生成第一数据串;Embedding the input code into the second key to generate a first data string;
对所述第一数据串进行补位以及数据分块,得到至少一个数据块;Compensating the first data string and data blocking to obtain at least one data block;
对至少一个所述数据块利用SHA-1算法生成所述第二认证码。Generating the second authentication code using at least one of the data blocks using a SHA-1 algorithm.
可选的,所述对所述第二数据串进行补位以及数据分块,得到至少一个数据块的步骤中,按照每块512位的数据进行数据分块。Optionally, in the step of performing the complementing of the second data string and the data partitioning to obtain at least one data block, the data is divided into blocks according to the 512-bit data of each block.
SHA-1算法是一种数据加密算法,该算法的思想是接收一段明文,然后嵌入密钥,然后以一种不可逆的散列运算将它转换成一组160位(20字节)的报文摘要,也可以简单的理解为取一串输入序列,并把该输入序列转化为长度较短、位数固定的输出序列,即散列值(也称为信息摘要或信息认证码)的过程。由于SHA-1算法具有不可逆性和良好的雪崩效应,所以一般不能从散列结果推导出任何的原始输入序列,并且原始输入序列任何的改变,哪怕一位,都会造成散列结果的差异。The SHA-1 algorithm is a data encryption algorithm. The idea of the algorithm is to receive a plaintext, then embed the key, and then convert it into a set of 160-bit (20-byte) message digests with an irreversible hash operation. It can also be simply understood as a process of taking a sequence of input sequences and converting the input sequence into a short-length, fixed-digit output sequence, a hash value (also known as a message digest or information authentication code). Since the SHA-1 algorithm is irreversible and has a good avalanche effect, it is generally impossible to derive any original input sequence from the hash result, and any change in the original input sequence, even one bit, will result in a difference in hash results.
认证码的具体生成过程为,将输入码嵌入第二密钥(如图2中的密钥K1)中生成第一数据串;然后进行补位,补位到512的倍数,然后按照每块512位进行数据分块,得到至少一个数据块,然后利用SHA-1算法的散列运算得到160位的第二认证码(如图2中的认证码HMAC1)。The specific generation process of the authentication code is: inserting the input code into the second key (such as the key K1 in FIG. 2) to generate the first data string; then performing the complement, complementing to a multiple of 512, and then following each block 512. The bit is subjected to data partitioning to obtain at least one data block, and then a hash operation of the SHA-1 algorithm is used to obtain a 160-bit second authentication code (such as the authentication code HMAC1 in FIG. 2).
步骤104、根据所述第一认证码和所述第二认证码对所述电池进行识别。Step 104: Identify the battery according to the first authentication code and the second authentication code.
可选的,步骤104具体可以采用如下方式实现:Optionally, step 104 can be implemented in the following manner:
将所述第一认证码和所述第二认证码进行比较;Comparing the first authentication code with the second authentication code;
若所述第一认证码和所述第二认证码相同,则允许使用所述电池;If the first authentication code and the second authentication code are the same, the battery is allowed to be used;
若所述第一认证码和所述第二认证码相同,则进行错误提示,或关闭所述无人机。If the first authentication code and the second authentication code are the same, an error prompt is made, or the drone is turned off.
具体的,在接收到电池发送的第一认证码后,根据第一认证码和第二认证码进行识别,若第一认证码和第二认证码相同,则识别成功,无人机才允许使用该电池;若第一认证码和第二认证码不相同,说明第一密钥和第二密钥不同,电池可能不是合法授权厂商生产的电池,无人机将不允许使用该电池,可以进行错误提示或者关闭该无人机的系统。Specifically, after receiving the first authentication code sent by the battery, the first authentication code and the second authentication code are used for identification. If the first authentication code and the second authentication code are the same, the identification is successful, and the drone is allowed to use. The battery; if the first authentication code and the second authentication code are different, indicating that the first key and the second key are different, the battery may not be a battery produced by a legal authorized manufacturer, and the drone will not allow the battery to be used. An error message or shut down the system of the drone.
在一些实施方式中,在电池被识别成功之前,电池给无人机供电,无人机利用电池提供的电能进行识别,一旦识别出电池为非法智能电池,则不再允许使用该电池提供的电能。In some embodiments, the battery powers the drone before the battery is successfully identified, and the drone uses the power provided by the battery to identify the battery. Once the battery is identified as an illegal smart battery, the battery is no longer allowed to be used. .
在一些实施方式中,错误提示可以是语音提示和/或文字提示等。In some embodiments, the error prompt can be a voice prompt and/or a text prompt or the like.
需要说明的是,步骤102和103不分前后顺序,102可以在103之前执行,或之后执行,或同时执行,本发明对此并不限定。It should be noted that steps 102 and 103 are not in any order, and 102 may be executed before 103, or after, or simultaneously, which is not limited by the present invention.
由于SHA-1加密算法不可逆、防冲突、有良好的雪崩效应,如果破解需要2^160数量级的操作,因此安全性较高。Since the SHA-1 encryption algorithm is irreversible, anti-collision, and has a good avalanche effect, if the crack requires an operation of the order of 2^160, the security is high.
上述识别过程中,只要密钥不泄露,则识别方法的可靠性较高。In the above identification process, the reliability of the identification method is high as long as the key is not leaked.
本实施例的电池识别方法,生成输入码,并将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用安全哈希算法SHA-1算法生成第一认证码;接收所述电池发送的所述第一认证码;根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;根据所述第一认证码和所述第二认证码对所述电池进行识别,其中,所述第一秘钥与所述第二秘钥相同,由于SHA-1算法的安全性较高,因此采用SHA-1算法的识别过程安全性较高,只要电池中的密钥与无人机的密钥不同则就会识别不成功,避免了使用非法电池的情况发生。In the battery identification method of the embodiment, an input code is generated, and the input code is sent to a battery, so that the battery generates a first authentication by using a secure hash algorithm SHA-1 algorithm according to the input code and the first key. And receiving the first authentication code sent by the battery; generating a second authentication code by using a SHA-1 algorithm according to the input code and the second key; and according to the first authentication code and the second authentication The code identifies the battery, wherein the first key is the same as the second key, and the security of the SHA-1 algorithm is higher because of the higher security of the SHA-1 algorithm. As long as the key in the battery is different from the key of the drone, the identification is unsuccessful and the use of illegal batteries is avoided.
在上述实施例的基础上,上述利用SHA-1算法的识别过程是一个互相通信的过程,这就需要电池和无人机的主机都要遵循SHA-1协议才能实现。 由于电池一般都会使用具有SHA-1协议的电量管理芯片,所以可以直接使用电量管理芯片的SHA-1协议而无需在电池的微处理器里增加代码,如果所使用的电量管理芯片不支持SHA-1协议,则要在电池的微处理器里增加支持SHA-1协议的代码。同理无人机的主机也要增加支持SHA-1协议的代码。为了能使无人机对电池识别成功,我们需要在电池和无人机的主机中设置相同的128位密钥。以德州仪器TI的电量管理芯片为例,其中电池端电量管理芯片可以使用bqstudio上位机软件通过SHA认证(Authentication)功能模块里的Change Key选项改变这个密钥K2(改变该值之前要先解密电量管理芯片),初始的默认值是“0123456789ABCDEFFEDCBA9876543210”,默认值为16进制数,例如改成“FEDCBA98765432100123456789ABCDEF”。无人机的主机端只需要在系统的代码里修改密钥K1为“FEDCBA98765432100123456789ABCDEF”即可。Based on the above embodiments, the above identification process using the SHA-1 algorithm is a process of communicating with each other, which requires the battery and the host of the drone to follow the SHA-1 protocol. Since the battery generally uses the power management chip with SHA-1 protocol, the SHA-1 protocol of the power management chip can be directly used without adding code to the battery microprocessor. If the power management chip used does not support SHA- 1 protocol, you need to add the code supporting the SHA-1 protocol in the battery's microprocessor. The host of the same drone also adds code to support the SHA-1 protocol. In order for the drone to successfully identify the battery, we need to set the same 128-bit key in the battery and the host of the drone. Take the Texas Instruments TI's power management chip as an example. The battery-side power management chip can use the bqstudio host computer software to change the key K2 through the Change Key option in the SHA authentication function module. (The power must be decrypted before changing the value. Management chip), the initial default value is "0123456789ABCDEFFEDCBA9876543210", the default value is hexadecimal, for example, changed to "FEDCBA98765432100123456789ABCDEF". The host side of the drone only needs to modify the key K1 to "FEDCBA98765432100123456789ABCDEF" in the system code.
本实施例的方法中充分利用了电池本身具有的电量管理芯片的SHA-1加密算法,可以极大的减少微处理器的程序空间,可以减少开发成本和开发周期。In the method of the embodiment, the SHA-1 encryption algorithm of the power management chip of the battery itself is fully utilized, which can greatly reduce the program space of the microprocessor, and can reduce the development cost and the development cycle.
图3是本发明提供的电池识别方法另一实施例的流程示意图。如图3所示,本实施例提供的方法,包括:FIG. 3 is a schematic flow chart of another embodiment of a battery identification method provided by the present invention. As shown in FIG. 3, the method provided in this embodiment includes:
步骤301、接收无人机发送的输入码;Step 301: Receive an input code sent by the drone;
步骤302、根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;Step 302: Generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key.
步骤303、将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的。Step 303: Send the first authentication code to the drone, so that the drone performs the battery according to the first authentication code and the second authentication code generated by the drone. Identifying; the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm.
其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
具体的,无人机在对电池进行识别时,将生成的输入码发送给电池,电池根据输入码和第一密钥,利用SHA-1算法生成第一认证码,然后将第一认证码发送给无人机。无人机根据自身生成的第二认证码以及接收到的第一认 证码进行识别,具体是比较第一认证码和第二认证码是否相同,若相同则识别成功,否则识别失败。Specifically, when the UAV recognizes the battery, the generated input code is sent to the battery, and the battery generates the first authentication code by using the SHA-1 algorithm according to the input code and the first key, and then sends the first authentication code. Give the drone. The UAV identifies the second authentication code generated by itself and the received first authentication code, specifically comparing whether the first authentication code and the second authentication code are the same. If the same, the identification is successful, otherwise the identification fails.
可选的,步骤302具体可以采用如下方式实现:Optionally, step 302 can be implemented in the following manner:
将所述输入码嵌入所述第一密钥中生成第二数据串;Embedding the input code into the first key to generate a second data string;
对所述第二数据串进行补位以及数据分块,得到至少一个数据块;Compensating the second data string and data blocking to obtain at least one data block;
对至少一个所述数据块利用SHA-1算法生成所述第一认证码。Generating the first authentication code using at least one of the data blocks using a SHA-1 algorithm.
可选的,所述对所述第二数据串进行补位以及数据分块,得到至少一个数据块的步骤中,按照每块512位的数据进行数据分块。Optionally, in the step of performing the complementing of the second data string and the data partitioning to obtain at least one data block, the data is divided into blocks according to the 512-bit data of each block.
具体的,电池中生成第一认证码的过程与无人机中的类似,此处不再赘述。Specifically, the process of generating the first authentication code in the battery is similar to that in the drone, and details are not described herein again.
本实施例的方法,其实现原理与图1所示的方法实施例类似,此处不再赘述。The implementation principle of the method in this embodiment is similar to the method embodiment shown in FIG. 1, and details are not described herein again.
本实施例的电池识别方法,接收无人机发送的输入码;根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的,其中,所述第一秘钥与所述第二秘钥相同,由于SHA-1算法的安全性较高,因此采用SHA-1算法的识别过程安全性较高,只要电池中的密钥与无人机的密钥不同则就会识别不成功,避免了使用非法电池的情况发生。The battery identification method of the embodiment, receiving an input code sent by the drone; generating a first authentication code by using a SHA-1 algorithm according to the input code and the first key; and sending the first authentication code to the a drone, wherein the drone identifies the battery according to the first authentication code and a second authentication code generated by the drone; the second authentication code is the drone Generating according to the input code and the second key by using a SHA-1 algorithm, where the first key is the same as the second key, and because the security of the SHA-1 algorithm is high, the SHA- is adopted. 1 The identification process of the algorithm is highly secure. As long as the key in the battery is different from the key of the drone, the identification is unsuccessful and the use of illegal batteries is avoided.
图4为本发明提供的无人机一实施例的结构图,如图3所示,本实施例的无人机,包括:4 is a structural diagram of an unmanned aerial vehicle according to an embodiment of the present invention. As shown in FIG. 3, the unmanned aerial vehicle of the present embodiment includes:
处理模块401,用于生成输入码;a processing module 401, configured to generate an input code;
发送模块402,用于将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用SHA-1算法生成第一认证码;The sending module 402 is configured to send the input code to the battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
接收模块403,用于接收所述电池发送的所述第一认证码;The receiving module 403 is configured to receive the first authentication code sent by the battery;
所述处理模块401,还用于根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;The processing module 401 is further configured to generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
根据所述第一认证码和所述第二认证码对所述电池进行识别;Identifying the battery according to the first authentication code and the second authentication code;
其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
可选的,所述处理模块401,具体用于:Optionally, the processing module 401 is specifically configured to:
利用随机函数生成满足所述SHA-1算法要求的安全标准的160位的所述输入码。The 160-bit input code that satisfies the security criteria required by the SHA-1 algorithm is generated using a random function.
可选的,所述处理模块401,具体用于:Optionally, the processing module 401 is specifically configured to:
将所述输入码嵌入所述第二密钥中生成第一数据串;Embedding the input code into the second key to generate a first data string;
对所述第一数据串进行补位以及数据分块,得到至少一个数据块;Compensating the first data string and data blocking to obtain at least one data block;
对至少一个所述数据块利用SHA-1算法生成所述第二认证码。Generating the second authentication code using at least one of the data blocks using a SHA-1 algorithm.
其中,对于数据分块,所述处理模块401,具体用于:The processing module 401 is specifically configured to:
按照每块512位的数据进行数据分块。Data is divided into blocks of 512 bits of data.
可选的,所述处理模块401,具体用于:Optionally, the processing module 401 is specifically configured to:
将所述第一认证码和所述第二认证码进行比较;Comparing the first authentication code with the second authentication code;
若所述第一认证码和所述第二认证码相同,则允许使用所述电池;If the first authentication code and the second authentication code are the same, the battery is allowed to be used;
若所述第一认证码和所述第二认证码相同,则进行错误提示,或关闭所述无人机。If the first authentication code and the second authentication code are the same, an error prompt is made, or the drone is turned off.
本实施例的装置,可以用于执行上述如图1所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device in this embodiment may be used to perform the technical solution of the method embodiment shown in FIG. 1 , and the implementation principle and technical effects are similar, and details are not described herein again.
图5为本发明提供的电池一实施例的结构图,如图5所示,本实施例的电池,包括:FIG. 5 is a structural diagram of an embodiment of a battery provided by the present invention. As shown in FIG. 5, the battery of this embodiment includes:
接收模块501,用于接收无人机发送的输入码;The receiving module 501 is configured to receive an input code sent by the drone;
处理模块502,用于根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;The processing module 502 is configured to generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
发送模块503,用于将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的;其中,所述第一秘钥与所述第二秘钥相同。The sending module 503 is configured to send the first authentication code to the drone, so that the drone is based on the first authentication code and the second authentication code generated by the drone. The battery is identified; the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm; wherein the first key and the second key are the same.
可选的,所述处理模块502,具体用于:Optionally, the processing module 502 is specifically configured to:
将所述输入码嵌入所述第一密钥中生成第二数据串;Embedding the input code into the first key to generate a second data string;
对所述第二数据串进行补位以及数据分块,得到至少一个数据块;Compensating the second data string and data blocking to obtain at least one data block;
对至少一个所述数据块利用SHA-1算法生成所述第一认证码。Generating the first authentication code using at least one of the data blocks using a SHA-1 algorithm.
其中,对于数据分块,所述处理模块401,具体用于:The processing module 401 is specifically configured to:
按照每块512位的数据进行数据分块。Data is divided into blocks of 512 bits of data.
本实施例的装置,可以用于执行上述如图3所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The device in this embodiment may be used to perform the technical solution of the method embodiment shown in FIG. 3, and the implementation principle and the technical effect are similar, and details are not described herein again.
图6为本发明提供的无人机另一实施例的结构图,如图6所示,该无人机包括:FIG. 6 is a structural diagram of another embodiment of a drone provided by the present invention. As shown in FIG. 6, the drone includes:
处理器601,无人机通信端口(图未示),以及,用于存储处理器601的可执行指令的存储器602。A processor 601, a drone communication port (not shown), and a memory 602 for storing executable instructions of the processor 601.
其中,处理器601配置为经由执行所述可执行指令来执行前述方法实施例中对应的方法,其具体实施过程可以参见前述方法实施例,此处不再赘述。无人机通信端口可以实现无人机与电池之间的通信以进行信息的发送和接收。The processor 601 is configured to perform the corresponding method in the foregoing method embodiment by executing the executable instruction. For the specific implementation process, refer to the foregoing method embodiment, and details are not described herein again. The drone communication port enables communication between the drone and the battery for information transmission and reception.
图7为本发明提供的电池另一实施例的结构图,如图7所示,该电池包括:FIG. 7 is a structural diagram of another embodiment of a battery provided by the present invention. As shown in FIG. 7, the battery includes:
处理器701,电池通信端口(图未示),以及,用于存储处理器701的可执行指令的存储器702。A processor 701, a battery communication port (not shown), and a memory 702 for storing executable instructions of the processor 701.
可选的,还包括电源模块,用于给所述无人机供电。Optionally, a power module is further included for supplying power to the drone.
其中,处理器701配置为经由执行所述可执行指令来执行前述方法实施例中对应的方法,其具体实施过程可以参见前述方法实施例,此处不再赘述。电池通信端口可以实现电池与无人机之间的通信以进行信息的发送和接收。The processor 701 is configured to perform the corresponding method in the foregoing method embodiment by executing the executable instruction. For the specific implementation process, refer to the foregoing method embodiment, and details are not described herein again. The battery communication port enables communication between the battery and the drone for information transmission and reception.
本发明实施例中还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现前述方法实施例中对应的方法,其具体实施过程可以参见前述方法实施例,其实现原理和技术效果类似,此处不再赘述。The embodiment of the present invention further provides a computer readable storage medium, where the computer program is stored, and when the computer program is executed by the processor, the corresponding method in the foregoing method embodiment is implemented, and the specific implementation process can be implemented by referring to the foregoing method. For example, the implementation principle and technical effects are similar, and will not be described here.
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本发明旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包 括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求书指出。Other embodiments of the present disclosure will be apparent to those skilled in the <RTIgt; The present invention is intended to cover any variations, uses, or adaptations of the present disclosure, which are in accordance with the general principles of the present disclosure and include common general knowledge or common technical means in the art that are not disclosed in the present disclosure. . The specification and examples are to be regarded as illustrative only,
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求书来限制。It is to be understood that the invention is not limited to the details of the details and The scope of the disclosure is to be limited only by the appended claims.

Claims (12)

  1. 一种电池识别方法,其特征在于,应用于无人机,所述方法包括:A battery identification method is characterized in that it is applied to a drone, and the method includes:
    生成输入码,并将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用SHA-1算法生成第一认证码;Generating an input code, and transmitting the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
    接收所述电池发送的所述第一认证码;Receiving the first authentication code sent by the battery;
    根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;Generating a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
    根据所述第一认证码和所述第二认证码对所述电池进行识别;Identifying the battery according to the first authentication code and the second authentication code;
    其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
  2. 根据权利要求1所述的方法,其特征在于,所述生成输入码,具体包括:The method according to claim 1, wherein the generating the input code comprises:
    利用随机函数生成满足所述SHA-1算法要求的安全标准的160位的所述输入码。The 160-bit input code that satisfies the security criteria required by the SHA-1 algorithm is generated using a random function.
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码,具体包括:The method according to claim 1, wherein the generating the second authentication code by using the SHA-1 algorithm according to the input code and the second key comprises:
    将所述输入码嵌入所述第二密钥中生成第一数据串;Embedding the input code into the second key to generate a first data string;
    对所述第一数据串进行补位以及数据分块,得到至少一个数据块;Compensating the first data string and data blocking to obtain at least one data block;
    对至少一个所述数据块利用SHA-1算法生成所述第二认证码。Generating the second authentication code using at least one of the data blocks using a SHA-1 algorithm.
  4. 根据权利要求3所述的方法,其特征在于,所述对所述第一数据串进行补位以及数据分块,得到至少一个数据块的步骤中,按照每块512位的数据进行数据分块。The method according to claim 3, wherein in the step of performing the complementing of the first data string and the data partitioning to obtain at least one data block, the data is divided into blocks according to 512 bits of data per block. .
  5. 根据权利要求1所述的方法,其特征在于,所述根据所述第一认证码和所述第二认证码对所述电池进行识别,具体包括:The method according to claim 1, wherein the identifying the battery according to the first authentication code and the second authentication code comprises:
    将所述第一认证码和所述第二认证码进行比较;Comparing the first authentication code with the second authentication code;
    若所述第一认证码和所述第二认证码相同,则允许使用所述电池;If the first authentication code and the second authentication code are the same, the battery is allowed to be used;
    若所述第一认证码和所述第二认证码相同,则进行错误提示,或关闭所述无人机。If the first authentication code and the second authentication code are the same, an error prompt is made, or the drone is turned off.
  6. 一种电池识别方法,其特征在于,应用于无人机的电池,所述方法包括:A battery identification method, characterized by being applied to a battery of a drone, the method comprising:
    接收无人机发送的输入码;Receiving an input code sent by the drone;
    根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;Generating a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
    将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的;Sending the first authentication code to the drone, so that the drone identifies the battery according to the first authentication code and the second authentication code generated by the drone; The second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm;
    其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码,具体包括:The method according to claim 6, wherein the generating the first authentication code by using the SHA-1 algorithm according to the input code and the first key comprises:
    将所述输入码嵌入所述第一密钥中生成第二数据串;Embedding the input code into the first key to generate a second data string;
    对所述第二数据串进行补位以及数据分块,得到至少一个数据块;Compensating the second data string and data blocking to obtain at least one data block;
    对至少一个所述数据块利用SHA-1算法生成所述第一认证码。Generating the first authentication code using at least one of the data blocks using a SHA-1 algorithm.
  8. 根据权利要求7所述的方法,其特征在于,所述对所述第二数据串进行补位以及数据分块,得到至少一个数据块的步骤中,按照每块512位的数据进行数据分块。The method according to claim 7, wherein in the step of performing the complementing of the second data string and the data partitioning to obtain at least one data block, the data is divided into blocks according to 512 bits of data per block. .
  9. 一种无人机,其特征在于,包括:A drone, characterized in that it comprises:
    处理模块,用于生成输入码;a processing module for generating an input code;
    发送模块,用于将所述输入码发送给电池,以使所述电池根据所述输入码和第一密钥利用SHA-1算法生成第一认证码;a sending module, configured to send the input code to a battery, so that the battery generates a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
    接收模块,用于接收所述电池发送的所述第一认证码;a receiving module, configured to receive the first authentication code sent by the battery;
    所述处理模块,还用于根据所述输入码和第二密钥,利用SHA-1算法生成第二认证码;The processing module is further configured to generate a second authentication code by using a SHA-1 algorithm according to the input code and the second key;
    根据所述第一认证码和所述第二认证码对所述电池进行识别;Identifying the battery according to the first authentication code and the second authentication code;
    其中,所述第一秘钥与所述第二秘钥相同。The first key is the same as the second key.
  10. 根据权利要求9所述的无人机,其特征在于,所述处理模块,具体用于:The UAV according to claim 9, wherein the processing module is specifically configured to:
    将所述输入码嵌入所述第二密钥中生成第一数据串;Embedding the input code into the second key to generate a first data string;
    对所述第一数据串进行补位以及数据分块,得到至少一个数据块;Compensating the first data string and data blocking to obtain at least one data block;
    对至少一个所述数据块利用SHA-1算法生成所述第二认证码。Generating the second authentication code using at least one of the data blocks using a SHA-1 algorithm.
  11. 一种电池,其特征在于,包括:A battery, comprising:
    接收模块,用于接收无人机发送的输入码;a receiving module, configured to receive an input code sent by the drone;
    处理模块,用于根据所述输入码和第一密钥,利用SHA-1算法生成第一认证码;a processing module, configured to generate a first authentication code by using a SHA-1 algorithm according to the input code and the first key;
    发送模块,用于将所述第一认证码发送给所述无人机,以使所述无人机根据所述第一认证码以及所述无人机生成的第二认证码,对所述电池进行识别;所述第二认证码为所述无人机根据所述输入码和第二密钥利用SHA-1算法生成的;其中,所述第一秘钥与所述第二秘钥相同。a sending module, configured to send the first authentication code to the drone, so that the drone according to the first authentication code and the second authentication code generated by the drone Identifying, by the battery, the second authentication code is generated by the UAV according to the input code and the second key by using a SHA-1 algorithm; wherein the first key is the same as the second key .
  12. 根据权利要求11所述的电池,其特征在于,所述处理模块,具体用于:The battery according to claim 11, wherein the processing module is specifically configured to:
    将所述输入码嵌入所述第一密钥中生成第二数据串;Embedding the input code into the first key to generate a second data string;
    对所述第二数据串进行补位以及数据分块,得到至少一个数据块;Compensating the second data string and data blocking to obtain at least one data block;
    对至少一个所述数据块利用SHA-1算法生成所述第一认证码。Generating the first authentication code using at least one of the data blocks using a SHA-1 algorithm.
PCT/CN2018/111730 2018-02-24 2018-10-24 Battery recognition method, unmanned aerial vehicle and battery WO2019161674A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810157670.2 2018-02-24
CN201810157670.2A CN108377191A (en) 2018-02-24 2018-02-24 Battery discriminating method, unmanned plane and battery

Publications (1)

Publication Number Publication Date
WO2019161674A1 true WO2019161674A1 (en) 2019-08-29

Family

ID=63017983

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/111730 WO2019161674A1 (en) 2018-02-24 2018-10-24 Battery recognition method, unmanned aerial vehicle and battery

Country Status (2)

Country Link
CN (1) CN108377191A (en)
WO (1) WO2019161674A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108377191A (en) * 2018-02-24 2018-08-07 深圳市道通智能航空技术有限公司 Battery discriminating method, unmanned plane and battery
US11433853B2 (en) 2019-03-29 2022-09-06 Guangzhou Xiaopeng Motors Technology Co., Ltd. Vehicle unlocking authentication method and apparatus based on terminal device
CN110011811B (en) * 2019-03-29 2020-04-24 广州小鹏汽车科技有限公司 Vehicle unlocking authentication method and device based on terminal equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070278992A1 (en) * 2006-05-30 2007-12-06 Paul Christopher R System and method for authenticating a battery
CN105793815A (en) * 2013-12-03 2016-07-20 无线电系统公司 Method and apparatus for verifying battery authenticity
CN106060079A (en) * 2016-07-11 2016-10-26 顺丰科技有限公司 Unmanned aerial vehicle authentication system and method
WO2016171222A1 (en) * 2015-04-21 2016-10-27 国立大学法人 東京大学 Safety management system for aircraft
CN108377191A (en) * 2018-02-24 2018-08-07 深圳市道通智能航空技术有限公司 Battery discriminating method, unmanned plane and battery

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101060405A (en) * 2006-04-19 2007-10-24 华为技术有限公司 A method and system for preventing the replay attack
CN101291227A (en) * 2008-06-06 2008-10-22 薛明 Password inputting method, device and system
US8965681B2 (en) * 2008-09-03 2015-02-24 Global Relief Technologies, Inc. Field device communications
CN106200534B (en) * 2016-08-29 2019-04-05 天津远度科技有限公司 A kind of unmanned plane battery discriminating method, system and unmanned plane, intelligent battery device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070278992A1 (en) * 2006-05-30 2007-12-06 Paul Christopher R System and method for authenticating a battery
CN105793815A (en) * 2013-12-03 2016-07-20 无线电系统公司 Method and apparatus for verifying battery authenticity
WO2016171222A1 (en) * 2015-04-21 2016-10-27 国立大学法人 東京大学 Safety management system for aircraft
CN106060079A (en) * 2016-07-11 2016-10-26 顺丰科技有限公司 Unmanned aerial vehicle authentication system and method
CN108377191A (en) * 2018-02-24 2018-08-07 深圳市道通智能航空技术有限公司 Battery discriminating method, unmanned plane and battery

Also Published As

Publication number Publication date
CN108377191A (en) 2018-08-07

Similar Documents

Publication Publication Date Title
CN106464499B (en) Communication network system, transmission node, reception node, message checking method, transmission method, and reception method
CN107770182B (en) Data storage method of home gateway and home gateway
WO2021012552A1 (en) Login processing method and related device
US8677136B2 (en) Authenticating messages using cryptographic algorithm constants supplied to a storage-constrained target
WO2019161674A1 (en) Battery recognition method, unmanned aerial vehicle and battery
US20180205729A1 (en) Method and apparatus for encryption, decryption and authentication
KR20190033716A (en) Apparatus and method for communication using message history-based security key using blockchain
US10243829B2 (en) Communication protocol testing method, and tested device and testing platform thereof
CN109361520B (en) Internet of things equipment dynamic encryption method based on login serial number
WO2016116999A1 (en) Packet transmission device, packet-receiving device, packet transmission program, and packet-receiving program
US8933786B2 (en) RFID tag device and method of recognizing the same
JP2023533319A (en) FIRMWARE DATA VERIFICATION APPARATUS AND METHOD AND FIRMWARE UPDATE APPARATUS, METHOD AND SYSTEM
US10491570B2 (en) Method for transmitting data, method for receiving data, corresponding devices and programs
US10972441B2 (en) In-place authentication scheme for securing intra-vehicle communication
US10084778B2 (en) Communication device identification
CN114793184A (en) Security chip communication method and device based on third-party key management node
US9948614B1 (en) Remote device initialization using asymmetric cryptography
KR20200104084A (en) APPARATUS AND METHOD FOR AUTHENTICATING IoT DEVICE BASED ON PUF
US11240661B2 (en) Secure simultaneous authentication of equals anti-clogging mechanism
US10200356B2 (en) Information processing system, information processing apparatus, information processing method, and recording medium
US9438425B2 (en) Robust MAC aggregation with short MAC tags
US20190075454A1 (en) Transceiver system
CN114844716A (en) Digital signature message processing method, device, equipment and computer medium
CN113302961B (en) Safety beacon
KR101974411B1 (en) In-vehicle secure communication support device and operating method thereof

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: 18907460

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: 18907460

Country of ref document: EP

Kind code of ref document: A1