IP Library › Granted Patent US 12,273,439
Granted Patent B2
US 12,273,439 · App. 17/860,818 · Granted Apr 8, 2025

Communication method and apparatus

Inventor: Yong Wang (Shenzhen, CN)
Assignee: Huawei Technologies Co., Ltd.
H04L9/065H04L9/14
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,273,439
App. No.
17/860,818
Granted
Apr 8, 2025
Kind
B2
Abstract

In an implementation, a first electronic control unit (ECU) performs an operation using a first key and a first fresh value to generate a keystream; performs an exclusive OR operation using the keystream and a to-be-transmitted first plaintext packet to generate a first ciphertext packet; and sends the first ciphertext packet to a second ECU. The first fresh value is a value generated by a counter in the first ECU when the first ECU transmits a packet, and the counter is configured to record a quantity of packets transmitted by the first ECU. The first ECU transmits the first ciphertext packet to the second ECU. This can prevent the first packet transmitted by the first ECU from being eavesdropped on, and help improve confidentiality of the packet transmitted by the first ECU.

Claims (92)

1. A first vehicle-mounted device, comprising:

at least one processor; and

at least one memory coupled to the at least one processor and storing programming instructions for execution by the at least one processor to:

generate a keystream based on a first key and a first fresh value, wherein the first fresh value is generated by a counter of the first vehicle-mounted device for counting packets transmitted by the first vehicle-mounted device;

generate a first ciphertext packet based on performing an exclusive OR operation using the keystream and a first plaintext packet;

send the first ciphertext packet to a second vehicle-mounted device;

generate a message authentication code based on a second key, the first ciphertext packet, and the first fresh value, wherein the message authentication code is used by the second vehicle-mounted device to perform integrity check on the first plaintext packet;

form a second ciphertext packet based on arranging the first ciphertext packet, the message authentication code, and the first fresh value; and

send the second ciphertext packet to the second vehicle-mounted device.

2. The first vehicle-mounted device according to claim 1 , wherein the first ciphertext packet is arranged after the first fresh value and before the message authentication code to form the second ciphertext packet.

3. The first vehicle-mounted device according to claim 1 , wherein the programming instructions are for execution by the at least one processor to:

generate a message authentication code based on a second key, the first plaintext packet, and the first fresh value, wherein the message authentication code is used by the second vehicle-mounted device to perform integrity check on the first plaintext packet;

form a second ciphertext packet based on arranging the first ciphertext packet, the message authentication code, and the first fresh value; and

send the second ciphertext packet to the second vehicle-mounted device.

4. The first vehicle-mounted device according to claim 1 , wherein the programming instructions are for execution by the at least one processor to:

generate a message authentication code based on a second key and the first plaintext packet, wherein the message authentication code is used by the second vehicle-mounted device to perform integrity check on the first plaintext packet;

form a second plaintext packet based on arranging the first plaintext packet and the message authentication code; and

generate a first ciphertext packet based on performing an exclusive OR operation using the keystream and the second plaintext packet.

5. The first vehicle-mounted device according to claim 1 , wherein the programming instructions are for execution by the at least one processor to:

generate a first key by using a shared key and a first preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

6. The first vehicle-mounted device according to claim 1 , wherein the programming instructions are for execution by the at least one processor to:

generate a second key based on a shared key and a second preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

7. The first vehicle-mounted device according to claim 1 , wherein the programming instructions are for execution by the at least one processor to:

send indication information to the second vehicle-mounted device, wherein the indication information indicates that the first vehicle-mounted device performs on the first plaintext packet (1) integrity protection or (2) integrity protection and encryption protection.

8. A second vehicle-mounted device, comprising:

at least one processor; and

at least one memory coupled to the at least one processor and storing programming instructions for execution by the at least one processor to:

receive a second ciphertext packet from a first vehicle-mounted device, wherein the second ciphertext packet is formed by arranging a first ciphertext packet, a message authentication code, and a first fresh value;

obtain the first ciphertext packet from the second ciphertext packet;

obtain the first fresh value from the second ciphertext packet;

obtain the message authentication code from the second ciphertext packet;

in response to determining that the first fresh value is greater than a second fresh value, generate a new message authentication code based on a second key, the first ciphertext packet, and the first fresh value, wherein the second fresh value is locally stored after the second vehicle-mounted device receives the second ciphertext packet;

determine that the new message authentication code is same as the obtained message authentication code;

generate a keystream based on a first key and the first fresh value; and

obtain a first plaintext packet based on performing an exclusive OR operation using the keystream and the first ciphertext packet.

9. The second vehicle-mounted device according to claim 8 , wherein the first ciphertext packet is arranged after the first fresh value and before the message authentication code to form the second ciphertext packet.

10. The second vehicle-mounted device according to claim 8 , wherein the programming instructions are for execution by the at least one processor to:

generate a first key by using a shared key and a first preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

11. The second vehicle-mounted device according to claim 8 , wherein the programming instructions are for execution by the at least one processor to:

generate a second key by using a shared key and a second preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

12. The second vehicle-mounted device according to claim 8 , wherein the programming instructions are for execution by the at least one processor to:

receive, indication information from the first vehicle-mounted device, wherein the indication information indicates that the first vehicle-mounted device performs (1) integrity protection or (2) integrity protection and encryption protection on the first plaintext packet.

13. A communication method, comprising:

generating, by a first vehicle-mounted device, a keystream based on a first key and a first fresh value, wherein the first fresh value is generated by a counter of the first vehicle-mounted device for counting packets transmitted by the first vehicle-mounted device;

generating, by the first vehicle-mounted device, a first ciphertext packet based on performing an exclusive OR operation using the keystream and a first plaintext packet;

sending, by the first vehicle-mounted device, the first ciphertext packet to a second vehicle-mounted device;

generating, by the first vehicle-mounted device, a message authentication code based on a second key, the first ciphertext packet, and the first fresh value, wherein the message authentication code is used by the second vehicle-mounted device to perform integrity check on the first plaintext packet;

forming, by the first vehicle-mounted device, a second ciphertext packet based on arranging the first ciphertext packet, the message authentication code, and the first fresh value; and

sending, by the first vehicle-mounted device, the second ciphertext packet to the second vehicle-mounted device.

14. The method according to claim 13 , wherein the first ciphertext packet is arranged after the first fresh value and before the message authentication code to form the second ciphertext packet.

15. The method according to claim 13 , wherein the method further comprises:

generating, by the first vehicle-mounted device, a first key by using a shared key and a first preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

16. The method according to claim 13 , wherein the method further comprises:

generating, by the first vehicle-mounted device, a second key by using a shared key and a second preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

17. The method according to claim 13 , wherein the method further comprises:

sending, by the first vehicle-mounted device, indication information to the second vehicle-mounted device, wherein the indication information indicates that

the first vehicle-mounted device performs on the first plaintext packet (1) integrity protection or

(2) integrity protection and encryption protection.

18. A communication method, comprising:

receiving, by a second vehicle-mounted device, a second ciphertext packet from a first vehicle-mounted device, wherein the second ciphertext packet is formed by arranging a first ciphertext packet, a message authentication code, and a first fresh value;

obtaining, by the second vehicle-mounted device, the first ciphertext packet from the second ciphertext packet;

obtaining, by the second vehicle-mounted device from the second ciphertext packet, the first fresh value generated by a counter of the first vehicle-mounted device for counting packets transmitted by the first vehicle-mounted device;

obtaining, by the second vehicle-mounted device, the message authentication code from the second ciphertext packet;

in response to determining that the first fresh value is greater than a second fresh value, generate a new message authentication code based on a second key, the first ciphertext packet, and the first fresh value, wherein the second fresh value is locally stored after the second vehicle-mounted device receives the second ciphertext packet;

determining, by the second vehicle-mounted device, that the new message authentication code is same as the obtained message authentication code;

generating, by the second vehicle-mounted device, a keystream based on a first key and the first fresh value; and

obtaining, by the second vehicle-mounted device, a first plaintext packet based on performing an exclusive OR operation using the keystream and the first ciphertext packet.

19. The method according to claim 18 , wherein the first ciphertext packet is arranged after the first fresh value and before the message authentication code to form the second ciphertext packet.

20. The method according to claim 18 , wherein the method further comprises:

generating, by the second vehicle-mounted device, the first key by using a shared key and a first preset parameter based on a key derivation algorithm, wherein the shared key is shared by the first vehicle-mounted device and the second vehicle-mounted device.

21. The method according to claim 18 , wherein the method further comprises:

receiving, by the second vehicle-mounted device, indication information from the first vehicle-mounted device, wherein the indication information indicates that the first vehicle-mounted device performs (1) integrity protection or (2) integrity protection and encryption protection on the first plaintext packet.

22. The first vehicle-mounted device according to claim 1 , wherein the programming instructions are for execution by the at least one processor to:

send, to the second vehicle-mounted device, a truncated fresh value truncated from the first fresh value.

23. The first vehicle-mounted device according to claim 22 , wherein the truncated fresh value is configured by starting from a least significant bit (LSB) of the first fresh value.

24. The first vehicle-mounted device according to claim 5 , wherein the first preset parameter is an algorithm type distinguisher.

25. The first vehicle-mounted device according to claim 6 , wherein the second preset parameter is an algorithm type distinguisher.

26. The first vehicle-mounted device according to claim 10 , wherein the first preset parameter is an algorithm type distinguisher.

27. The first vehicle-mounted device according to claim 11 , wherein the second preset parameter is an algorithm type distinguisher.

28. The second vehicle-mounted device according to claim 8 , wherein the first fresh value is a fragment of a second fresh value for generating the first ciphertext packet.

29. The second vehicle-mounted device according to claim 28 , wherein the first fresh value is configured by starting from a least significant bit (LSB) of the second fresh value.

30. The second vehicle-mounted device according to claim 28 , wherein the programming instructions are for execution by the at least one processor to:

obtain the second fresh value based on the first fresh value; and

generate the keystream based on the first key and the second fresh value.

31. The second vehicle-mounted device according to claim 30 , wherein the programming instructions are for execution by the at least one processor to:

determine the first fresh value is bigger than a first part corresponding to the first fresh value in a third fresh value stored in the second vehicle-mounted device; and

obtain the second fresh value by connecting a second part other than the first part in the third fresh value and the first fresh.

32. The second vehicle-mounted device according to claim 30 , wherein the programming instructions are for execution by the at least one processor to:

determine the first fresh value is smaller than a first part corresponding to the first fresh value in a third fresh value stored in the second vehicle-mounted device; and

obtain the second fresh value by connecting the first fresh and a sum of a second part other than the first part in the third fresh value and 1.

33. The second vehicle-mounted device according to claim 28 , wherein the programming instructions are for execution by the at least one processor to:

update a third fresh value stored in the second vehicle-mounted device based on the first fresh value.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 22, 2022
From: WANG, YONG
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 061850/0784 →
Priority Claims (1)
CN 202010025955.8 · Jan 10, 2020 · national
Continuity (2)
Continuation PCTCN2020113301 · Sep 3, 2020
Related Publication 20220353056A1 · Nov 3, 2022
References Cited (24)
US 20160315766A1 · Ujiie et al. · 2016 [cited by applicant]
US 20190109716A1 · Mizoguchi et al. · 2019 [cited by applicant]
US 20200369242A1 · Komedani · 2020 [cited by examiner]
US 20210119981A1 · Coppola · 2021 [cited by examiner]
US 20220131839A1 · Potter · 2022 [cited by examiner]
CN 106685653A · 2017 [cited by applicant]
CN 106790053A · 2017 [cited by applicant]
CN 108075897A · 2018 [cited by applicant]
CN 108965218A · 2018 [cited by applicant]
CN 109672538A · 2019 [cited by applicant]
CN 110377002A · 2019 [cited by applicant]
JP 2005295468A · 2005 [cited by applicant]
JP 2012532564A · 2012 [cited by applicant]
JP 2014168216A · 2014 [cited by applicant]
JP 2017200040A · 2017 [cited by applicant]
WO 2013065689A1 · 2013 [cited by applicant]
Wang et al., “Computer network security,” Shanghai Jiao Tong University Press, 2019, 6 pages (with English machine translation of abstract). [cited by applicant]
Handbook of Applied Cryptography, 1st ed., CRC Press, 1997, Chapter 9, pp. 366-367. [cited by applicant]
Yang et al., “Wireless Communication Security Technology,” Beijing University of Posts and Telecommunications Press, May 2005, 10 pages (with English abstract). [cited by applicant]
Woo et al., “A Practical Wireless Attack on the Connected Car and Security Protocol for In-Vehicle CAN,” IEEE Transactions on Intelligent Transportation Systems, Apr. 2015, vol. 16, No. 2, pp. 993-1006. [cited by applicant]
Handbook of Applied Cryptography, 1st ed., CRC Press, 1997, Chapter 7, 61 pages. [cited by applicant]
Extended European Search Report in European Appln No. 20911709.2, dated Jan. 4, 2023, 7 pages. [cited by applicant]
Office Action in Japanese Appln. No. 2022-542134, mailed on Aug. 15, 2023, 28 pages (with English translation). [cited by applicant]
International Search Report and Written Opinion in International Appln. No. PCT/CN2020/113301, mailed on Dec. 2, 2020, 16 pages (with English translation). [cited by applicant]