Bluetooth transmitting device and Bluetooth receiving device
By introducing key generation and encryption and decryption computing circuits into Bluetooth devices, the pairing is automatically completed by using the addition cycle group, which solves the problems of high power consumption and inconvenient customer operation during the pairing process of existing Bluetooth devices, and saves the keys in ciphertext , improves security.
Patent Information
- Application Number
- CN202310840434.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2025-01-14
AI Technical Summary
Existing Bluetooth devices require a lot of interaction during pairing, resulting in increased power consumption, inconvenient customers need to participate in the authentication process, and the keys are saved in plain text, which has security problems.
Design Bluetooth sending device and receiving device, including key generation circuit, calculation circuit, storage circuit and encryption and decryption calculation circuit, calculate key and verification tokens through the addition cycle group, automatically complete the pairing steps, reduce the number of interactions, and reduce the work. and save session keys in ciphertext to improve security.
Reduces the number of interactions and power consumption of Bluetooth devices, realizes automatic pairing, reduces customer operation inconvenience, improves security, extends standby time and enhances key protection.
Smart Images

Figure CN119316842A_ABST
Abstract
Description
Technical Field
[0001] This case relates to Bluetooth devices, and more particularly to Bluetooth transmitting devices and Bluetooth receiving devices. Background Art
[0002] Generally, when pairing Bluetooth devices, the two Bluetooth devices need to exchange their respective device types first. Then, different authentication processes are selected according to different device types. When authenticating, the user is usually required to confirm through the device interface (such as the screen) to complete the pairing between the two Bluetooth devices, thereby establishing a Bluetooth connection between the two Bluetooth devices.
[0003] During authentication, two Bluetooth devices need to exchange their device types first, which results in a large number of interactions between the two Bluetooth devices, increasing the power consumption of the Bluetooth devices and thus shortening the standby time. In addition, the client must also participate in the authentication, which increases the inconvenience of the client's operation. Furthermore, the working phase key is usually stored in plain text in a local file, which leads to many security issues. Summary of the invention
[0004] In view of the deficiencies of the prior art, one of the purposes of this case is (but not limited to) to provide a Bluetooth sending device, a Bluetooth receiving device and a Bluetooth pairing method to improve the deficiencies of the prior art.
[0005] In some embodiments, the Bluetooth sending device includes a key generation circuit, a calculation circuit, a storage circuit, and an encryption and decryption operation circuit. The key generation circuit is used to generate a sending end algorithm identifier, a receiving end algorithm identifier, a master public key, and a key length. The calculation circuit is used to generate a sending end verification token, and receive and determine whether the receiving end verification token of the Bluetooth receiving device is located in an addition cycle group. If the receiving end verification token is located in the addition cycle group, the calculation circuit is also used to calculate the sending end session key based on the sending end algorithm identifier, the receiving end algorithm identifier, the sending end verification token, the receiving end verification token, and the key length. The storage circuit is used to store the sending end session key. The encryption and decryption operation circuit is used to calculate a ciphertext based on the sending end session key, the master public key, and the key length.
[0006] In some embodiments, the Bluetooth receiving device includes a key generation circuit, a calculation circuit, a storage circuit and an encryption and decryption operation circuit. The key generation circuit is used to generate a sending end algorithm identifier, a receiving end algorithm identifier, a master public key and a key length. The calculation circuit is used to generate a receiving end verification token, and receive and determine whether the sending end verification token transmitted by the Bluetooth sending device is located in an addition cycle group. If the sending end verification token is located in the addition cycle group, the calculation circuit is also used to calculate the receiving end session key according to the sending end algorithm identifier, the receiving end algorithm identifier, the sending end verification token, the receiving end verification token and the key length. The storage circuit is used to store the receiving end session key. The encryption and decryption operation circuit is used to receive and determine whether the ciphertext verification code of the ciphertext of the Bluetooth sending device is located in the addition cycle group. If the ciphertext verification code is located in the addition cycle group, the encryption and decryption operation circuit is also used to generate an encryption and decryption key and an address key according to the ciphertext verification code, the receiving end session key and the key length. The encryption and decryption operation circuit is also used to generate a plaintext and a data check value according to the encryption and decryption key and the address key respectively. If the encryption and decryption operation circuit determines that the data check value is equal to the data check code of the ciphertext, the encryption and decryption operation circuit outputs the plaintext.
[0007] The technical means embodied in the embodiments of this case can improve at least one of the shortcomings of the previous technology. Therefore, compared with the previous technology, this case can reduce the number of interactions between two Bluetooth devices, reduce the power consumption of Bluetooth devices, and thus increase the standby time. In addition, in this case, the two Bluetooth devices can automatically complete the relevant steps, and the customer does not need to participate in the authentication, which reduces the inconvenience of customer operation. Furthermore, the working stage key is stored in the storage circuit in a ciphertext form, thereby reducing many security issues.
[0008] The features, implementation and effects of the present invention are described in detail below with reference to the drawings as preferred embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A schematic diagram of a Bluetooth transmitting device and a Bluetooth receiving device according to some embodiments of the present invention is provided;
[0010] Figure 2 A flowchart of a Bluetooth sending method is drawn according to some embodiments of the present case;
[0011] Figure 3 A flowchart of a Bluetooth receiving method is drawn according to some embodiments of the present invention; and
[0012] Figure 4 A flowchart of a Bluetooth pairing method is drawn according to some embodiments of the present case. DETAILED DESCRIPTION
[0013] All words used herein have their usual meanings. The definitions of the above words in commonly used dictionaries and the use examples of any of the words discussed herein in the context of this application are merely illustrative and should not limit the scope and meaning of this application. Similarly, this application is not limited to the various embodiments shown in this specification.
[0014] As used herein, "coupled" or "connected" may refer to two or more components making physical or electrical contact directly or indirectly, or two or more components operating or acting on each other. As used herein, the term "circuit" may refer to a device that is composed of at least one transistor and / or at least one active and passive component connected in a certain manner to process signals.
[0015] As used herein, the term "and / or" includes any combination of one or more of the listed associated items. In this article, the words first, second, third, etc. are used to describe and distinguish each element. Therefore, the first element in this article can also be called the second element without departing from the original intention of the case. For ease of understanding, similar elements in each figure will be designated with the same reference numeral.
[0016] In order to improve the problem of high power consumption caused by a large number of interactions between two Bluetooth devices in the prior art, the problem of inconvenience in operation caused by customer participation in authentication, and the security problem of storing keys in plain text, this case proposes a Bluetooth sending device, a Bluetooth receiving device, a Bluetooth sending method, a Bluetooth receiving method, and a Bluetooth pairing method, and the detailed descriptions are as follows.
[0017] Figure 1 A schematic diagram of a Bluetooth transmitting device 100 and a Bluetooth receiving device 200 is drawn according to some embodiments of the present invention. The Bluetooth transmitting device 100 includes a key generating circuit 110, a calculating circuit 120, a storage circuit 130, an encryption and decryption operation circuit 140, and a communication circuit 150. In addition, the Bluetooth receiving device 200 includes a key generating circuit 210, a calculating circuit 220, a storage circuit 230, an encryption and decryption operation circuit 240, and a communication circuit 250.
[0018] As shown in the figure, the key generation circuit 110 is coupled to the calculation circuit 120 and the encryption and decryption operation circuit 140, the calculation circuit 120 is coupled to the storage circuit 130 and the communication circuit 150, and the encryption and decryption operation circuit 140 is coupled to the storage circuit 130 and the communication circuit 150. In addition, the key generation circuit 210 is coupled to the calculation circuit 220 and the encryption and decryption operation circuit 240, the calculation circuit 220 is coupled to the storage circuit 230 and the communication circuit 250, and the encryption and decryption operation circuit 240 is coupled to the storage circuit 230 and the communication circuit 250.
[0019] To make the operation of the Bluetooth transmitting device 100 easier to understand, please refer to Figure 1 and Figure 2 , Figure 2 A flowchart of a Bluetooth sending method 300 is drawn according to some embodiments of the present invention.
[0020] Please refer to step 310, the key generation circuit 110 can generate a sending end algorithm identification ID A , Receiver algorithm ID B 、Master public key P pub-e For example, in this step, the key generation circuit 110 initializes the key exchange algorithm. First, the key generation circuit 110 determines that the key length is klen bits, and the sending end algorithm identifier ID A is the Media Access Control Address (MAC) of the Bluetooth transmitting device 100, and the receiving end algorithm identifier ID B is the media access control address of the Bluetooth receiving device 200. In some embodiments, the media access control addresses of the Bluetooth sending device 100 and the Bluetooth receiving device 200 can be used as algorithm identifiers of the SM9 key negotiation algorithm.
[0021] In some embodiments, the media access control address of the Bluetooth transmitting device 100 can be the address of the Bluetooth transmitting device 100 itself, and the media access control address of the Bluetooth receiving device 200 can be obtained from the advertising packet of the Bluetooth transmitting device 100. The key generation circuit 110 generates a random number ke as the transmitting end master private key de A , which ranges from 1 to N-1, where N is a prime number and N is the order of the additive cyclic group G1, which will be described later. In addition, the key generation circuit 110 can obtain the master public key P after calculating [ke]P1. pub-e As the corresponding value, P1 is the generator of the additive cyclic group G1, and this value is a given value. The key generation circuit 110 will secretly store the sender's master private key de A , but the public master key P pub-e In some embodiments, the key generation circuit 110 may be a key generation center (KGC). In some embodiments, the Bluetooth transmission method 300 of the present case may adopt the SM9 key negotiation algorithm.
[0022] Please refer to step 320, the computing circuit 120 of the Bluetooth transmitting device 100 may generate a transmitting end verification token R A , and receive and determine the receiving end verification token R of the Bluetooth receiving device 200 BIs it in the addition cyclic group G1? For example, in this step, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 start identity authentication. The transmitting end verifies the token R A and the receiving end verification token R B The signals are generated by the calculation circuit 120 of the Bluetooth transmitting device 100 and the calculation circuit 220 of the Bluetooth receiving device 200 respectively, so as to facilitate mutual authentication between the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 .
[0023] In some embodiments, the sender verification token R A The generation method of is as follows. The calculation circuit 120 generates the sending end random number r A , the sending random number r A The range of is 1 to N-1, N is a prime number, and N is the order of the additive cyclic group G1. Next, the calculation circuit 120 identifies ID according to the receiving end algorithm. B , the first generator P1 and the master public key P pub-e Perform cryptographic hashing to calculate parameter Q B , the calculation formula is as follows:
[0024] Q B =[H1(ID B ||hid,N)]P1+P pub-e …Formula 1
[0025] H1(Z,n) described in Formula 1 is a cryptographic hash function approved by the national cryptographic administration department, with inputs of a bit string Z and an integer n, and outputs an integer h1, which ranges from 1 to N-1, where N is a prime number and N is the order of the additive cyclic group G1. The hid shown in Formula 1 is a signature private key generation function identifier represented by a byte, which is disclosed by the key generation circuit 110. N is the upper limit of the random number range specified by the key generation circuit 110, and the N value will be disclosed. P1 is a generator of the additive cyclic group G1, and G1 is an additive cyclic group of order N, which is a prime number. The calculation steps of the above H1(Z,n) are as follows:
[0026] Step a: Initialize a 32-bit counter ct = 0x00000001;
[0027] Step b: Calculate hlen = 8×[(5×(log2 n )) / 32];
[0028] Step c: For i Execute, calculate Ha i =H v (0x01||Z||ct), calculate ct++. vThe output of () is a hash value of length v bits. This hash function can refer to the cryptographic hash function approved by the national cryptographic administration department, GB / T 32905;
[0029] Step d: If hlen / v is an integer, let Otherwise, for The leftmost bit;
[0030] Step e: Convert the data type of Ha to an integer according to the details given in 7.2.4 and 7.2.3 of GB / T38635.1-2020; and
[0031] Step f: The final H1(Z,n) output value h1 is Ha mod(n-1))+1.
[0032] In obtaining the parameter Q B After that, the calculation circuit 120 calculates the random number r of the sending end. A And the parameter Q B To calculate the sender verification token R A , the communication circuit 150 then transmits the sender verification token R A To the Bluetooth receiving device 200 for authentication, the calculation formula is as follows:
[0033] R A =[r A ]Q B …Formula 2
[0034] Please refer to step 330. If the receiving end verifies the token R B Located in the addition cycle group G1, the calculation circuit 120 can be used according to the sending end algorithm ID A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B And the key length klen calculates the sender session key SK A For example, in this step, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 negotiate a session key SK A If the calculation circuit 120 of the Bluetooth transmitting device 100 determines that the receiving end verification token R transmitted by the Bluetooth receiving device 200 B If the ID is in the addition cycle group G1, the authentication is successful (authentication is completed). A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R BAnd the key length klen calculates the sender session key SK A On the contrary, if the receiving end verifies the token R B If it is not in the additive cyclic group G1, the authentication fails.
[0035] In some embodiments, the sender verification token SK A The calculation method of is as follows. The calculation circuit 120 calculates the master public key P pub-e , the second generator P2 and the sending end random number r A Perform a bilinear pairing operation to calculate the first element g1', the calculation formula is as follows:
[0036] g1'=e(P pub-e ,P2) rA …Formula 3
[0037] Next, the calculation circuit 120 verifies the token R B And the sender's master private key A Perform a bilinear pairing operation to calculate the second element g2', the calculation formula is as follows:
[0038] g2'=e(R B ,de A )…Formula 4
[0039] Then, the calculation circuit 120 calculates the value of the random number r according to the second element g2' and the sending end random number r. A To calculate the third element g3', the calculation formula is as follows:
[0040] g3'=(g2') rA …Formula 5
[0041] Furthermore, the calculation circuit 120 identifies the ID according to the algorithm of the sending end A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B , the first element g1', the second element g2', the third element g3' and the key length klen perform a key derivation operation to calculate the sending end session key SK A , the calculation formula is as follows:
[0042] SK A =KDF(ID A ||ID B ||R A ||R B ||g1 ’ ||g2 ’ ||g3 ’ ,klen)…Formula 6
[0043] The KDF shown in Formula 6 is the key derivation function defined in the SM9 algorithm. The calculation steps of the above KDF are as follows:
[0044] Step a: Initialize a 32-bit counter ct = 0x00000001;
[0045] Step b: For i Execute, calculate Ha i =H v (Z||ct),ct++;
[0046] Step c: If klen / v is an integer, let Otherwise, for Far left bits; and
[0047] Step d: Final output As the final KDF output value.
[0048] Please refer to step 340, the sending end session key SK can be stored by the storage circuit 130 A For example, the calculation circuit 120 of the Bluetooth sending device 100 calculates the sending end session key SK A After that, the sending end session key SK A The key will be stored in the storage circuit 130. The key of the storage circuit 130 will not fall to the ground, thus ensuring the security of Bluetooth communication.
[0049] Please refer to step 350, the encryption and decryption operation circuit 140 can be used to send the session key SK A 、Master public key P pub-e and key length klen to calculate the ciphertext C. For example, in this step, after the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 complete identity authentication, the encryption and decryption operation circuit 140 of the Bluetooth transmitting device 100 uses the transmitting end session key SK A The encrypted communication begins. The detailed calculation method of the ciphertext C used in the above encrypted communication is described as follows.
[0050] First, the key generation circuit 110 initializes the key exchange algorithm to send the session key SK A Then, the encryption and decryption circuit 140 uses the sending end session key SK A , the first generator P1 and the master public key P pub-e Perform cryptographic hashing to calculate parameter Q B ', the calculation formula is as follows:
[0051] Q B'=[H1(SK A ||hid,N)]P1+P pub-e …Formula 7
[0052] H1(Z,n), hid and N shown in Formula 7 have been explained in Formula 1 and will not be repeated here.
[0053] Then, the encryption / decryption operation circuit 140 generates an encryption / decryption random number r, the range of the encryption / decryption random number r is 1 to N-1, N is a prime number, and N is the order of the additive cyclic group G1. The encryption / decryption operation circuit 140 generates an encryption / decryption random number r according to the encryption / decryption random number r and the parameter Q B 'Calculate the ciphertext verification code C1, the calculation formula is as follows:
[0054] C1=[r]Q B '…Formula 8
[0055] The encryption and decryption operation circuit 140 uses the master public key P pub-e And the second generator P2 performs a bilinear pairing operation to calculate the fourth element g, and the calculation formula is as follows:
[0056] g=e(P pub-e ,P2)…Formula 9
[0057] Next, the encryption / decryption operation circuit 140 calculates the fifth element ω according to the fourth element g and the encryption / decryption random number r. The calculation formula is as follows:
[0058] ω=g r …Formula 10
[0059] Subsequently, the encryption and decryption operation circuit 140 calculates the key length klen according to the plaintext data length mlen and the message authentication code length K2_len, wherein the message authentication code length K2_len is the key length of the message authentication function MAC, which is a given value, and the aforementioned calculation formula is as follows:
[0060] klen=mlen+K2_len…Formula 11
[0061] Furthermore, the encryption and decryption operation circuit 140 generates a ciphertext verification code C1, a fifth element ω, and a sender session key SK. A And the key length klen is used to perform key derivation operations to calculate the symmetric encryption key length K1 and the message authentication code key length K2. The calculation formula is as follows:
[0062] K=KDF(C1||ω||SK A ,klen)…Formula 12
[0063] Please refer to formula 12, the symmetric encryption key length K1 is the leftmost mlen length value of K, and the message authentication code key length K2 is the remaining K2_len value. In addition, the KDF shown in formula 12 has been explained in formula 6 and will not be repeated here.
[0064] Next, the encryption and decryption circuit 140 performs a symmetric encryption operation according to the symmetric encryption key length K1 and the plaintext M to calculate the ciphertext data C2. The calculation formula is as follows:
[0065] C2=Enc(K1,M)…Formula 13
[0066] Please refer to Formula 13, Enc is an Advanced Encryption Standard (AES) selected by the Bluetooth transmitting device 100 and the Bluetooth receiving device 200, and the AES here can be a public symmetric encryption algorithm.
[0067] Subsequently, the encryption / decryption operation circuit 140 performs a message authentication code operation according to the message authentication code key length K2 and the ciphertext data C2 to calculate the message authentication code C3. The calculation formula is as follows:
[0068] C3=MAC(K2,C2)…Formula 14
[0069] The MAC shown in Formula 14 is a message authentication code function, which is used to verify data integrity.
[0070] Furthermore, the encryption and decryption operation circuit 140 calculates the ciphertext C according to the ciphertext verification code C1, the ciphertext data C2 and the message authentication code C3, and then the communication circuit 150 transmits the ciphertext C to the Bluetooth receiving device 200. The aforementioned calculation formula is as follows:
[0071] C=C1||C3||C2…Formula 15
[0072] To make the operation of the Bluetooth receiver 200 easier to understand, please refer to Figure 1 and Figure 3 , Figure 3 A flowchart of a Bluetooth receiving method 400 is drawn according to some embodiments of the present invention.
[0073] Please refer to step 410, the key generation circuit 210 can generate a sending end algorithm identification ID A , Receiver algorithm ID B 、Master public key P pub-e For example, in this step, the key generation circuit 210 initializes the key exchange algorithm. First, the key generation circuit 210 determines that the key length is klen bits, and the media access control address of the Bluetooth sending device 100 is the sending end algorithm identification IDA The media access control address of the Bluetooth receiving device 200 is the receiving end algorithm identification ID B In some embodiments, the media access control addresses of the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 may be used as algorithm identifiers of the SM9 key negotiation algorithm.
[0074] In some embodiments, the media access control address of the Bluetooth receiving device 200 can use the address of the Bluetooth receiving device 200 itself, and the media access control address of the Bluetooth sending device 100 can be obtained from the air connection request packet of the Bluetooth sending device 100. The key generation circuit 210 generates a random number ke as the receiving end master private key de B , which ranges from 1 to N-1, N is a prime number, and N is the order of the additive cyclic group G1. In some embodiments, the key generation circuit 210 can be a key generation center. In some embodiments, the Bluetooth receiving method 400 of this case can adopt the SM9 key negotiation algorithm.
[0075] Please refer to step 420, the calculation circuit 220 of the Bluetooth receiving device 200 may generate a receiving end verification token R B , and receive and determine the sending end verification token R of the Bluetooth sending device 100 A Is it in the addition cyclic group G1? For example, in this step, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 start identity authentication. The transmitting end verifies the token R A and the receiving end verification token R B The signals are generated by the calculation circuit 120 of the Bluetooth transmitting device 100 and the calculation circuit 220 of the Bluetooth receiving device 200 respectively, so as to facilitate mutual authentication between the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 .
[0076] In some embodiments, the receiving end verifies the token R B The generation method of is as follows. The calculation circuit 220 generates the receiving end random number r B , the receiving end random number r B The range of is 1 to N-1, N is a prime number, and N is the order of the additive cyclic group G1. Next, the calculation circuit 220 calculates the ID according to the sending end algorithm identifier ID A , the first generator P1 and the master public key P pub-e Perform cryptographic hashing to calculate parameter Q A , the calculation formula is as follows:
[0077] Q A =[H1(ID A ||hid,N)]P1+P pub-e …Formula 16
[0078] H1(Z,n), hid and N described in Formula 16 have been explained in Formula 1 and will not be repeated here.
[0079] In obtaining the parameter Q A After that, the calculation circuit 220 calculates the random number r of the receiving end. B And the parameter Q A Calculate the receiving end verification token R B , the communication circuit 250 then transmits the receiving end verification token R B To the Bluetooth sending device 100 for authentication, the calculation formula is as follows:
[0080] R B =[r B ]Q A …Formula 17
[0081] Please refer to step 430. If the sender verifies the token R A Located in the addition cycle group G1, the calculation circuit 220 can be used according to the sending end algorithm ID A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B And the key length klen calculates the receiving end session key SK B For example, in this step, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 negotiate the receiving end session key SK B If the calculation circuit 220 of the Bluetooth receiving device 200 determines that the sender verification token R transmitted by the Bluetooth sending device 100 A If it is in the addition cycle group G1, the authentication is successful (authentication is completed). At this time, the calculation circuit 220 identifies the ID according to the sending end algorithm A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B And the key length klen calculates the sender session key SK B On the contrary, if the sender verifies the token R A If it is not in the additive cyclic group G1, the authentication fails.
[0082] In some embodiments, the sender verification token SK B The calculation method of is as follows. The calculation circuit 220 verifies the token R A And the receiving end's master private key B Perform a bilinear pairing operation to calculate the first element g1, and the calculation formula is as follows:
[0083] g1=e(RA ,de B )...Formula 18
[0084] Next, the calculation circuit 220 calculates the master public key P pub-e , the second generator P2 and the receiving end random number r B Perform a bilinear pairing operation to calculate the second element g2. The calculation formula is as follows:
[0085] g2=e(P pub-e ,P2) rB …Formula 19
[0086] Next, the calculation circuit 220 calculates the random number r of the receiving end according to the first element g1. B Calculate the third element g3, the calculation formula is as follows:
[0087] g3=g1 rB …Formula 20
[0088] Next, the calculation circuit 220 calculates the ID according to the algorithm identification ID of the sending end. A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B , the first element g1, the second element g2, the third element g3 and the key length klen perform a key derivation operation to calculate the receiving end session key SK B , the calculation formula is as follows:
[0089] SK B =KDF(ID A ||ID B ||R A ||R B ||g1||g2||g3,klen)…Formula 21
[0090] The KDF shown in Formula 21 has been explained in Formula 6 and will not be repeated here.
[0091] Please refer to step 440, the receiving end session key SK can be stored by the storage circuit 230 B For example, the calculation circuit 220 of the Bluetooth receiving device 200 calculates the receiving end session key SK B After that, the receiving end session key SK B The key will be stored in the storage circuit 230. The key of the storage circuit 230 will not fall to the ground, thus ensuring the security of Bluetooth communication.
[0092] Referring to step 450, the encryption and decryption operation circuit 240 receives and determines whether the ciphertext verification code C1 of the ciphertext C of the Bluetooth sending device 200 is located in the addition cyclic group G1. For example, in this step, after the communication device 250 of the Bluetooth receiving device 200 receives the ciphertext C transmitted by the Bluetooth sending device 100, the communication device 250 transmits the ciphertext C to the encryption and decryption operation circuit 240 for decoding. Then, the encryption and decryption operation circuit 240 determines whether the ciphertext verification code C1 in the ciphertext C is located in the addition cyclic group G1.
[0093] Please refer to step 460. If the ciphertext verification code C1 is in the addition cyclic group G1, the encryption and decryption operation circuit 240 can be used to calculate the ciphertext verification code C1 and the receiving end session key SK. B And the key length klen generates the encryption and decryption key K1' and the address key K2'.
[0094] In some embodiments, the detailed generation method of the encryption and decryption key K1' and the address key K2' is described as follows. The encryption and decryption operation circuit 240 generates the encrypted verification code C1 and the receiving end master private key de B Perform bilinear pairing operation to calculate the fourth element ω', the calculation formula is as follows:
[0095] ω'=e(C1,de B )...Formula 22
[0096] Next, the encryption and decryption operation circuit 240 calculates the key length klen according to the ciphertext data length K1_len and the message authentication code length K2_len. The message authentication code length K2_len is the key length of the message authentication function MAC, which is a given value. The calculation formula is as follows:
[0097] klen=K1_len+K2_len…Formula 23
[0098] Then, the encryption and decryption operation circuit 240 generates a decryption signal according to the ciphertext verification code C1, the fourth element ω', and the receiving end session key SK. B And the key length klen generates the encryption and decryption key K1' and the address key K2'. The calculation formula is as follows:
[0099] K'=KDF(C1||ω'||SK B ,klen)…Formula 24
[0100] Please refer to formula 24, the symmetric encryption key length K1' is the leftmost K1_len length value of K', and the message authentication code key length K2' is the remaining K2_len value. In addition, the KDF shown in formula 24 has been explained in formula 6 and will not be repeated here.
[0101] Please refer to step 470. The encryption and decryption operation circuit 240 can generate the plain text M' and the data check value u according to the encryption and decryption key K1' and the address key K2' respectively. The calculation formula is as follows:
[0102] M'=Dec(K1',C2)…Formula 25
[0103] Dec shown in Formula 25 is a symmetric encryption and decryption function.
[0104] u=MAC(K2',C2)…Formula 26
[0105] The MAC shown in Formula 26 has been explained in Formula 14 and will not be repeated here.
[0106] Please refer to step 480. If the encryption / decryption operation circuit 240 determines that the data check value u is equal to the data check code C3 of the ciphertext C, the encryption / decryption operation circuit 240 outputs the plaintext M'. For example, in this step, the encryption / decryption operation circuit 240 performs a data integrity check. First, the encryption / decryption operation circuit 240 obtains the data check code C3 from the ciphertext C. Next, the encryption / decryption operation circuit 240 determines whether the data check value u is equal to the data check code C3 of the ciphertext C. If the two are equal, the encryption / decryption operation circuit 240 outputs the plaintext M'. On the contrary, if the encryption / decryption operation circuit 240 determines that the data check value u is not equal to the data check code C3 of the ciphertext C, an error is reported and the Bluetooth receiving method 400 ends.
[0107] Figure 4 A flowchart of a Bluetooth pairing method 500 is drawn according to some embodiments of the present invention. To make the process of the Bluetooth pairing method 500 easy to understand, please refer to Figure 1 and Figure 4 .
[0108] Please refer to step 510, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 can each generate a transmitting end algorithm identification ID A , Receiver algorithm ID B , master public key P pub-e For example, in this step, the key exchange algorithm can be initialized by the Bluetooth transmitting device 100 and the Bluetooth receiving device 200. First, the key length can be determined to be klen by the Bluetooth transmitting device 100 and the Bluetooth receiving device 200, and the media access control address of the Bluetooth transmitting device 100 is the transmitting end algorithm identification ID A The media access control address of the Bluetooth receiving device 200 is the receiving end algorithm identifier ID B In some embodiments, the media access control addresses of the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 may be used as algorithm identifiers of the SM9 key negotiation algorithm.
[0109] Please refer to step 520, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 may identify the ID according to the transmitting end algorithm. A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B and key length klen to calculate the sender session key SK A and the receiving end session key SK B For example, in this step, the Bluetooth transmitting device 100 and the Bluetooth receiving device 200 negotiate the transmitting end session key SK A and the receiving end session key SK B The Bluetooth transmitting device 100 and the Bluetooth receiving device 200 identify the ID according to the transmitting end algorithm. A , Receiver algorithm ID B , sender verification token R A , the receiving end verifies the token R B and key length klen to calculate the sender session key SK A and the receiving end session key SK B In some embodiments, the sender verifies the token R A The calculation method of is described in the relevant paragraphs of Formula 1 and Formula 2. The receiving end verifies the token R B The calculation method of is described in the relevant paragraphs of Formula 16 and Formula 17. The sender session key SK A As explained in the relevant paragraphs of Formula 3 to Formula 6, the receiving end session key SK B The calculation method of has been explained in the relevant paragraphs of Formula 18 to Formula 21 and will not be repeated here.
[0110] Please refer to step 530, the Bluetooth sending device 100 can send a message according to the sending end session key SK A , master public key P pub-e and key length klen to calculate the ciphertext C. For example, in this step, the Bluetooth sending device 100 uses the session key SK A The ciphertext C is calculated based on the parameters to start encrypted communication. In some embodiments, the calculation method of the ciphertext C has been described in the relevant paragraphs of Formula 7 to Formula 15, and will not be repeated here.
[0111] Please refer to step 540, the Bluetooth receiving device 200 can receive the ciphertext C and the receiving end session key SK BAnd the key length klen generates the encryption and decryption key K1' and the address key K2'. In some embodiments, the calculation method of the encryption and decryption key K1' and the address key K2' has been described in the relevant paragraphs of Formula 22 to Formula 24, and will not be repeated here.
[0112] Please refer to step 550, the Bluetooth receiving device 200 can generate plain text M' and data check value u according to the encryption key K1' and the address key K2'. In some embodiments, the calculation method of plain text M' and data check value u has been described in the relevant paragraphs of formula 25 and formula 26, and will not be repeated here.
[0113] Please refer to step 560. If the data check value u is equal to the data check code C3 of the ciphertext C, the Bluetooth receiving device 200 outputs the plaintext M'. For example, in this step, the Bluetooth receiving device 200 performs a data integrity check. First, the Bluetooth receiving device 200 obtains the data check code C3 from the ciphertext C. Next, the Bluetooth receiving device 200 determines whether the data check value u is equal to the data check code C3 of the ciphertext C. If the two are equal, the Bluetooth receiving device 200 outputs the plaintext M'. On the contrary, if the Bluetooth receiving device 200 determines that the data check value u is not equal to the data check code C3 of the ciphertext C, an error is reported and the Bluetooth pairing method 500 ends.
[0114] In summary, the Bluetooth transmitting device 100, the Bluetooth receiving device 200, the Bluetooth transmitting method 300, the Bluetooth receiving method 400 and the Bluetooth pairing method 500 provided in some embodiments of the present invention can reduce the number of interactions between two Bluetooth devices, reduce the power consumption of the Bluetooth devices, and thus increase the standby time. In addition, the present invention can automatically complete the relevant steps by two Bluetooth devices, and the customer does not need to participate in the authentication, which reduces the inconvenience of the customer's operation. Furthermore, the working phase key is stored in the storage circuit in a ciphertext form, thereby reducing many security issues.
[0115] Although the embodiments of the present case are described above, these embodiments are not intended to limit the present case. A person with ordinary knowledge in the technical field may make changes to the technical features of the present case based on the explicit or implicit content of the present case. All these changes may fall within the scope of patent protection sought in the present case. In other words, the scope of patent protection in the present case shall be subject to the scope of the patent application defined in this specification.
[0116]
Explanation of symbols
[0117] 100: Bluetooth transmitter
[0118] 110: Key generation circuit
[0119] 120: Computing Circuit
[0120] 130: Storage circuit
[0121] 140: Encryption and decryption circuit
[0122] 150: Communication circuit
[0123] 200: Bluetooth receiver
[0124] 210: Key generation circuit
[0125] 220: Computing Circuit
[0126] 230: Storage circuit
[0127] 240: Encryption and decryption circuit
[0128] 250: Communication circuit
[0129] 300: Methods
[0130] 310~350: Steps
[0131] 400: Method
[0132] 410~480: Steps
[0133] 500:Method
[0134] 510~560: Steps.
Claims
1. A Bluetooth transmitting device, comprising: a key generation circuit for generating a sending end algorithm identifier, a receiving end algorithm identifier, a master public key and a key length; A calculation circuit is used to generate a sending end verification token, and receive and determine whether a receiving end verification token of a Bluetooth receiving device is located in an addition cycle group, wherein: If the receiving end verification token is located in the addition cycle group, the calculation circuit is further used to calculate a sending end session key according to the sending end algorithm identifier, the receiving end algorithm identifier, the sending end verification token, the receiving end verification token and the key length; a storage circuit for storing the sending end session key; as well as An encryption and decryption operation circuit is used to calculate a ciphertext according to the sending end session key, the master public key and the key length.
2. The Bluetooth transmitting device according to claim 1, wherein: The calculation circuit is also used to generate a sending end random number, and perform a cryptographic hash function operation based on the receiving end algorithm identifier, a first generator and the master public key to calculate a first parameter, wherein the calculation circuit is also used to calculate the sending end verification token based on the sending end random number and the first parameter.
3. The Bluetooth transmitting device according to claim 2, wherein: The key generation circuit is also used to generate a sender master private key, wherein the calculation circuit is also used to perform a bilinear pairing operation based on the master public key, a second generator and the sender random number to calculate a first element, perform the bilinear pairing operation based on the receiving end verification token and the sender master private key to calculate a second element, and calculate a third element based on the second element and the sender random number, wherein the calculation circuit is also used to perform a key derivation operation based on the sender algorithm identifier, the receiving end algorithm identifier, the sender verification token, the receiving end verification token, the first element, the second element, the third element and the key length to calculate the sender session key.
4. The Bluetooth transmitting device according to claim 3, wherein: The encryption and decryption operation circuit is also used to perform the cryptographic hash function operation according to the sending end session key, the first generator and the master public key to calculate a second parameter, wherein the encryption and decryption operation circuit is also used to generate an encryption and decryption random number, and calculate a ciphertext verification code according to the encryption and decryption random number and the second parameter.
5. The Bluetooth transmitting device according to claim 4, wherein: The encryption / decryption operation circuit is also used to perform the bilinear pairing operation based on the master public key and the second generator to calculate a fourth element, wherein the encryption / decryption operation circuit is also used to calculate a fifth element based on the fourth element and the encryption / decryption random number, wherein the encryption / decryption operation circuit is also used to calculate the key length based on a plaintext data length and a message authentication code length, wherein the encryption / decryption operation circuit is also used to perform the key derivation operation based on the ciphertext verification code, the fifth element, the sender session key and the key length to calculate a symmetric encryption key length and a message authentication code key length.
6. The Bluetooth transmitting device according to claim 5, wherein: The encryption / decryption operation circuit is also used to perform a symmetric encryption operation according to the symmetric encryption key length and a plaintext to calculate a ciphertext data, wherein the encryption / decryption operation circuit is also used to perform a message authentication code operation according to the message authentication code key length and the ciphertext data to calculate a message authentication code, wherein the encryption / decryption operation circuit is also used to calculate the ciphertext according to the ciphertext verification code, the ciphertext data and the message authentication code.
7. The Bluetooth transmitting device according to claim 1, wherein: The sending-end algorithm identifier includes an address of the Bluetooth sending device, and the receiving-end algorithm identifier includes an address of the Bluetooth receiving device corresponding to the Bluetooth sending device.
8. A Bluetooth receiving device, comprising: a key generation circuit for generating a sending end algorithm identifier, a receiving end algorithm identifier, a master public key and a key length; A calculation circuit is used to generate a receiving end verification token, and receive and determine whether a sending end verification token of a Bluetooth sending device is located in an addition cycle group, wherein: If the sender verification token is located in the addition cycle group, the calculation circuit is further used to calculate a receiving end session key according to the sender algorithm identifier, the receiving end algorithm identifier, the sender verification token, the receiving end verification token and the key length; a storage circuit for storing the receiving end session key; as well as An encryption and decryption operation circuit is used to receive and determine whether a ciphertext verification code of a ciphertext of the Bluetooth sending device is located in the addition cycle group, wherein if the ciphertext verification code is located in the addition cycle group, the encryption and decryption operation circuit is also used to generate an encryption and decryption key and an address key according to the ciphertext verification code, the receiving end session key and the key length, wherein the encryption and decryption operation circuit is also used to generate a plaintext and a data check value according to the encryption and decryption key and the address key respectively, wherein if the encryption and decryption operation circuit determines that the data check value is equal to a data check code of the ciphertext, the encryption and decryption operation circuit outputs the plaintext.
9. The Bluetooth receiving device as claimed in claim 8, wherein: The calculation circuit is also used to generate a receiving end random number, and perform a cryptographic hash function operation based on the sending end algorithm identifier, a first generator and the master public key to calculate a first parameter, wherein the calculation circuit is also used to calculate the receiving end verification token based on the receiving end random number and the first parameter.
10. The Bluetooth receiving device according to claim 9, wherein: The key generation circuit is also used to generate a receiving end master private key, wherein the calculation circuit is also used to perform a bilinear pairing operation based on the sending end verification token and the receiving end master private key to calculate a first element, perform the bilinear pairing operation based on the master public key, a second generator and the receiving end random number to calculate a second element, and calculate a third element based on the first element and the receiving end random number, wherein the calculation circuit is also used to perform a key derivation operation based on the sending end algorithm identifier, the receiving end algorithm identifier, the sending end verification token, the receiving end verification token, the first element, the second element, the third element and the key length to calculate the receiving end session key, wherein the encryption and decryption operation circuit performs the bilinear pairing operation based on the ciphertext verification code and the master private key to calculate a fourth element, wherein the encryption and decryption operation circuit is also used to generate the encryption and decryption key and the address key based on the ciphertext verification code, the fourth element, the receiving end session key and the key length.