# Efficient Secure Mechanisms for In-Vehicle Ethernet in Autonomous Vehicles
## 3 Automotive Ethernet Security Protocol
### Design of Data Encryption and Authentication Algorithms for In-Vehicle Multimedia Signals
#### 3.2.3 Design of Efficient Data Encryption Algorithm for In-Vehicle Control Signals  
In the majority of current automotive security research, the encryption algorithm utilized is AES-128 or AES-256, a symmetric key algorithm. However, when it comes to securing critical in-vehicle control signals, such as those for vehicle ignition, shutdown, acceleration, braking, and steering systems, relying solely on a symmetric key algorithm like AES may not provide the optimal level of security. On the other hand, ECC (Elliptic Curve Cryptography), an asymmetric encryption algorithm, is known for its strong security features but is hindered by its slow encryption and decryption speeds, which are not suitable for the high-speed requirements of automotive Ethernet networks [40; 41].  
To address these challenges and to meet the demands for both real-time performance and high security in automotive Ethernet, we propose a hybrid encryption approach that integrates the efficiency of AES with the enhanced security of ECC. This combined strategy aims to offer a more robust encryption solution for vehicle control signals, ensuring the secure and reliable operation of safety-critical vehicle functions within the automotive communication network [42].  
In this paper, we propose a hybrid encryption mechanism, referred to as AES-ECC, which effectively marries the efficiency of AES with the robust security of ECC. This approach leverages the strengths of both algorithms to design a system that meets the stringent security and real-time requirements of self-driving in-vehicle communication. The improved AES-ECC algorithm aims to achieve efficient encryption and decryption while maintaining a robust security level. The steps are as follows:  
Step 1: The sender encrypts the plaintext message using the improved AES algorithm to generate ciphertext.  
Step 2: The sender then encrypts the AES key with the recipient's ECC public key, producing the key block.  
Step 3: The sender transmits the key block along with the ciphertext to the receiver.  
Step 4: Upon receiving the message, the receiver decrypts the key block using their ECC private key to retrieve the AES key.  
Step 5: Finally, the receiver uses the AES key to decrypt the ciphertext and recover the original plaintext message.  
The flowchart of the AES-ECC encryption algorithm is illustrated in Figure 5: First, the sender encrypts the control message using the IAES algorithm and generates a 128-bit IMD5 message digest, which is then signed with the transmitter's private key. The transmitter also encrypts the AES key with the receiver's ECC public key. The digital signature, AES key ciphertext, and message ciphertext are then sent to the receiver.  
Upon receiving the message, the receiver decrypts the AES key ciphertext with their ECC private key to obtain the AES key (as shown in Figure 6). They then use this AES key to decrypt the message ciphertext, restoring the original text. The receiver also decrypts the digital signature with the sender's public key to retrieve the message digest and computes their own MD5 digest. By comparing the two digests, the receiver can verify the integrity of the message. If the digests match, it confirms that the message is complete and untampered, allowing the receiver to safely store it. If they do not match, the message has been altered during transmission, and the receiver should discard it.  
This process effectively combines symmetric encryption, asymmetric encryption, and hash algorithms to ensure the confidentiality, integrity, and non-repudiation of data, providing a robust and reliable data transmission mechanism.