MAC-Based Compression Ratio Improvement for CAN Security
Abstract
:1. Introduction
2. Existing CAN Data Authentication Methods
2.1. Practical Security Algorithm
2.2. Mini-MAC Algorithm
2.3. Modified MAC Algorithm Using ICANDR
2.4. Triple ID Algorithm
3. Proposed CAN Security Method
3.1. Bit Replacement Algorithm (BRA)
- ➀
- Let X and Y denote 3-bit and 8-bit data, respectively.
- ➁
- If the decimal value of X is i, X can be expressed using Y by inverting the i-th bit from the LSB of Y.
- ➂
- X can be restored from the inverted bit position information of Y.
- BRA can be applied repeatedly. If Y is -bit data, -bit data can be expressed using Y as shown in Figure 4. In Figure 4, since the last 3 bits of the compressed data are ‘010’, the second bit from the LSB of the last byte of the MAC is inverted. In a similar way, 12 bits of compressed data can be expressed using 4 bytes of MAC.
- Compressed data of the proposed method is obtained in the same way as the Triple ID method. If the length of the compressed data is 0, the 4-byte MAC is transmitted without any change. Otherwise, BRA is applied starting from the last 3 bits of the compressed data. Each application of BRA removes 3 bits from the compressed data. BRA can be applied up to 4 times, but the application of BRA stops when there is no compressed data left. By the proposed method, a maximum of 15 bits (12 bits by BRA and 3 header bits) can be further reduced from the compressed data by the Triple ID method.
3.2. Data Transmission and Reception
- Case I (0 ≤ BRA-compressed data length ≤ 4): BRA-compressed data and 4-byte MAC are transmitted in the same data field using .
- Case II (4 < BRA-compressed data length ≤ 7): BRA-compressed data and 4-byte MAC are transmitted using and , respectively.
3.3. Session Key Management
4. Simulation
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Jo, H.J.; Choi, W. A Survey of Attacks on Controller Area Networks and Corresponding Countermeasures. IEEE Trans. Intell. Transp. Syst. 2021, 23, 6123–6141. [Google Scholar] [CrossRef]
- Valasek, C.; Miller, C. Adventures in automotive networks and control units. Def. Con. 2013, 21, 15–31. [Google Scholar]
- Checkoway, S.; McCoy, D.; Kantor, B.; Anderson, D.; Shacham, H.; Savage, S. Comprehensive experimental analyses of automotive attack surfaces. In Proceedings of the 20th USENIX Security Symposium, San Francisco, CA, USA, 8–12 August 2011; USENIX Association: San Francisco, CA, USA, 2011; pp. 447–462. [Google Scholar]
- Mandal, A.K.; Panarotto, F.; Cortesi, A.; Ferrara, P.; Spoto, F. Static analysis of Android Auto infotainment and on-board diagnostics II apps. Software: Pract. Exp. 2019, 49, 1131–1161. [Google Scholar] [CrossRef]
- Jo, H.J.; Choi, W.; Na, S.Y.; Woo, S.; Lee, D.H. Vulnerabilities of Android OS-Based Telematics System. Wirel. Pers. Commun. 2016, 92, 1511–1530. [Google Scholar] [CrossRef]
- Nie, S.; Liu, L.; Du, Y. Free-fall: Hacking tesla from wireless to CAN bus. Black Hat USA 2017, 25, 1–16. [Google Scholar]
- Miller, C.; Valasek, C. Remote exploitation of an unaltered passenger vehicle. Black Hat USA 2015, 2015, 9. [Google Scholar]
- Fowler, D.S.; Bryans, J.; Shaikh, S.A.; Wooderson, P. Fuzz Testing for Automotive Cyber-Security. In Proceedings of the 48th Annual IEEE/IFIP International Conference on Dependable Systems and Networks Workshops (DSN-W), Luxembourg, 25–28 June 2018; pp. 239–246. [Google Scholar] [CrossRef]
- Yu, L.; Deng, J.; Brooks, R.R.; Yun, S.B. Automobile ECU Design to Avoid Data Tampering. In Proceedings of the 10th Annual Cyber and Information Security Research Conference, New York, NY, USA, 7–9 April 2015; pp. 10:1–10:4. [Google Scholar] [CrossRef]
- Olufowobi, H.; Young, C.; Zambreno, J.; Bloom, G. SAIDuCANT: Specification-Based Automotive Intrusion Detection Using Controller Area Network (CAN) Timing. IEEE Trans. Veh. Technol. 2020, 69, 1484–1494. [Google Scholar] [CrossRef]
- Katragadda, S.; Darby, P.J.; Roche, A.; Gottumukkala, R. Detecting Low-Rate Replay-Based Injection Attacks on In-Vehicle Networks. IEEE Access 2020, 8, 54979–54993. [Google Scholar] [CrossRef]
- Woo, S.; Jo, H.J.; Lee, D.H. A Practical Wireless Attack on the Connected Car and Security Protocol for In-Vehicle CAN. IEEE Trans. Intell. Transp. Syst. 2015, 16, 993–1006. [Google Scholar] [CrossRef]
- Schmandt, J.; Sherman, A.T.; Banerjee, N. Mini-MAC: Raising the bar for vehicular security with a lightweight message authentication protocol. Veh. Commun. 2017, 9, 188–196. [Google Scholar] [CrossRef]
- Kim, Y.-J.; Woo, S.; Chung, J.-G. Triple ID flexible MAC for CAN security improvement. IEEE Access 2021, 9, 126388–126399. [Google Scholar] [CrossRef]
- Mun, H.; Han, K.; Lee, D.H. Ensuring Safety and Security in CAN-Based Automotive Embedded Systems: A Combination of Design Optimization and Secure Communication. IEEE Trans. Veh. Technol. 2020, 69, 7078–7091. [Google Scholar] [CrossRef]
- Jo, H.J.; Kim, J.H.; Choi, H.Y.; Choi, W.; Lee, D.H.; Lee, I. MAuth-CAN: Masquerade-attack-proof authentication for in-vehicle networks. IEEE Trans. Veh. Technol. 2020, 69, 2204–2218. [Google Scholar] [CrossRef]
- Lee, S.; Choi, W.; Jo, H.J.; Lee, D.H. T-Box: A Forensics-Enabled Trusted Automotive Data Recording Method. IEEE Access 2019, 7, 49738–49755. [Google Scholar] [CrossRef]
- Steger, M.; Boano, C.A.; Niedermayr, T.; Karner, M.; Hillebrand, J.; Roemer, K.; Rom, W. An Efficient and Secure Automotive Wireless Software Update Framework. IEEE Trans. Ind. Informatics 2018, 14, 2181–2193. [Google Scholar] [CrossRef]
- Ramteke, P.R.; Mahmud, S.M. An Adaptive Data-Reduction Protocol for the Future In-Vehicle Networks. SAE Tech. Pap. 2005, 114, 519–530. [Google Scholar] [CrossRef] [Green Version]
- Miucic, R.; Mahmud, S.M. An Improved Adaptive Data Reduction Protocol for In-Vehicle Networks. SAE Tech. Pap. 2006, 115, 650–658. [Google Scholar] [CrossRef] [Green Version]
- Miucic, R.; Mahmud, S.M.; Popovic, Z. An Enhanced Data-Reduction Algorithm for Event-Triggered Networks. IEEE Trans. Veh. Technol. 2009, 58, 2663–2678. [Google Scholar] [CrossRef]
- Misbahuddin, S.; Mahmud, S.M.; Al-Holou, N. Development and performance analysis of a data-reduction algorithm for automotive multi-plexing. IEEE Trans. Veh. Technol. 2001, 50, 162–169. [Google Scholar] [CrossRef] [Green Version]
- Kelkar, S.; Kamal, R. Boundary of fifteen compression algorithm for controller area network based automotive applications. In Proceedings of the International Conference on Circuits, Systems, Communication and Information Technology Applications (CSCITA), Mumbai, India, 4–5 April 2014; pp. 162–167. [Google Scholar]
- Wu, Y.-J.; Chung, J.-G. Efficient controller area network data compression for automobile applications. Front. Inf. Technol. Electron. Eng. 2015, 16, 70–78. [Google Scholar] [CrossRef]
- Wu, Y.; Chung, J.-G. An Improved Controller Area Network Data-Reduction Algorithm for In-Vehicle Networks. IEICE Trans. Fundam. Electron. Commun. Comput. Sci. 2017, 100, 346–352. [Google Scholar] [CrossRef]
- Kim, Y.-J.; Zou, Y.; Kim, Y.-E.; Chung, J.-G. Multi-level data arrangement algorithm for can data compression. Int. J. Automot. Technol. 2020, 21, 1527–1537. [Google Scholar] [CrossRef]
- Abdulmalik, H.; Luo, B. Using ID-hopping to defend against targeted DoS on CAN. In Proceedings of the 1st International Workshop on Safe Control of Connected and Autonomous Vehicles, Pittsburgh, PA, USA, 18–21 April 2017; pp. 19–26. [Google Scholar]
- Lukasiewycz, M.; Mundhenk, P.; Steinhorst, S. Security-Aware Obfuscated Priority Assignment for Automotive CAN Platforms. ACM Trans. Des. Autom. Electron. Syst. 2016, 21, 32. [Google Scholar] [CrossRef]
- Hwang, D.Y.; Kim, Y.J.; Chung, J.G. CAN security protocol using modified MAC. In Proceedings of the 2020 International SoC Design Conference (ISOCC), Yeosu, Republic of Korea, 21–24 October 2020; pp. 308–309. [Google Scholar]
- Bellare, M.; Rogaway, P. Entity Authentication and Key Distribution. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 17–21 August 2001; pp. 232–249. [Google Scholar] [CrossRef] [Green Version]
- Available online: https://ocslab.hksecurity.net/Datasets/driving-dataset (accessed on 1 October 2022).
Signal | Sig A | Sig B | Sig C |
---|---|---|---|
Previous frame () | |||
Current frame () | |||
XOR | |||
Header bit | 1 | 1 | 0 |
Signal | Bit 23—Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 |
---|---|---|---|---|---|---|---|
Header (HA) | 1 | ||||||
Header (HB) | 1 | ||||||
Header (HC) | 0 | ||||||
SA | 0 ⋯ 0 | 1 | 0 | 1 | 0 | 1 | 1 |
SB | 0 ⋯ 0 | 0 | 0 | 0 | 1 | 0 | 0 |
SC | - | - | - | - | - | - | - |
Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | |
---|---|---|---|---|---|---|---|---|
Byte 0 | SA [2] | SB [1] | SA [1] | SB [0] | SA [0] | HC | HB | HA |
Byte 1 | 0 | SB [5] | SA [5] | SB [4] | SA [4] | SB [3] | SA [3] | SB [2] |
Compressed Data Length | ID | Type of Data |
---|---|---|
() | i | Compressed data and MAC in the same data field |
() | i + 1 | Compressed data |
i + 2 | 8 bytes of MAC | |
( | i + 1 | Uncompressed data |
i + 2 | 8 bytes of MAC |
ID | No. of Frames | No. of Occurrences by Compressed Data Length | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
0 Byte | 1 Byte | 2 Byte | 3 Byte | 4 Byte | 5 Byte | 6 Byte | 7 Byte | 8 Byte | ||
260 | 163,078 | 132,141 | 0 | 30,601 | 336 | 0 | 0 | 0 | 0 | 0 |
2A0 | 163,078 | 162,433 | 0 | 645 | 0 | 0 | 0 | 0 | 0 | 0 |
316 | 163,078 | 55,299 | 0 | 64,884 | 30,078 | 5989 | 3433 | 1640 | 1690 | 65 |
329 | 163,078 | 130,940 | 0 | 23,671 | 8307 | 156 | 4 | 0 | 0 | 0 |
43F | 199,531 | 110,188 | 0 | 87,408 | 1891 | 20 | 24 | 0 | 0 | 0 |
440 | 199,531 | 26,161 | 0 | 155,111 | 17,362 | 855 | 42 | 0 | 0 | 0 |
545 | 163,078 | 34,328 | 0 | 51,314 | 77,426 | 10 | 0 | 0 | 0 | 0 |
580 | 81,468 | 56,799 | 0 | 16,050 | 5471 | 1809 | 1001 | 338 | 0 | 0 |
Total | 1,295,920 | 708,289 (54.66%) | 0 (0.00%) | 429,684 (33.16%) | 140,871 (10.87%) | 8839 (0.68%) | 4504 (0.35%) | 1978 (0.15%) | 1690 (0.13%) | 65 (0.00%) |
ID | No. of Frames | No. of Occurrences by Compressed Data Length | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
0 Byte | 1 Byte | 2 Byte | 3 Byte | 4 Byte | 5 Byte | 6 Byte | 7 Byte | 8 Byte | ||
260 | 163,078 | 162,380 | 698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
2A0 | 163,078 | 163,078 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
316 | 163,078 | 111,928 | 34,911 | 10,410 | 3607 | 1047 | 1115 | 60 | 0 | 0 |
329 | 163,078 | 140,279 | 22,545 | 252 | 2 | 0 | 0 | 0 | 0 | 0 |
43F | 199,531 | 196,204 | 3122 | 198 | 7 | 0 | 0 | 0 | 0 | 0 |
440 | 199,531 | 175,780 | 22,410 | 1330 | 11 | 0 | 0 | 0 | 0 | 0 |
545 | 163,078 | 62,068 | 101,002 | 8 | 0 | 0 | 0 | 0 | 0 | 0 |
580 | 81,468 | 69,972 | 8020 | 2446 | 419 | 611 | 0 | 0 | 0 | 0 |
Total | 1,295,920 | 1,081,689 (83.47%) | 192,708 (14.87%) | 14,644 (1.13%) | 4046 (0.31%) | 1658 (0.13%) | 1115 (0.09%) | 60 (0.00%) | 0 (0.00%) | 0 (0.00%) |
ID | No. of Original Bytes | Compressed Bytes (Compression Ratio) | Difference | |
---|---|---|---|---|
Triple ID | Proposed | |||
260 | 1,304,624 | 62,210 (95.23%) | 1396 (99.89%) | 4.66% |
2A0 | 1,304,624 | 1290 (99.90%) | 0 (100%) | 0.10% |
316 | 1,304,624 | 283,313 (78.28%) | 76,675 (94.12%) | 15.84% |
329 | 1,304,624 | 72,907 (94.41%) | 23,055 (98.23%) | 3.82% |
43F | 1,596,248 | 180,689 (88.68%) | 3539 (99.78%) | 11.10% |
440 | 1,596,248 | 86,738 (94.57%) | 25,103 (98.42%) | 3.85% |
545 | 1,304,624 | 334,946 (74.32%) | 101,018 (92.26%) | 17.94% |
580 | 651,744 | 62,782 (90.37%) | 16,613 (97.45%) | 7.08% |
Average | 1,295,920 | 135,609 (89.54%) | 30,925 (97.61%) | 8.07% |
ID | Compressed Data Length Greater than 4 Bytes | |
---|---|---|
Triple ID | Proposed | |
316 | 6828 | 2222 |
329 | 4 | 0 |
43F | 24 | 0 |
440 | 42 | 0 |
580 | 1339 | 0 |
Total | 8237 (100%) | 2222 (26.98%) |
ID | No. of Original Bytes | Compressed Bytes (Compression Ratio) | Difference | |
---|---|---|---|---|
Triple ID | Proposed | |||
CF00400 | 164,704 | 66,346 (59.71%) | 28,872 (82.47%) | 22.76% |
CFE4523 | 32,904 | 4163 (87.34%) | 4 (99.99%) | 12.65% |
18FE5600 | 3288 | 421 (87.19%) | 0 (100.00%) | 12.81% |
18FF2100 | 65,872 | 8238 (87.49%) | 0 (100.00%) | 12.51% |
18FF6121 | 65,448 | 8181 (87.50%) | 0 (100.00%) | 12.50% |
18FEF200 | 32,936 | 10,781 (67.26%) | 4321 (86.88%) | 18.02% |
18FF9E21 | 65,456 | 8497 (87.02%) | 13 (99.98%) | 12.96% |
19FFA010 | 65,648 | 14,191 (78.38%) | 32 (99.95%) | 21.57% |
19FFA030 | 32,736 | 5153 (84.26%) | 530 (98.38%) | 14.12% |
Average | 58,777 | 13,997 (76.18%) | 3752 (93.62%) | 17.44% |
ID | Compressed Data Length Greater than 4 Bytes | No. of Frames | |
---|---|---|---|
Triple ID | Proposed | ||
CF00300 | 1007 | 0 | 8234 |
CF00400 | 1469 | 12 | 19,119 |
CFE4523 | 50 | 0 | 4113 |
18FE4321 | 6 | 0 | 4090 |
18FEDF00 | 107 | 0 | 8127 |
18FEF200 | 137 | 0 | 4036 |
19FFA030 | 12 | 0 | 4092 |
Total | 2788 (100%) | 12 (0.43%) | 51,811 |
Triple ID | Proposed | |
---|---|---|
Peak load | 29.27% (1) | 18.99% (0.648) |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Piao, J.; Jin, S.; Seo, D.-H.; Woo, S.; Chung, J.-G. MAC-Based Compression Ratio Improvement for CAN Security. Appl. Sci. 2023, 13, 2654. https://doi.org/10.3390/app13042654
Piao J, Jin S, Seo D-H, Woo S, Chung J-G. MAC-Based Compression Ratio Improvement for CAN Security. Applied Sciences. 2023; 13(4):2654. https://doi.org/10.3390/app13042654
Chicago/Turabian StylePiao, Jinhui, Shiyi Jin, Dong-Hyun Seo, Samuel Woo, and Jin-Gyun Chung. 2023. "MAC-Based Compression Ratio Improvement for CAN Security" Applied Sciences 13, no. 4: 2654. https://doi.org/10.3390/app13042654
APA StylePiao, J., Jin, S., Seo, D.-H., Woo, S., & Chung, J.-G. (2023). MAC-Based Compression Ratio Improvement for CAN Security. Applied Sciences, 13(4), 2654. https://doi.org/10.3390/app13042654