Project Overview
Project Overview
Project Overview: Implement a digital signature and hash function-based approach for secure
routing in Vehicular Ad Hoc Networks (VANET). The project aims to enhance the security of routing
protocols in VANET by leveraging cryptographic techniques to prevent attacks like data tampering,
impersonation, and message modification.
Key Requirements:
Simulation Platform: Implementation in either NS-2, NS-3, or OMNeT++ with Veins and
SUMO.
Cryptographic Techniques: Digital signatures and hash functions to ensure message integrity
and authentication.
Secure Routing Protocol: Design and implementation of a secure, lightweight, and efficient
routing protocol for VANET.
Performance Metrics: Evaluation of the protocol’s performance based on metrics like packet
delivery ratio, end-to-end delay, throughput, and security effectiveness.
Deliverables:
Skills Required:
Strong expertise in network simulation tools (NS-2, NS-3, or OMNeT++ with Veins/SUMO).
import hashlib
import time
class Vehicle:
self.id = vehicle_id
self.speed = speed
self.position = position
def generate_message(self):
message = {
"vehicle_id": self.id,
"speed": self.speed,
"position": self.position,
message_bytes = str(message).encode()
hashes = {}
start_time = time.time()
start_time = time.time()
start_time = time.time()
start_time = time.time()
start_time = time.time()
return hashes
def check_integrity(self, message, hashes):
if hash_value!= self.hash_message(message)[hash_type]:
return False
return True
if self.check_integrity(message, hashes):
else:
hash_times = {"sha256": [], "md5": [], "sha1": [], "blake2b": [], "sha3_256": []}
for _ in range(num_steps):
vehicle.move(dt)
if collisions:
print(f"Collision detected between vehicle {vehicle.id} and: {', '.join(other.id for other in
collisions)}")
if hasattr(other, 'receive_message'):
other.receive_message(message.copy(), hashes.copy())
hash_times[hash_type[:-5]].append(hash_time)
hash_data = []
hash_df = pd.DataFrame(hash_data)
plt.ylabel("Time (s)")
plt.xlabel("Hash Function")
plt.show()
times = list(range(num_steps))
for i in range(num_steps):
vehicle.move(dt)
speeds[vehicle.id].append(vehicle.speed)
if collisions:
print(f"Collision detected between vehicle {vehicle.id} and: {', '.join(other.id for other in
collisions)}")
# Create a pandas DataFrame
plt.xlabel("Time")
plt.ylabel("Speed")
plt.show()
for i in range(num_steps):
vehicle.move(dt)
positions[vehicle.id].append(vehicle.position)
if collisions:
print(f"Collision detected between vehicle {vehicle.id} and: {', '.join(other.id for other in
collisions)}")
positions_df = pd.DataFrame(positions)
plt.xlabel("X Position")
plt.ylabel("Y Position")
plt.show()
# Valid message
vehicle2.receive_message(message, hashes.copy())
tampered_message = message.copy()
tampered_message["speed"] = 100
vehicle2.receive_message(tampered_message, hashes.copy())
# Valid message
vehicle4.receive_message(message, hashes.copy())
tampered_message = message.copy()
tampered_message["speed"] = 100
vehicle4.receive_message(tampered_message, hashes.copy())
# Plot speeds
# Plot positions
plot_positions([vehicle1, vehicle2], 1000, 0.1)
# Plot speeds
# Plot positions