A four-node, cryptographically secured EV charging ecosystem demonstrating ASCON-128 (lightweight AEAD), RSA-2048 OAEP (asymmetric auth), Keccak-256 (blockchain hashing), and Shor's Algorithm (post-quantum threat simulation) in a live payment pipeline.
[EV Owner Device :5000] ──scan QR──► [Kiosk :5002] ──relay──► [Grid Authority :5001]
│ RSA-OAEP encrypt {vmid,pin} │ ASCON-128 VFID │ Blockchain + Registry
│ Keccak-256 PIN hash │ QR Generator │ RSA Private Key
└──────────────────────────────────►└─────────────────────────►└─ Writes to SQLite ledger
[Blockchain Explorer :5001/explorer]
| Algorithm | Role |
|---|---|
| ASCON-128 | Encrypts Franchise ID → VFID (displayed as QR on kiosk) |
| RSA-2048 OAEP | EV Owner encrypts {vmid, pin} — only Grid can decrypt |
| Keccak-256 | PIN hashing (stored & transmitted) + Transaction ID generation |
| Shor's Algorithm | QPE-based RSA factoring demo — simulates quantum key breach |
| Node | Directory | Port | Role |
|---|---|---|---|
| Grid Authority | member1_grid/grid_member1/ |
5001 | Central auth, blockchain, RSA key store |
| Blockchain Explorer | member2/ |
5001/explorer | Live ledger viewer, search, dispute UI |
| EV Charging Kiosk | evmember3/ |
5002 | ASCON VFID + QR generator, payment relay |
| EV Owner Device | ev_member4/ |
5000 | QR scan, RSA-OAEP payment, Shor's demo |
- Kiosk generates
VFID = ASCON-128(FID)→ encodes as QR code - EV Owner scans QR, enters VMID + PIN + amount
- Device builds payload:
pin_hash = Keccak256(pin)+encrypted_auth = RSA-OAEP{vmid, pin} - Payload sent to Kiosk → Grid Authority for 7-step validation:
Replay check → RSA decrypt → VMID match → ASCON decrypt VFID → PIN verify (×2) → Balance check → Debit/Credit → Write block - Transaction ID
= Keccak256(uid | fid | timestamp | amount)written to hash-chained ledger
# Install dependencies
pip install -r member1_grid/grid_member1/requirements.txt
pip install -r evmember3/requirements.txt
pip install -r ev_member4/requirements.txt
pip install qiskit qiskit-aer # optional — for full quantum circuit simulation
# Start all services
./startup.sh # Linux/macOS
startup.bat # Windows| Service | URL |
|---|---|
| EV Owner Device | http://localhost:5000 |
| Grid Dashboard | http://localhost:5001/dashboard |
| Blockchain Explorer | http://localhost:5001/explorer |
| Kiosk | http://localhost:5002 |
First-time setup: Register a Franchise + EV Owner via the Grid Dashboard → top up balance → visit Kiosk to see the QR → scan and pay from the EV Owner Device.
Python 3.10 · Flask · ASCON-128 (pyascon) · RSA-2048 (cryptography) · Keccak-256 (pycryptodome) · Qiskit AerSimulator · SQLite · qrcode
Capstone project — IoT security · blockchain · post-quantum cryptography in EV infrastructure. ⚡ Secure. Lightweight. Post-Quantum Ready.