Serial number generation circuit and method for terminal to authenticate external device

By integrating the serial number generation circuit in the protection circuit of peripheral devices such as batteries, using high-frequency noise signals to generate device-specific serial numbers, and through the authentication process between terminals and peripherals, the problems of high key management costs and difficult to identify forged batteries in the prior art are solved, and more efficient and safe device authentication is achieved.

CN116418509BActive Publication Date: 2025-03-11SG MICRO CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111664791.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-03-11
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In the prior art, in the authentication process of peripheral devices such as batteries, there are problems such as high key allocation and management costs and high risks, and it is difficult to effectively identify counterfeit and inferior batteries through forged serial numbers.

Method used

A sequence number generation circuit integrated into the device is designed, a random number generation circuit is used to quantize the serial number of the device according to high-frequency noise signals, and authenticate the external device through a terminal, and a response code is obtained by encrypting the serial number and query code to determine the legality of the device.

Benefits of technology

It reduces the engineering cost of equipment management and certification, improves efficiency and security, avoids the forgery caused by serial number leakage, and increases the difficulty of forgery.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116418509B_ABST
    Figure CN116418509B_ABST
Patent Text Reader

Abstract

The present application discloses a serial number generation circuit and a method for a terminal to authenticate an external device. The serial number generation circuit includes: a random number generation circuit for quantizing and generating a first random number sequence according to a high-frequency noise signal; and a register circuit for receiving the first random number sequence and obtaining the serial number of the device according to the first random number sequence. The problem of assigning serial numbers to peripherals such as batteries in the existing authentication process is solved. Since a serial number generation circuit integrated in the device is used to generate a specific serial number for each device, there is no need to use a dedicated server to systematically manage these serial numbers, thereby avoiding the occurrence of counterfeiting problems caused by leakage of battery serial numbers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic technology, and more specifically, to a serial number generating circuit and a method for a terminal to authenticate an external device. Background Art

[0002] Mobile terminals such as mobile phones, tablets, and personal laptops are becoming more and more widely used as applications develop, which undoubtedly puts higher requirements on the batteries of mobile terminals. Due to the limited battery life of the batteries currently configured in mobile terminals, users usually need to equip additional batteries. However, there are many varieties of batteries on the market, and the quality is also uneven. Among them, fake and inferior batteries are flooding the market, accounting for a large proportion of the market. Among these fake and inferior batteries, some batteries have unstable voltage and current supply, and some batteries are prone to overheating and catching fire, which directly damages the user's mobile phone and even threatens the user's safety.

[0003] From the perspective of product safety management and guaranteeing the right to supply services, existing mobile phone and other terminal suppliers generally configure DS28E16 and other authentication chips in batteries. Most of these products use symmetric keys or asymmetric keys to encrypt during the authentication process. Whether it is symmetric keys or asymmetric keys, key distribution and management have a decisive impact on service costs and service efficiency, which is costly and has the risk of being cracked. In other manufacturers, each battery individual is generally assigned a specific serial number (i.e., ID) during the production process of batteries and other equipment, and the server records the serial number and confirms its validity. The effectiveness of this solution depends on the mutual confirmation between the authentication applicant and the server and its secure transmission method, which greatly reduces the cost of the battery authentication process. However, this solution requires some means to generate or manage the specific serial number of the battery individual. Once the counterfeit manufacturer obtains the serial number of a batch of batteries, there will still be many counterfeit batteries in the market, and the effect achieved is still not very great. Summary of the invention

[0004] In view of the above problems, the object of the present invention is to provide a serial number generating circuit and a method for a terminal to authenticate an external device, so as to reduce the engineering cost of device management and authentication and improve efficiency and security.

[0005] According to one aspect of an embodiment of the present invention, a serial number generation circuit integrated in a device is provided, comprising: a random number generation circuit for quantizing and generating a first random number sequence according to a high-frequency noise signal; and a register circuit for receiving the first random number sequence and obtaining a serial number of the device according to the first random number sequence.

[0006] Optionally, the random number generation circuit includes: a noise generation module, used to generate the high-frequency noise signal; a filtering module, a first end of which is coupled to the output end of the noise generation module; a logic output module, an input end of which is coupled to the second end of the filtering module, the logic output module being used to amplify the high-frequency noise signal to obtain the first random number sequence; and a negative feedback module, coupled between the output end of the noise generation module and the output end of the first random number sequence, for stabilizing the DC bias point of the logic amplifier.

[0007] Optionally, the noise generating module includes: a first resistor and a first transistor, coupled between a power supply terminal and a ground; and a second resistor, a first end of which is coupled to a common node of the first resistor and the first transistor, and a second end of which is coupled to a control terminal of the first transistor, wherein the common node of the first resistor and the first transistor is used to output the high-frequency noise signal.

[0008] Optionally, the filtering module includes: a first capacitor and a third resistor, which are coupled in parallel between the output end of the noise generating module and the input end of the logic output module.

[0009] Optionally, the logic output module includes: a fourth resistor, a second transistor and a fifth resistor, which are coupled between a power supply terminal and a ground in sequence, wherein the control terminal of the second transistor is coupled to the second terminal of the filtering module, and a common node between the fourth resistor and the second transistor is used to output the first random number sequence.

[0010] Optionally, the negative feedback module includes: a third transistor and a sixth resistor, coupled between the output terminal of the noise generating module and ground; a seventh resistor and an eighth resistor, coupled between the power supply terminal and ground, and a common node of the seventh resistor and the eighth resistor is coupled to the control terminal of the third transistor; a fourth transistor, a first terminal coupled to the power supply terminal, and a second terminal coupled to a common node of the third transistor and the sixth resistor; and a ninth resistor and a second capacitor, coupled between the output terminal of the first random number sequence and ground, and a common node of the second capacitor and the ninth resistor is coupled to the control terminal of the fourth transistor.

[0011] Optionally, the register circuit includes: a first clock end for receiving a first clock signal, the register circuit is configured to intercept a second random number sequence from the first random number sequence according to the first clock signal, and store the second random number sequence as the serial number.

[0012] Optionally, the register circuit further includes: a second clock terminal for receiving a second clock signal, and the register circuit is configured to read out the serial numbers sequentially according to the second clock signal after the storing.

[0013] Optionally, the register circuit is configured to allow reading only once after the serial number is generated.

[0014] Optionally, the serial number is used for information management, traceability, authentication or identity verification of the device.

[0015] Optionally, the register circuit is a volatile memory.

[0016] Optionally, the device is a battery, and the circuit is integrated into a battery protector in the battery.

[0017] According to another aspect of an embodiment of the present invention, a method for a terminal to authenticate an external device is provided, wherein the external device includes the above-mentioned serial number generating circuit, wherein the method includes: after the terminal is connected to the external device, the authentication module of the terminal generates a query code and transmits the query code to the external device, so that the external device obtains a response code by encrypting the serial number and the query code; the authentication module receives the response code and determines whether the external device is legal based on the response code.

[0018] Optionally, the step of encrypting the serial number and the challenge code to obtain a response code includes: encrypting the serial number using a preset public key to obtain a first ciphertext value; encrypting the challenge code using a preset subkey to obtain a second ciphertext value; and synthesizing the first ciphertext value and the second ciphertext value to obtain the response code.

[0019] Optionally, the step of determining whether the external device is legal based on the response code includes: using a preset public key to decrypt the first ciphertext value to obtain the serial number; selecting a root key based on the serial number, and using the root key to encrypt the query code to obtain a verification ciphertext value; and determining whether the external device is legal based on whether the verification ciphertext value is consistent with the second ciphertext value.

[0020] Optionally, the method further includes: storing the serial number of the external device and the corresponding root key in the terminal in advance when the terminal is connected to the external device for the first time.

[0021] Optionally, when the terminal is connected to the external device for the first time, the terminal connects the clock source signal to the serial number generation circuit of the device and reads the serial number and the root key, and after the reading, the serial number is prohibited from being directly read again.

[0022] Optionally, the encryption algorithm includes DES, 3DES, HMAC or SHA algorithm.

[0023] In summary, the serial number generating circuit integrated in the device provided by the present invention solves the problem of allocating serial numbers to peripherals such as batteries in the existing authentication process. Since the serial number generating circuit integrated in the device is used to generate a specific serial number for each device, there is no need to use a dedicated server to systematically manage these serial numbers, thereby avoiding the occurrence of counterfeiting problems caused by leakage of battery serial numbers.

[0024] The serial number generation circuit of the embodiment of the present invention allows reading only once after the serial number is generated, which can ensure that counterfeiters cannot steal the serial number stored in the mobile phone through the battery, avoid the risk of serial number leakage, further increase the difficulty of counterfeiting, and even if an external device is cracked, it cannot endanger the authentication of other external devices.

[0025] In addition, the serial number generating circuit of the present invention adopts an analog method to generate a random number sequence. Compared with the existing digital method, the circuit structure is simpler and the cost is lower. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0027] Figure 1 A schematic diagram showing the connection between a mobile terminal and a device to be authenticated according to an embodiment of the present invention is shown;

[0028] Figure 2 Show Figure 1 A schematic block diagram of a serial number generating circuit in;

[0029] Figure 3 Show Figure 2 A schematic circuit diagram of a random number generation circuit in;

[0030] Figure 4 A schematic flow chart of a method for a terminal to authenticate an external device according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0031] Various embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. In each of the accompanying drawings, the same elements are represented by the same or similar reference numerals. For the sake of clarity, the various parts in the accompanying drawings are not drawn to scale.

[0032] It should be understood that in the following description, a "circuit" may include a single or multiple combined hardware circuit, a programmable circuit, a state machine circuit and / or an element that can store instructions executed by a programmable circuit. When an element or circuit is said to be "connected to" another element or an element / circuit is said to be "connected between" two nodes, it can be directly coupled or connected to another element or there can be an intermediate element, and the connection between the elements can be physical, logical, or a combination thereof. On the contrary, when an element is said to be "directly coupled to" or "directly connected to" another element, it means that there is no intermediate element between the two.

[0033] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0034] In order to overcome the above problems, the present invention provides a serial number generating circuit integrated in a device, which allows a mobile terminal to distinguish whether the connected device is an authenticated device according to its serial number when connecting to the device.

[0035] See also Figure 1 , the device 100 includes a protection circuit, and a serial number generation circuit 101 and an encryption module 102 are integrated in the protection circuit. The device 100 may be an external device such as a lithium-ion battery, and the protection circuit is, for example, a battery protector. Unlike other chemical batteries, due to the dangers of lithium-ion batteries, international standards and safety regulations require that any lithium-ion battery must be equipped with a protection circuit. The present invention integrates a serial number generation circuit 101 in the protection circuit, and the serial number generation circuit 101 can generate a random number as a specific serial number ID of the device 100 when needed. When the mobile terminal 200 is connected to the device 100, the mobile terminal 200 authenticates the serial number ID of the device 100, thereby providing a most reasonable and efficient solution for battery identification. Furthermore, the mobile terminal 200 includes an authentication module 210, which initiates a legitimacy authentication of the device 100, thereby confirming whether the battery and other peripherals 100 are authenticated legitimate devices.

[0036] Among them, the authentication module 210 can be an independent authentication chip, which can be connected to the device 100 through a UART interface, an I2C interface, a GPIO interface or a wireless radio frequency interface for data communication.

[0037] Figure 2 Show Figure 1 A schematic block diagram of the serial number generation circuit in . Figure 2, the serial number generation circuit 101 includes a random number generation circuit 110 and a register circuit 120. The random number generation circuit 110 is used to quantize and generate a random number sequence D0 according to a high-frequency noise signal. The register circuit 120 is, for example, a shift-in and shift-out register, and has a data receiving end, a first clock end, a second clock end, and a data output end. The data receiving end of the register circuit 120 is used to receive the random number sequence D0, and the first clock end and the second clock end are used to receive the first clock signal CLK1 and the second clock signal CLK2 respectively. The register circuit 120 is used to intercept a section of the random number sequence in the random number sequence D0 according to the first clock signal CLK1 when needed, and store the intercepted random number sequence as the serial number ID, and after the storage is completed, sequentially shift out the serial number ID according to the second clock signal CLK2 for reading.

[0038] See also Figure 1 The mobile terminal 200 further includes a clock signal source 220 and a storage module 230. When the mobile terminal 200 is connected to the device 100, the clock signal source 220 provides the first clock signal CLK1 and the second clock signal CLK2 to the serial number generation circuit 101 to complete the generation and reading of the serial number ID. Further, the mobile terminal 200 stores the read serial number ID in the storage module 230 for retrieval in subsequent authentication operations.

[0039] In a further embodiment, the register circuit 120 of the present invention is also configured to allow direct reading only once after the serial number ID is generated. After this direct reading, the register circuit 120 cannot be directly read by the mobile terminal 200 and can only generate a query response in the authentication operation.

[0040] In a further embodiment, the register circuit 120 of the present invention is a volatile memory, that is, the stored serial number ID will not be maintained when the device 100 completely loses power. For example, when the battery 100 is damaged, its serial number ID will not be maintained and can only be regenerated through a reset operation. A new serial number.

[0041] Figure 3 Show Figure 2 Schematic diagram of the random number generation circuit in . See Figure 3 The random number generation circuit 110 of the present invention includes a noise generation module 1101 , a filtering module 1102 , a logic output module 1103 and a negative feedback module 1104 .

[0042] The noise generating module 1101 includes resistors R1 and R2 and a transistor Q1. The resistor R1 and the transistor Q1 are coupled between a power source P and a ground GND, a first end of the resistor R2 is coupled to a common node of the resistor R1 and the transistor Q1, and a second end is coupled to a gate of the transistor Q1. The transistor Q1 forms a high-frequency amplifier, and generates the high-frequency noise signal at its drain.

[0043] The filter module 1102 includes a capacitor C1 and a resistor R3. The first ends of the capacitor C1 and the resistor R3 are coupled to each other and to the output end of the noise generating module 1101, and the second ends of the capacitor C1 and the resistor R3 are coupled to each other and to the input end of the logic output module 1103. The capacitor C1 and the resistor R3 form a high-pass filter circuit, which separates the influence of the low-frequency bias control through high-pass filtering, so that the output of the logic output module 1103 is mainly determined by the high-frequency part of the high-frequency noise signal.

[0044] The logic output module 1103 includes a resistor R4, a transistor Q2 and a resistor R5 coupled between a power source P and a ground GND. The gate of the transistor Q2 is coupled to the second end of the filter module 1102 as an input end of the logic output module 1103, and the drain of the transistor Q2 is used to output a quantized random number sequence D0 of a string of "0" and "1".

[0045] The negative feedback module 1104 includes transistors Q3 and Q4, resistors R7 to R9, and capacitor C2. Among them, transistor Q3 and resistor R6 are coupled between the output end of the noise generation module 1101 and the ground GND. Resistors R7 and R8 are coupled between the power supply P and the ground GND, and the common node of resistors R7 and R8 is coupled to the gate of transistor Q3. Resistor R9 and capacitor C2 are coupled between the output end of the random number sequence D0 and the ground GND, the drain of transistor Q4 is coupled to the power supply P, the source is coupled to the common node between transistor Q3 and resistor R6, and the gate is coupled to the common node between resistor R9 and capacitor C2. Among them, resistor R9 and capacitor C2 constitute a low-pass filter circuit, and transistors Q3 and Q4 constitute a DC bias voltage stabilization circuit, which is used to adjust the center voltage of the gate bias of transistor Q2 according to the output feedback of the low-pass filter circuit to stabilize the entire transmission loop.

[0046] The random number generation circuit 110 of the present invention is based on the characteristics of random current jitter. In the MOS tube Q1, the Si or SiO2 surface of the substrate will emit or capture electrons according to the different voltages applied to the gate, thereby affecting the current on the drain and source of the transistor Q1, and the jitter of the noise current. Since the emission and capture of electrons have uncertainty characteristics in the quantum field, the occurrence of current jitter cannot be measured. Therefore, it can be considered that the voltage amplitude of the drain voltage of the transistor Q1 is completely random at this time. According to this characteristic, the drain voltage of the transistor Q1 is quantized into a string of "0" and "1", and a completely random digital sequence can be obtained. Therefore, the random number generation circuit 110 of this embodiment can obtain a true random number sequence, and then obtain a specific individual serial number for each device.

[0047] Furthermore, due to the frequency selection characteristics of the transmission process and the loop in the random number generation circuit 110 of this embodiment, the above circuit has good stable distribution characteristics only within a specific frequency range. Therefore, the clock frequency of the reading circuit, that is, the clock frequency of the first clock signal CLK1 and the second clock signal CLK2 needs to be set within the stable frequency range.

[0048] According to the concept of the present invention, a random number generation circuit is integrated in the battery protection circuit of the lithium-ion battery to generate a specific serial number for each battery, so that in actual production, there is no need to specifically assign a specific serial number to each battery, nor is there a need to use a dedicated server to systematically manage these serial numbers, thereby avoiding the phenomenon of counterfeiting caused by leakage of battery serial numbers. In addition, the serial number generation circuit integrated in the device of the present invention can be used in a variety of application scenarios by using the fingerprint serial number with the help of data service part binding and other registration information, such as information management, traceability, authentication or identity authentication of the device.

[0049] Figure 4 A schematic diagram of a process for authenticating an external device by a terminal according to an embodiment of the present invention is shown below. Figure 1 and Figure 4 The authentication method provided by the preferred embodiment of the present invention is described in detail.

[0050] In step S01, the mobile terminal 200 is connected to the external device 100, and the authentication module 210 of the mobile terminal 200 generates a challenge code and transmits the challenge code to the external device 100. Specifically, after the system of the mobile terminal 200 is powered on, the authentication module 210 is connected to the data interface of the encryption module 102 of the external device 100, and the authentication module 210 is used to initiate the authentication of the external device 100.

[0051] In step S02, the external device 100 encrypts the serial number and the challenge code to obtain a response code. Specifically, the external device 100 and the mobile terminal 200 may agree on an encryption algorithm and a key in advance, and the encryption algorithm includes, for example, DES, 3DES, HMAC or SHA, and the encryption algorithm and the key are stored in both the external device 100 and the mobile terminal 200. After receiving the challenge code, the encryption module of the external device 100 uses the pre-agreed encryption algorithm and public key to encrypt the serial number to obtain a first ciphertext value, and then uses the agreed encryption algorithm and subkey to encrypt the challenge code to obtain a second ciphertext value, and finally synthesizes the first ciphertext value and the second ciphertext value to obtain the response code.

[0052] In step S03, the authentication module 210 of the mobile terminal 200 receives the response code, and determines whether the external device 100 is legal based on the response code. Specifically, after receiving the response code, the authentication module 210 of the mobile terminal 200 can first use a pre-agreed encryption algorithm and a public key to decrypt the first ciphertext value, obtain the serial number therein, and then select a root key based on the obtained serial number, use the root key to encrypt the challenge code, obtain a verification ciphertext value, compare the verification ciphertext value with the second ciphertext value, and if the two are the same, it can be said that the external device 100 is a legal device for the mobile terminal 200.

[0053] In actual applications, a company can produce mobile terminals such as mobile phones and tablets and batteries, and can write the same encryption algorithm and key for mobile terminals such as mobile phones and tablets and batteries during the production process, or agree with the battery supplier to write the same encryption algorithm and key into mobile terminals such as mobile phones and tablets and batteries, respectively, to ensure that the legitimacy of the battery can be authenticated using the mobile terminal during use. Further, since the embodiment of the present invention does not assign a serial number to each battery, but the battery itself generates its own specific serial number, the embodiment of the present invention also includes a process of storing the serial number of the battery and the corresponding root key in the mobile terminal in advance when the battery and the mobile terminal are connected for the first time. For example, after a company produces and sells mobile phones and batteries, when the user turns on the phone for the first time, the mobile phone connects the clock source signal to the serial number generation circuit of the battery, and reads the serial number and root key of the battery bit by bit according to the clock, and stores them in the storage module 230. When the user turns on the phone again, the mobile phone executes the above authentication process to authenticate the legitimacy of the battery.

[0054] Furthermore, the serial number generation circuit of the embodiment of the present invention is only allowed to be read once after the serial number is generated. After reading, the serial number generation circuit on the battery end will be prohibited from being directly read again, thereby ensuring that counterfeit manufacturers cannot steal the serial number stored on the mobile phone end, avoiding the risk of serial number leakage.

[0055] The serial number generating circuit integrated in the device provided by the present invention solves the problem of allocating serial numbers to peripherals such as batteries in the existing authentication process. Since the serial number generating circuit integrated in the device is used to generate a specific serial number for each device, there is no need to use a dedicated server to systematically manage these serial numbers, thereby avoiding the occurrence of counterfeiting problems caused by leakage of battery serial numbers.

[0056] The serial number generation circuit of the embodiment of the present invention allows reading only once after the serial number is generated, which can ensure that counterfeiters cannot steal the serial number stored in the mobile phone through the battery, avoid the risk of serial number leakage, further increase the difficulty of counterfeiting, and even if an external device is cracked, it cannot endanger the authentication of other external devices.

[0057] In addition, the serial number generating circuit of the present invention adopts an analog method to generate a random number sequence. Compared with the existing digital method, the circuit structure is simpler and the cost is lower.

[0058] In addition, by utilizing the fingerprint serial number with the help of data service part binding and other registration information, the serial number generation circuit integrated into the device of the present invention can also be used in a variety of application scenarios, such as device information management, traceability, authentication or identity authentication, etc., which can further improve the security of identity authentication and authorization, and the modification requirements for the mobile terminal are also very small.

[0059] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0060] According to the embodiments of the present invention, as described above, these embodiments do not describe all the details in detail, nor do they limit the invention to specific embodiments. Obviously, many modifications and changes can be made based on the above description. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can make good use of the present invention and the modified use based on the present invention. The scope of protection of the present invention shall be based on the scope defined by the claims of the present invention.

Claims

1. A serial number generating circuit integrated in a device, comprising: A random number generation circuit, used for quantizing and generating a first random number sequence according to a high-frequency noise signal; as well as a register circuit, receiving the first random number sequence, and obtaining a serial number of the device according to the first random number sequence, Wherein, the random number generation circuit comprises: A noise generating module, used for generating the high-frequency noise signal, the noise generating module comprising: a first resistor and a first transistor, coupled between a power supply terminal and a ground; and a second resistor, a first end of which is coupled to a common node of the first resistor and the first transistor, and a second end of which is coupled to a control terminal of the first transistor, wherein the first transistor constitutes a high-frequency amplifier and outputs the high-frequency noise signal at the common node of the first resistor and the first transistor; A filtering module, a first end of which is coupled to the output end of the noise generating module; a logic output module, whose input end is coupled to the second end of the filtering module, the logic output module is used to amplify the high-frequency noise signal to obtain the first random number sequence, wherein the filtering module is used to separate the influence of the low-frequency bias control by high-pass filtering, so that the output of the logic output module is mainly determined by the high-frequency part of the high-frequency noise signal; and A negative feedback module, coupled between the output end of the noise generation module and the output end of the first random number sequence, for stabilizing the DC bias point of the logic amplifier, Wherein, the negative feedback module comprises: A third transistor and a sixth resistor are coupled between the output terminal of the noise generating module and the ground; A seventh resistor and an eighth resistor are coupled between a power supply terminal and a ground, and a common node of the seventh resistor and the eighth resistor is coupled to the control terminal of the third transistor; a fourth transistor, a first terminal of which is coupled to the power supply terminal, and a second terminal of which is coupled to a common node of the third transistor and the sixth resistor; and A ninth resistor and a second capacitor are coupled between the output terminal of the first random number sequence and ground, and a common node of the second capacitor and the ninth resistor is coupled to the control terminal of the fourth transistor.

2. The serial number generating circuit according to claim 1, wherein: The filtering module comprises: The first capacitor and the third resistor are coupled in parallel between the output terminal of the noise generating module and the input terminal of the logic output module.

3. The serial number generating circuit according to claim 1, wherein: The logic output module comprises: The fourth resistor, the second transistor and the fifth resistor are sequentially coupled between the power supply terminal and the ground. The control end of the second transistor is coupled to the second end of the filter module, and the common node of the fourth resistor and the second transistor is used to output the first random number sequence.

4. The serial number generating circuit according to claim 1, wherein: The register circuit comprises: The first clock terminal is used to receive a first clock signal, and the register circuit is configured to intercept a second random number sequence from the first random number sequence according to the first clock signal, and store the second random number sequence as the serial number.

5. The serial number generating circuit according to claim 4, wherein: The register circuit further includes: A second clock terminal for receiving a second clock signal, the register circuit being configured to read out the serial numbers sequentially according to the second clock signal after the storing.

6. The serial number generating circuit according to claim 1, wherein: The register circuit is configured to allow readout only once after the serial number is generated.

7. The serial number generating circuit according to claim 1, wherein: The serial number is used for information management, traceability, authentication or identity verification of the device.

8. The serial number generating circuit according to claim 1, wherein: The register circuit is a volatile memory.

9. The serial number generating circuit according to claim 1, wherein: The device is a battery, and the circuit is integrated into a battery protector in the battery.

10. A method for a terminal to authenticate an external device, wherein the external device comprises the serial number generating circuit according to any one of claims 1 to 9, wherein: The method comprises: After the terminal is connected to the external device, the authentication module of the terminal generates a challenge code and transmits the challenge code to the external device, so that the external device obtains a response code by encrypting the sequence number and the challenge code; The authentication module receives the response code and determines whether the external device is legal according to the response code.

11. The method according to claim 10, wherein: The step of encrypting the serial number and the challenge code to obtain the response code comprises: Encrypting the serial number using a preset public key to obtain a first ciphertext value; Encrypting the challenge code using a preset subkey to obtain a second ciphertext value; and The response code is obtained by synthesizing the first ciphertext value and the second ciphertext value.

12. The method according to claim 11, wherein: The step of determining whether the external device is legal according to the response code comprises: Decrypting the first ciphertext value using a preset public key to obtain the serial number; A root key is selected according to the serial number, and the challenge code is encrypted using the root key to obtain a verification ciphertext value; and Whether the external device is legal is determined based on whether the verification ciphertext value is consistent with the second ciphertext value.

13. The method according to claim 12, wherein: Also includes: When the terminal is connected to the external device for the first time, the serial number of the external device and the corresponding root key are stored in the terminal in advance.

14. The method according to claim 13, wherein: When the terminal is connected to the external device for the first time, the terminal connects the clock source signal to the serial number generating circuit of the external device and reads the serial number and the root key, and after the reading, the serial number is prohibited from being directly read again.

15. The method according to claim 10, wherein: The encryption algorithm includes DES, 3DES, HMAC or SHA algorithm.

Citation Information

Patent Citations

  • Recharging battery group and operation system

    CN101030709A

  • Method for authenticating external equipment by using mobile terminal

    CN102111272A

  • True random number generating circuit and information security chip

    CN102693119A

  • True random number generator

    CN104598198A