The advancement of technology in automotive industry has increased the number of Electronic Control Units (ECU) in the vehicles which are connected to each other and other sensors and actuators in the in-vehicle networks. These numbers of ECUs necessitate the use of communication buses instead of traditional point-to-point protocol to reduce the amount of cabling and increase network scalability. There are different types of in-vehicle network protocol and bus system namely Controlled Area Network (CAN), Local Interconnected Network (LIN), Media Oriented System Transport (MOST), and FlexRay. In the study conducted, CAN bus and FlexRay communication protocol have been compared and implemented on the HCS12 Board. It was concluded that CAN-Bus communication protocol is the best for hard real-time systems and FlexRay is appropriate for deterministic data transmission when a particular message does not have any priority over the other ones. Furthermore, data transmission was encrypted and secured by XOR-encryption key method. In engineering, there is no optimal design and similarly one cannot say that CAN-Bus is the best protocol, it depends upon the user requirements and applications. For example, in autonomous vehicle CAN-Bus would be better compared to FlexRay. However, if all sensors have equal priority, FlexRay is better option for designing in vehicle communication protocol.