Skip to content

apsariUdithara/EC7201-Secure-vehicle-To-RSU-Communication-Protocol

Repository files navigation

EC7201-Secure-Vehicle-To-RSU-Communication-Protocol

Setup

This project was tested with the OBU, RSU, and Attacker running on three different laptops. All three laptops must be connected to the same network. If you are setting it up on a new network, replace every localhost connection with the IP address of the laptop running the RSU service.

Install the required library first:

pip install cryptography

If your environment uses a virtual environment, activate it before running the command above.

Run steps

  1. Generate a key pair on each laptop:
python generate_keys.py
  1. Exchange only the public key PEM files between the laptops (for example, obu_public.pem and rsu_public.pem). Keep each private key PEM file on its own machine.

  2. Update the connection address in obu.py and Attacker.py to use the IP address of the RSU laptop instead of localhost.

    Replace:

conn.connect(("localhost", 9999))
with the IP address of the `RSU` laptop, for example:
conn.connect(("192.168.1.10", 9999))
  1. Start the RSU laptop first:
python rsu.py
  1. Start the OBU laptop:
python obu.py
  1. Start the Attacker laptop if you want to test the attack scenario:
python attacker.py

Expected logs

During a normal run, the terminals should show:

  • generate_keys.py: key files are created for each laptop.
  • RSU: listening on port 9999, vehicle connected, OBU identity verified, and a session key established.
  • OBU: connected to the RSU, challenge nonce sent, RSU identity verified, and a session key established.

When the attacker scenario is launched, the attacker terminal prints the impersonation attempt, and the RSU terminal should reject the fake message with an alert such as invalid signature, tampered packet, or replay attack detected.

Presentation

The project presentation gives an overview of the project goals, implementation approach, experimental setup, and key findings. You can view or download it here:

IS Project Presentation.pdf

Slides Preview

Below are thumbnails of all slides. Click any image to open the full presentation PDF.

Slide 1 Slide 2 Slide 3 Slide 4 Slide 5 Slide 6 Slide 7 Slide 8 Slide 9 Slide 10 Slide 11

Releases

No releases published

Packages

 
 
 

Contributors

Languages