The integration of external devices and network connectivity into autonomous vehicles has raised significant concerns about in-vehicle security vulnerabilities. Existing security mechanisms for in-vehicle bus systems, which mainly rely on appending authentication codes and data encryption, have been extensively studied in the context of CAN and CAN-FD buses. However, these approaches are not directly applicable to Ethernet buses due to the much higher data transmission rates of Ethernet buses compared to other buses. The real-time encryption and decryption required by Ethernet buses cannot be achieved with conventional methods, necessitating an acceleration in the speed of cryptographic operations to match the demands of Ethernet communication. In response to these challenges, our paper introduces a range of cryptographic solutions specifically designed for in-vehicle Ethernet networks. We employ an AES-ECC hybrid algorithm for critical vehicle control signals, combining the efficiency of AES with the security of ECC. For multimedia signals, we propose an improved AES-128 (IAES-128) and an improved MD5 (IMD), which improve encryption time by 15.77%. Our proposed security mechanisms have been rigorously tested through attack simulations on the CANoe (version 10) platform. These tests cover both in-vehicle control signals, such as braking and throttle control, and non-critical systems like multimedia entertainment. The experimental results convincingly demonstrate that our optimized algorithms and security mechanisms ensure the secure and reliable operation of real-time communication in autonomous vehicles.