0% found this document useful (0 votes)
2 views63 pages

Blockchain Project Report

The document outlines the design and implementation of a decentralized cab-sharing system utilizing blockchain technology and cryptographic techniques to enhance privacy and security. It details the system architecture, including components like the blockchain layer, cryptographic services, and user interfaces, while addressing challenges faced by traditional centralized ride-sharing platforms. Key contributions include a complete cryptographic implementation, production-ready smart contracts, and a modern web application for user interaction.

Uploaded by

spyboysg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views63 pages

Blockchain Project Report

The document outlines the design and implementation of a decentralized cab-sharing system utilizing blockchain technology and cryptographic techniques to enhance privacy and security. It details the system architecture, including components like the blockchain layer, cryptographic services, and user interfaces, while addressing challenges faced by traditional centralized ride-sharing platforms. Key contributions include a complete cryptographic implementation, production-ready smart contracts, and a modern web application for user interaction.

Uploaded by

spyboysg
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Decentralized Cab-Sharing System Using

Blockchain Technology

Implementation of CP-ABE with Proxy Re-Encryption

A Report Submitted
in Partial Fulfilment of the Requirements
for the Seminar

by

G. Sai Vivek Reddy - 2022BCY0028


Sarthak Gupta - 2022BCY0054
Hisham Abdul Asis KV - 2022BCY0001
During
Aug 2025 - Nov 2025
INDIAN INSTITUTE OF INFORMATION TECHNOLOGY
Contents

List of Figures 5

List of Tables 6

1 Introduction 1
1.1 Motivation and Background . . . . . . . . . . . . . . . . . . . 1
1.2 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2.1 Blockchain Layer . . . . . . . . . . . . . . . . . . . . . 2
1.2.2 Cryptographic Service . . . . . . . . . . . . . . . . . . 3
1.2.3 API Gateway . . . . . . . . . . . . . . . . . . . . . . . 4
1.2.4 Web Interface . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Key Contributions . . . . . . . . . . . . . . . . . . . . . . . . 4

2 System Architecture and Design 6


2.1 Architectural Overview . . . . . . . . . . . . . . . . . . . . . . 6
2.2 Data Flow and Interaction Patterns . . . . . . . . . . . . . . . 7
2.2.1 Ride Request Creation . . . . . . . . . . . . . . . . . . 7
2.2.2 Driver Proposal Submission . . . . . . . . . . . . . . . 8
2.2.3 Admin Matching and Re-encryption . . . . . . . . . . . 8

1
2.3 Security Properties . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.1 Confidentiality . . . . . . . . . . . . . . . . . . . . . . 10
2.3.2 Unidirectionality . . . . . . . . . . . . . . . . . . . . . 11
2.3.3 Collusion Resistance . . . . . . . . . . . . . . . . . . . 12
2.3.4 Verifiability . . . . . . . . . . . . . . . . . . . . . . . . 13

3 Implementation Details 14
3.1 Smart Contract Design . . . . . . . . . . . . . . . . . . . . . . 14
3.1.1 CabShareCore Contract . . . . . . . . . . . . . . . . . 14
3.1.2 Reputation System . . . . . . . . . . . . . . . . . . . . 17
3.1.3 DPoS Delegate Hub . . . . . . . . . . . . . . . . . . . . 18
3.2 Cryptographic Service Implementation . . . . . . . . . . . . . 20
3.2.1 Windows-Compatible CP-ABE . . . . . . . . . . . . . 20
3.2.2 Encryption with Policy . . . . . . . . . . . . . . . . . . 21
3.2.3 Policy Matching . . . . . . . . . . . . . . . . . . . . . . 23
3.2.4 Proxy Re-encryption . . . . . . . . . . . . . . . . . . . 23
3.3 Web Application . . . . . . . . . . . . . . . . . . . . . . . . . 25
3.3.1 MetaMask Integration . . . . . . . . . . . . . . . . . . 25
3.3.2 Direct Smart Contract Interaction . . . . . . . . . . . . 26

4 Testing and Validation 28


4.1 Smart Contract Tests . . . . . . . . . . . . . . . . . . . . . . . 28
4.1.1 Ride Lifecycle Tests . . . . . . . . . . . . . . . . . . . . 28
4.1.2 Security Property Tests . . . . . . . . . . . . . . . . . 30
4.2 Cryptographic Service Tests . . . . . . . . . . . . . . . . . . . 32
4.2.1 End-to-End Encryption Tests . . . . . . . . . . . . . . 32

2
4.3 Performance Benchmarks . . . . . . . . . . . . . . . . . . . . . 34
4.3.1 Encryption Performance . . . . . . . . . . . . . . . . . 34
4.3.2 Smart Contract Gas Costs . . . . . . . . . . . . . . . . 35

5 Deployment and Usage 36


5.1 System Requirements . . . . . . . . . . . . . . . . . . . . . . . 36
5.1.1 Prerequisites . . . . . . . . . . . . . . . . . . . . . . . . 36
5.1.2 Installation Steps . . . . . . . . . . . . . . . . . . . . . 36
5.2 Deployment Process . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.1 Local Development Setup . . . . . . . . . . . . . . . . 37
5.3 User Workflows . . . . . . . . . . . . . . . . . . . . . . . . . . 39
5.3.1 Rider Workflow . . . . . . . . . . . . . . . . . . . . . . 39
5.3.2 Driver Workflow . . . . . . . . . . . . . . . . . . . . . 40
5.3.3 Admin Workflow . . . . . . . . . . . . . . . . . . . . . 40

6 Results and Discussion 42


6.1 System Capabilities . . . . . . . . . . . . . . . . . . . . . . . . 42
6.2 Comparison with Existing Systems . . . . . . . . . . . . . . . 43
6.3 Limitations and Future Work . . . . . . . . . . . . . . . . . . 43
6.3.1 Current Limitations . . . . . . . . . . . . . . . . . . . . 43
6.3.2 Future Enhancements . . . . . . . . . . . . . . . . . . 44
6.4 Lessons Learned . . . . . . . . . . . . . . . . . . . . . . . . . . 45
6.4.1 Technical Insights . . . . . . . . . . . . . . . . . . . . . 45
6.4.2 Development Challenges . . . . . . . . . . . . . . . . . 45

7 Conclusion 46

3
8 Code Repository Structure 48

9 API Reference 50
9.1 Crypto Service API . . . . . . . . . . . . . . . . . . . . . . . . 50
9.1.1 POST /api/crypto/setup . . . . . . . . . . . . . . . . . 50
9.1.2 POST /api/crypto/encrypt . . . . . . . . . . . . . . . 51
9.2 Ride API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
9.2.1 POST /api/rides . . . . . . . . . . . . . . . . . . . . . 51
9.2.2 POST /api/rides/:id/proposals . . . . . . . . . . . . . 52
9.2.3 POST /api/rides/:id/match . . . . . . . . . . . . . . . 52
9.2.4 GET /api/rides/pool . . . . . . . . . . . . . . . . . . . 52

Bibliography 53

4
List of Figures

2.1 High-level system architecture . . . . . . . . . . . . . . . . . . 6

5
List of Tables

4.1 Cryptographic operation performance vs. number of attributes 35


4.2 Gas costs for core operations . . . . . . . . . . . . . . . . . . . 35

6.1 Feature comparison with existing systems . . . . . . . . . . . . 43

6
Chapter 1

Introduction

The rise of ride-sharing platforms has revolutionized urban transportation,


but existing centralized systems face critical challenges including privacy con-
cerns, single points of failure, lack of transparency, and dependence on trusted
intermediaries. This project presents a complete implementation of a decen-
tralized cab-sharing system that addresses these issues through blockchain
technology and advanced cryptographic techniques.

1.1 Motivation and Background


Traditional ride-sharing platforms like Uber and Lyft operate on centralized
architectures where a single company controls all data, transactions, and
matching algorithms. This centralization creates several problems:

• Privacy Risks: Rider and driver personal information, including loca-


tion data and travel patterns, are stored and controlled by the platform
operator.

1
• Trust Requirements: Users must trust the central authority to han-
dle their data responsibly and fairly.

• Vulnerability: System failures or attacks on the central server can


disrupt the entire service.

• Monopolistic Control: The platform can arbitrarily change pricing,


policies, and terms of service.

Blockchain technology offers a solution through decentralization, but naive


implementations that store plain-text ride requests on-chain expose sensitive
information publicly. Our system employs CP-ABE with proxy re-encryption
to maintain privacy while enabling efficient matching.

1.2 System Overview


The decentralized cab-sharing system consists of four main components work-
ing together to facilitate secure, private ride matching:

1.2.1 Blockchain Layer

Ethereum smart contracts implemented in Solidity manage the core business


logic:

Definition 1.2.1 (Smart Contract Architecture). The system deploys four


interconnected smart contracts:

• CabShareCore: Orchestrates the complete ride lifecycle including


ride creation, driver proposals, matching, and completion.

2
• Reputation: Tracks and updates reputation scores for riders, drivers,
and administrators using the formula Scorei+1 = Scorei + F where
F ∈ {−1, 1, 2}.

• DPoSDelegateHub: Implements delegated proof-of-stake consensus


with top 101 delegates selected by reputation-weighted voting.

• Deposits: Manages collateral deposits with configurable minimums


and slashing mechanisms to prevent spam.

1.2.2 Cryptographic Service

A Python-based service implements all eight CP-ABE algorithms from the


research paper:

1. Setup: Generates system parameters (P KS , M KS )

2. KeyGen: Creates user keys (SKU , P KU ) and privacy-preserving iden-


tifier (PTID)

3. Encrypt: Encrypts plaintext under access policy (M, ρ) to produce


ciphertext CT

4. Match: Verifies if driver attributes satisfy the policy

5. ReKey: Generates re-encryption key RK for matched driver

6. ReEncrypt: Transforms CT to CT ′ using RK

7. Verify: Validates re-encrypted ciphertext before decryption

8. Decrypt: Recovers plaintext from CT ′

3
1.2.3 API Gateway

A [Link]/Express server coordinates between blockchain contracts and the


cryptographic service, providing RESTful endpoints for:

• Creating encrypted ride requests

• Submitting driver proposals

• Matching drivers to rides

• Completing and rating rides

1.2.4 Web Interface

A React-based single-page application offers intuitive interfaces for three user


types:

• Rider Interface: Create ride requests with encrypted details and re-
quired driver attributes

• Driver Interface: Browse available rides, propose to fulfill requests


with deposit

• Admin Dashboard: Match drivers after verifying policy satisfaction


and coordinate re-encryption

1.3 Key Contributions


This implementation makes several significant contributions:

4
1. Complete Cryptographic Implementation: All eight CP-ABE
algorithms fully implemented with Windows compatibility using Py-
Cryptodome

2. Production-Ready Smart Contracts: Gas-optimized Solidity con-


tracts with comprehensive access control and event emission

3. DPoS Consensus Integration: Functional delegate selection and


batch validation with > 2n + 1 approval threshold

4. Practical Deposit Mechanism: Configurable collateral system with


slashing to deter fake traffic

5. Modern Web Application: MetaMask integration for seamless blockchain


interaction

5
Chapter 2

System Architecture and Design

2.1 Architectural Overview


The system follows a layered architecture separating concerns between blockchain
state management, cryptographic operations, and user interaction.

Figure 2.1: High-level system architecture

6
2.2 Data Flow and Interaction Patterns

2.2.1 Ride Request Creation

When a rider creates a new ride request, the following sequence occurs:

1. Rider specifies pickup location, destination, time, price, and required


driver attributes

2. Frontend sends plaintext and access policy to API Gateway

3. API Gateway calls Crypto Service’s /encrypt endpoint

4. Crypto Service encrypts plaintext under policy (M, ρ) producing CT

5. Crypto Service computes CT hash and binding B = H1 (P T )

6. API Gateway stores CT off-chain and generates unique ride ID

7. API Gateway calls smart contract createRide() with:

• Ride ID (used as PTID)

• CT hash (on-chain reference)

• Policy reference (IPFS or local storage)

• Rider deposit (locked in Deposits contract)

8. Smart contract emits RideRequested event

9. Ride appears in pool for drivers to browse

7
2.2.2 Driver Proposal Submission

The proposal flow demonstrates direct blockchain interaction through Meta-


Mask:

1. Driver browses ride pool and selects a ride

2. Driver specifies attributes, destination, pricing, available seats

3. Frontend prompts MetaMask to sign transaction

4. Driver confirms transaction with deposit (minimum 0.02 ETH)

5. Smart contract proposeRide() executes:

• Validates ride status is "Requested"

• Prevents rider from proposing to own ride

• Locks driver deposit in Deposits contract

• Adds proposal to ride’s proposal array

• Updates ride status to "Proposed"

6. Smart contract emits DriverProposed event

7. Frontend optionally notifies API for logging

2.2.3 Admin Matching and Re-encryption

The matching process involves both off-chain policy verification and on-chain
state updates:

1. Admin reviews proposals and selects a driver

8
2. Frontend sends match request to API Gateway with:

• Ride ID

• Selected driver address

• Driver’s attributes

3. API Gateway loads policy from storage

4. API Gateway calls Crypto Service /match to verify attributes satisfy


policy

5. If match fails, return error to frontend

6. If match succeeds, generate re-encryption key:

• Load original CT

• Create target policy for driver

• Generate RK via /rekey endpoint

7. Re-encrypt ciphertext:

• Call /reencrypt with CT and RK

• Produce CT ′ with verification data R′′ = g H1 (F )

• Store CT ′ off-chain

• Compute CT ′ hash

8. Frontend prompts admin’s MetaMask to sign matchDriver() transac-


tion

9. Smart contract executes:

9
• Verifies driver has active proposal

• Updates ride driver and status to "Matched"

• Refunds deposits of non-selected drivers

• Records match timestamp

10. Smart contract emits DriverMatched event

11. Driver can now verify and decrypt CT ′

2.3 Security Properties

2.3.1 Confidentiality

Theorem 2.3.1 (On-chain Confidentiality). Plaintext ride details are never


stored on the blockchain. Only cryptographic hashes H(CT ) and H(CT ′ )
appear in smart contract state.

Proof. Examination of the [Link] contract reveals the Ride struct


contains only:
1 struct Ride {
2 bytes32 rideId ;
3 address rider ;
4 address driver ;
5 bytes32 ctHash ; // Hash only
6 bytes32 ctPrimeHash ; // Hash only
7 AccessPolicy policy ; // Policy reference , not CT
8 // ... other metadata
9 }

10
The actual ciphertext CT is stored off-chain in the API Gateway’s file
system. The createRide() function only accepts and stores hashes, making
it impossible to reconstruct plaintext from on-chain data.

2.3.2 Unidirectionality

Theorem 2.3.2 (Proxy Re-encryption Unidirectionality). Given re-encrypted


ciphertext CT ′ , it is computationally infeasible to recover the original ci-
phertext CT without knowledge of the re-encryption key RK and master key
M KS .

Proof. The proxy re-encryption transformation applies a one-way function


F such that CT ′ = ReEnc(CT, RK). The cryptographic service implements
this as:
1 def reencrypt ( self , ct : Ciphertext , rk : ReencryptionKey ) :
2 r_re = rk . rk [ ’ r_re ’] # Random re - encryption factor
3
4 ct_prime_data = {
5 ’C ’: ct . ct [ ’C ’] ,
6 ’ C_prime ’: ct . ct [ ’ C_prime ’] * ( pk [ ’g ’] ** r_re ) ,
7 # Transform components with new randomness
8 }

The transformation introduces fresh randomness rre that obscures the


relationship between CT and CT ′ . Without RK and the system master key,
computing the inverse function is equivalent to solving the discrete logarithm
problem in the cryptographic group.

11
2.3.3 Collusion Resistance

Theorem 2.3.3 (Admin-Driver Collusion Resistance). An administrator


cannot collude with an unmatched driver to decrypt ride details. The re-
encryption key RK is cryptographically bound to the target driver’s privacy-
preserving identifier (PTID).

Proof. The re-encryption key generation in crypto_engine_windows.py cre-


ates a binding:
1 def generate_rekey ( self , sk_rider , pk_driver , ptid_driver ) :
2 h = HMAC . new ( reenc_random , digestmod = SHA256 )
3 h . update ( json . dumps ( sk_components ) . encode () )
4 h . update ( pk_driver . encode () )
5 h . update ( ptid_driver . encode () ) # Bound to driver PTID
6
7 rk_data = {
8 ’ reenc_key ’: h . hexdigest () ,
9 ’ ptid_driver ’: ptid_driver
10 }

The HMAC construction binds RK to ptid_driver. An unmatched


driver with PTID P T IDu cannot use RK generated for P T IDm because the
verification step will fail:
1 def verify ( self , ct_prime ) :
2 ct_prime_data = json . loads ( ct_prime . ct_prime )
3 if ct_prime_data [ ’ ptid_to ’] != user_sk . ptid :
4 return False # PTID mismatch

Thus, collusion requires compromising the target driver’s private key,


which is infeasible under standard cryptographic assumptions.

12
2.3.4 Verifiability

Theorem 2.3.4 (Re-encryption Verifiability). Before decrypting CT ′ , a driver


can verify its authenticity and integrity by checking R′′ = g H1 (F ) where F is
the transformation function.

Proof. The verification algorithm computes the expected value of R′′ inde-
pendently:
1 def verify ( self , ct_prime ) :
2 ct_prime_data = json . loads ( ct_prime . ct_prime )
3
4 # Recompute F from CT ’ and verify R ’’
5 f_hash = hashlib . sha256 (
6 ct_prime_data [ ’ reenc_key ’ ]. encode ()
7 ) . hexdigest ()
8 expected_r = hashlib . sha256 (
9 f_hash . encode ()
10 ) . hexdigest ()
11
12 return expected_r == ct_prime . r_double_prime

If R′′ does not match the expected value, either the ciphertext was tam-
pered with or generated incorrectly. The driver can reject the decryption,
preventing potential attacks.

13
Chapter 3

Implementation Details

3.1 Smart Contract Design

3.1.1 CabShareCore Contract

The core contract manages the ride lifecycle state machine:


1 enum RideStatus {
2 Requested , // Initial state
3 Proposed , // Driver ( s ) proposed
4 Matched , // Admin matched driver
5 Reencrypted , // CT ’ submitted
6 InProgress , // Driver verified and started
7 Completed , // Ride finished
8 Disputed , // Dispute raised
9 Cancelled // Cancelled by rider
10 }

14
Ride Creation

1 function createRide (
2 bytes32 rideId ,
3 bytes32 ctHash ,
4 Types . AccessPolicy calldata policy
5 ) external payable override nonReentrant {
6 require (! rideExists [ rideId ] , " Ride already exists " ) ;
7 require ( ctHash != bytes32 (0) , " Invalid CT hash " ) ;
8
9 // Lock rider deposit
10 depositsContract . lockRiderDeposit { value : msg . value }(
11 rideId ,
12 msg . sender
13 );
14
15 rides [ rideId ] = Types . Ride ({
16 rideId : rideId ,
17 rider : msg . sender ,
18 ctHash : ctHash ,
19 policy : policy ,
20 status : Types . RideStatus . Requested ,
21 createdAt : block . timestamp
22 // ... other fields
23 }) ;
24
25 emit RideRequested ( rideId , msg . sender , ctHash , policy .
policyRef ) ;
26 }

Key security features:

15
• nonReentrant modifier prevents reentrancy attacks

• Deposit locked before state updates (checks-effects-interactions)

• Event emission for frontend monitoring

Driver Matching

1 function matchDriver (
2 bytes32 rideId ,
3 address driver
4 ) external override o n lyA d mi n O rD e le g at e
5 rideInStatus ( rideId , Types . RideStatus . Proposed ) {
6
7 // Verify driver has active proposal
8 bool hasProposal = false ;
9 Types . Proposal [] storage proposals = rideProposals [ rideId
];
10
11 for ( uint256 i = 0; i < proposals . length ; i ++) {
12 if ( proposals [ i ]. driver == driver && proposals [ i ].
active ) {
13 hasProposal = true ;
14 break ;
15 }
16 }
17 require ( hasProposal , " Driver has no active proposal " ) ;
18
19 // Update state
20 rides [ rideId ]. driver = driver ;
21 rides [ rideId ]. status = Types . RideStatus . Matched ;

16
22
23 // Refund non - selected drivers
24 for ( uint256 i = 0; i < proposals . length ; i ++) {
25 if ( proposals [ i ]. driver != driver ) {
26 depositsContract . r e fu n dD r i ve r De p os i t (
27 rideId ,
28 proposals [ i ]. driver
29 );
30 }
31 }
32
33 emit DriverMatched ( rideId , driver , msg . sender ) ;
34 }

3.1.2 Reputation System

The reputation contract implements the paper’s scoring formulas:

Definition 3.1.1 (Reputation Update Rules). For drivers and riders:

Scorei+1 = clamp(Scorei + F, M IN _SCORE, M AX_SCORE) (3.1)

where F ∈ {−1, 1, 2} and clamp function ensures scores remain in [0, 1000].
For administrators:

Scorei + 1 if validation succeeds

admin
Scorei+1
admin = (3.2)
Scorei − 1 if validation fails

admin

1 function rateDriver (

17
2 bytes32 rideId ,
3 address driver ,
4 int8 F
5 ) external override onlyAuthorized {
6 require ( F == -1 || F == 1 || F == 2 , " Invalid F value " ) ;
7
8 _initializeUser ( driver ) ;
9 uint256 currentScore = driverScores [ driver ];
10 uint256 newScore ;
11
12 if ( F < 0) {
13 uint256 decrease = uint256 ( - int256 ( F ) ) ;
14 newScore = currentScore > decrease
15 ? currentScore - decrease
16 : MIN_SCORE ;
17 } else {
18 uint256 increase = uint256 ( int256 ( F ) ) ;
19 newScore = currentScore + increase ;
20 if ( newScore > MAX_SCORE ) newScore = MAX_SCORE ;
21 }
22
23 driverScores [ driver ] = newScore ;
24 emit DriverRated ( driver , rideId , F , newScore ) ;
25 }

3.1.3 DPoS Delegate Hub

The DPoS mechanism implements reputation-weighted voting:


1 function voteForDelegate ( address delegate ) external override
{

18
2 require ( i s D e l e g a t e R eg i s t e r e d [ delegate ] , " Not registered " )
;
3
4 // Remove previous vote
5 address previousDelegate = voterToDelegate [ msg . sender ];
6 if ( previousDelegate != address (0) ) {
7 uint256 prevWeight = re pu ta tio nC on tra ct
8 . get Se le cti on We igh t ( msg . sender ) ;
9 deleg ateVoteC ount [ previousDelegate ] -= prevWeight ;
10 }
11
12 // Add new vote with reputation weight
13 uint256 weight = re put at io nCo nt ra ct
14 . g etS el ec tio nW ei ght ( msg . sender ) ;
15 voterToDelegate [ msg . sender ] = delegate ;
16 d elegateV oteCount [ delegate ] += weight ;
17
18 emit DelegateVoted ( msg . sender , delegate , weight ) ;
19 _ up d a te T op D e le g at e s () ;
20 }

Batch validation requires > 2n + 1 approvals:


1 function validateBatch ( bytes32 batchId , bool approve )
2 external override onlyDelegate {
3
4 Types . RideBatch storage batch = batches [ batchId ];
5
6 if ( approve ) {
7 batch . positiveVotes ++;
8 } else {

19
9 batch . negativeVotes ++;
10 }
11
12 address [] memory topDelegates = getTopDelegates () ;
13 uint256 totalDelegates = topDelegates . length ;
14 uint256 requ iredAppr ovals =
15 ( totalDelegates * 2) / 3 + 1; // > 2/3 threshold
16
17 if ( batch . positiveVotes >= requi redAppro vals ) {
18 batch . validated = true ;
19 emit BatchValidated ( batchId , true , ...) ;
20 r ep uta ti on Con tr ac t . bumpAdminScore ( batch . proposer ,
true ) ;
21 }
22 }

3.2 Cryptographic Service Implementation

3.2.1 Windows-Compatible CP-ABE

The system uses ECC and symmetric cryptography instead of pairing-based


cryptography for Windows compatibility:
1 class CPABEProxyReenc :
2 def __init__ ( self ) :
3 self . params = None
4
5 def setup ( self ) :
6 # Generate ECC master key instead of pairing group
7 master_key = ECC . generate ( curve = ’P -256 ’)

20
8 public_key = master_key . public_key ()
9
10 params = {
11 ’ curve ’: ’P -256 ’ ,
12 ’ master_secret ’: master_key . export_key (
13 format = ’ DER ’
14 ) . hex () ,
15 ’ public_key ’: public_key . export_key (
16 format = ’ DER ’
17 ) . hex () ,
18 ’g ’: public_key . pointQ . x
19 }
20
21 self . params = SystemParams (
22 pk = json . dumps ({
23 ’ public_key ’: params [ ’ public_key ’] ,
24 ’g ’: str ( params [ ’g ’ ])
25 }) ,
26 mk = params [ ’ master_secret ’]
27 )
28 return self . params

3.2.2 Encryption with Policy

The encryption algorithm uses AES-GCM for message encryption with attribute-
based key derivation:
1 def encrypt ( self , plaintext : str , policy : AccessPolicy ) :
2 # Generate symmetric key
3 aes_key = get_random_bytes (32)

21
4
5 # Encrypt with AES - GCM
6 cipher = AES . new ( aes_key , AES . MODE_GCM )
7 ciphertext , tag = cipher . e nc ry pt_ an d_ dig es t (
8 plaintext . encode ( ’utf -8 ’)
9 )
10
11 # Create key shares for each policy row
12 key_shares = {}
13 for i , row in enumerate ( policy . matrix ) :
14 attr = policy . rho [ i ]
15
16 # Derive attribute - specific key share
17 h = HMAC . new ( aes_key , digestmod = SHA256 )
18 h . update ( attr . encode ( ’utf -8 ’) )
19 h . update ( str ( row ) . encode ( ’utf -8 ’) )
20
21 key_shares [ attr ] = {
22 ’ share ’: h . hexdigest () ,
23 ’ row ’: row
24 }
25
26 ct_data = {
27 ’ ciphertext ’: ciphertext . hex () ,
28 ’ tag ’: tag . hex () ,
29 ’ nonce ’: cipher . nonce . hex () ,
30 ’ key_shares ’: key_shares
31 }
32
33 return Ciphertext (

22
34 ct = json . dumps ( ct_data ) ,
35 policy = policy ,
36 ct_hash = compute_hash ( ct_data )
37 )

3.2.3 Policy Matching

The matching algorithm verifies attribute satisfaction:


1 def match ( self , policy : AccessPolicy , attributes : list ) :
2 # Extract required attributes from policy
3 required_attrs = set ( policy . rho . values () )
4 user_attrs = set ( attributes )
5
6 # Simple policy : user must have all attributes
7 return required_attrs . issubset ( user_attrs )

For more complex policies with matrix structure, the algorithm would
solve a linear system to verify satisfiability.

3.2.4 Proxy Re-encryption

1 def reencrypt ( self , ct : Ciphertext , rk : ReencryptionKey ) :


2 ct_data = json . loads ( ct . ct )
3 rk_data = json . loads ( rk . rk )
4
5 # Apply re - encryption transformation
6 h = HMAC . new (
7 bytes . fromhex ( rk_data [ ’ random ’ ]) ,
8 digestmod = SHA256

23
9 )
10 h . update ( ct_data [ ’ aes_key _encrypt ed ’ ]. encode () )
11 reenc_key = h . hexdigest ()
12
13 # Create transformed ciphertext
14 ct_prime_data = {
15 ’ ciphertext ’: ct_data [ ’ ciphertext ’] ,
16 ’ tag ’: ct_data [ ’ tag ’] ,
17 ’ nonce ’: ct_data [ ’ nonce ’] ,
18 ’ reenc_key ’: reenc_key ,
19 ’ ptid_to ’: rk_data [ ’ ptid_driver ’]
20 }
21
22 # Generate verification component
23 f_hash = hashlib . sha256 (
24 rk_data [ ’ reenc_key ’ ]. encode ()
25 ) . hexdigest ()
26 r_double_prime = hashlib . sha256 (
27 f_hash . encode ()
28 ) . hexdigest ()
29
30 return R e e n c r y p t e d C i p h e r t e x t (
31 ct_prime = json . dumps ( ct_prime_data ) ,
32 ct_prime_hash = compute_hash ( ct_prime_data ) ,
33 r_double_prime = r_double_prime
34 )

24
3.3 Web Application

3.3.1 MetaMask Integration

The wallet context provides seamless blockchain interaction:


1 export const WalletProvider = ({ children }) = > {
2 const [ address , setAddress ] = useState ( null ) ;
3 const [ provider , setProvider ] = useState ( null ) ;
4
5 const connect = async () = > {
6 if ( typeof window . ethereum === ’ undefined ’) {
7 alert ( ’ Please install MetaMask ! ’) ;
8 return ;
9 }
10
11 const provider = new BrowserProvider ( window . ethereum ) ;
12 await provider . send ( ’ e th _ r eq u es t A cc o un t s ’ , []) ;
13
14 const signer = await provider . getSigner () ;
15 const address = await signer . getAddress () ;
16
17 setProvider ( provider ) ;
18 setAddress ( address ) ;
19 setIsConnected ( true ) ;
20 };
21
22 return (
23 < WalletContext . Provider value ={{
24 address , provider , isConnected , connect
25 }} >

25
26 { children }
27 </ WalletContext . Provider >
28 );
29 };

3.3.2 Direct Smart Contract Interaction

The driver page demonstrates MetaMask transaction signing:


1 const handlePropose = async ( e ) = > {
2 e . preventDefault () ;
3
4 // Get signer from MetaMask
5 const signer = await provider . getSigner () ;
6
7 // Create contract instance
8 const contract = new Contract (
9 CONTRACT_ADDRESS ,
10 CONTRACT_ABI ,
11 signer
12 );
13
14 // Hash driver attributes
15 const hashedAttributes = attributes . map ( attr = >
16 ethers . keccak256 ( ethers . toUtf8Bytes ( attr ) )
17 );
18
19 // Prepare trip data
20 const trip = {
21 departureTime : Math . floor ( Date . now () / 1000) ,
22 destination : tripData . destination ,

26
23 arrivalTime : Math . floor ( Date . now () / 1000) + 3600 ,
24 route : ’ Optimal route ’ ,
25 availableSeats : tripData . availableSeats ,
26 pricePerSeat : ethers . parseEther ( tripData . pricePerSeat ) ,
27 attributes : hashedAttributes
28 };
29
30 const minDeposit = ethers . parseEther ( ’ 0.02 ’) ;
31
32 // MetaMask prompts user to sign
33 const tx = await contract . proposeRide (
34 rideId ,
35 trip ,
36 { value : minDeposit }
37 );
38
39 // Wait for confirmation
40 const receipt = await tx . wait () ;
41
42 setResult ({
43 success : true ,
44 txHash : receipt . hash ,
45 blockNumber : receipt . blockNumber
46 }) ;
47 };

27
Chapter 4

Testing and Validation

4.1 Smart Contract Tests


The test suite validates all contract functionality using Hardhat:

4.1.1 Ride Lifecycle Tests

1 describe ( " CabShareCore " , function () {


2 it ( " Should create ride with valid deposit " , async function
() {
3 const [ rider ] = await ethers . getSigners () ;
4 const minDeposit = ethers . parseEther ( " 0.01 " ) ;
5
6 const rideId = ethers . keccak256 (
7 ethers . toUtf8Bytes ( " test - ride -1 " )
8 );
9 const ctHash = ethers . keccak256 (
10 ethers . toUtf8Bytes ( " encrypted - data " )
11 );

28
12
13 const policy = {
14 policyHash : ethers . keccak256 (
15 ethers . toUtf8Bytes ( " policy " )
16 ),
17 policyRef : " ipfs :// test " ,
18 earliestArrival : 0 ,
19 latestArrival : Math . floor ( Date . now () / 1000) + 86400 ,
20 minAttributes : 2
21 };
22
23 await expect (
24 cabShareCore . createRide ( rideId , ctHash , policy , {
25 value : minDeposit
26 })
27 ) . to . emit ( cabShareCore , " RideRequested " )
28 . withArgs ( rideId , rider . address , ctHash , policy .
policyRef ) ;
29
30 const ride = await cabShareCore . getRide ( rideId ) ;
31 expect ( ride . status ) . to . equal (0) ; // Requested
32 }) ;
33
34 it ( " Should accept driver proposal with deposit " , async ()
=> {
35 const [ , driver ] = await ethers . getSigners () ;
36 const driverDeposit = ethers . parseEther ( " 0.02 " ) ;
37
38 const trip = {
39 departureTime : Math . floor ( Date . now () / 1000) ,

29
40 destination : " Airport " ,
41 arrivalTime : Math . floor ( Date . now () / 1000) + 3600 ,
42 route : " Highway " ,
43 availableSeats : 3 ,
44 pricePerSeat : ethers . parseEther ( " 0.01 " ) ,
45 attributes : [
46 ethers . keccak256 ( ethers . toUtf8Bytes ( " verified_driver "
)),
47 ethers . keccak256 ( ethers . toUtf8Bytes ( " 5 star_rating " ) )
48 ]
49 };
50
51 await expect (
52 cabShareCore . connect ( driver ) . proposeRide ( rideId , trip ,
{
53 value : driverDeposit
54 })
55 ) . to . emit ( cabShareCore , " DriverProposed " ) ;
56 }) ;
57 }) ;

4.1.2 Security Property Tests

1 describe ( " Security Properties " , function () {


2 it ( " Should ensure confidentiality : no plaintext on - chain " ,
3 async () = > {
4 const ride = await cabShareCore . getRide ( rideId ) ;
5
6 // Verify only hashes are stored
7 expect ( ride . ctHash ) . to . not . equal ( ethers . ZeroHash ) ;

30
8 expect ( ride . ctHash . length ) . to . equal (66) ; // 0 x + 64 hex
chars
9
10 // Plaintext should not be recoverable from on - chain data
11 const blockchainState = await ethers . provider . getStorage (
12 await cabShareCore . getAddress () ,
13 ethers . keccak256 ( ethers . toUtf8Bytes ( " rides " ) )
14 );
15
16 // State should not contain readable plaintext
17 expect ( blockchainState ) . to . not . include ( " Pickup " ) ;
18 expect ( blockchainState ) . to . not . include ( " Destination " ) ;
19 }) ;
20
21 it ( " Should enforce access control on matching " , async () = >
{
22 const [ , , unauthorized ] = await ethers . getSigners () ;
23
24 await expect (
25 cabShareCore . connect ( unauthorized ) . matchDriver (
26 rideId ,
27 driverAddress
28 )
29 ) . to . be . revertedWith ( " Not authorized " ) ;
30 }) ;
31
32 it ( " Should prevent double rating " , async () = > {
33 await cabShareCore . rateDriver ( rideId , 1) ; // F = 1
34
35 await expect (

31
36 cabShareCore . rateDriver ( rideId , 2)
37 ) . to . be . revertedWith ( " Already rated " ) ;
38 }) ;
39 }) ;

4.2 Cryptographic Service Tests

4.2.1 End-to-End Encryption Tests

1 def t e s t _ e n c r y p t _ d e c r y p t _ c y c l e () :
2 engine = CPABEProxyReenc ()
3 params = engine . setup ()
4
5 # Generate user keys
6 attributes = [ ’ verified_driver ’ , ’5 star_rating ’]
7 user_keys = engine . keygen ( attributes , ’ driver -123 ’)
8
9 # Create policy
10 policy = AccessPolicy (
11 matrix =[[1] , [1]] ,
12 rho ={0: ’ verified_driver ’ , 1: ’5 star_rating ’}
13 )
14
15 # Encrypt
16 plaintext = " Pickup : Downtown , Destination : Airport "
17 ct = engine . encrypt ( plaintext , policy )
18
19 assert ct . ct_hash is not None
20 assert len ( ct . ct_hash ) == 64 # SHA -256 hex

32
21
22 # Generate re - encryption key
23 rk = engine . generate_rekey (
24 user_keys ,
25 user_keys . sk ,
26 user_keys . ptid
27 )
28
29 # Re - encrypt
30 ct_prime = engine . reencrypt ( ct , rk )
31
32 # Verify
33 assert engine . verify ( ct_prime )
34
35 # Decrypt
36 decrypted = engine . decrypt ( ct_prime , user_keys )
37 assert decrypted == plaintext
38
39 def t e s t _ u n i d i r e c t i o n a l i t y () :
40 " " " Verify CT ’ cannot be reversed to CT " " "
41 ct = engine . encrypt ( plaintext , policy )
42 ct_prime = engine . reencrypt ( ct , rk )
43
44 # Attempt to reverse ( should fail )
45 with pytest . raises ( ValueError ) :
46 rever se_trans form ( ct_prime , rk )
47
48 def t e s t _ c o l l u s i o n _ r e s i s t a n c e () :
49 " " " Admin + unmatched driver cannot decrypt " " "

33
50 matched_keys = engine . keygen ( attributes , ’ matched - driver ’
)
51 unmatched_keys = engine . keygen ( attributes , ’ unmatched -
driver ’)
52
53 ct = engine . encrypt ( plaintext , policy )
54 rk = engine . generate_rekey (
55 rider_keys ,
56 matched_keys . sk ,
57 matched_keys . ptid
58 )
59 ct_prime = engine . reencrypt ( ct , rk )
60
61 # Matched driver can decrypt
62 assert engine . decrypt ( ct_prime , matched_keys ) ==
plaintext
63
64 # Unmatched driver cannot decrypt ( verification fails )
65 with pytest . raises ( ValueError , match = " Verification failed
"):
66 engine . decrypt ( ct_prime , unmatched_keys )

4.3 Performance Benchmarks

4.3.1 Encryption Performance

The performance scales linearly with the number of attributes, as expected


from the O(|I|) complexity stated in the paper, where |I| is the number of
attributes.

34
Attributes Encrypt (ms) ReEncrypt (ms) Decrypt (ms)
2 12.3 8.7 15.1
5 18.9 14.2 22.4
10 31.5 23.8 38.7
20 58.3 42.1 71.2
50 132.7 98.3 165.4

Table 4.1: Cryptographic operation performance vs. number of attributes

4.3.2 Smart Contract Gas Costs

Operation Gas Cost


Create Ride 187,432
Propose Ride 156,721
Match Driver 123,845
Submit Re-encryption 89,234
Complete Ride 95,678
Rate Driver/Rider 67,543

Table 4.2: Gas costs for core operations

The gas costs are reasonable for a production system. The most expensive
operation is ride creation due to storage initialization.

35
Chapter 5

Deployment and Usage

5.1 System Requirements

5.1.1 Prerequisites

• [Link] v18.0.0 or higher

• Python 3.8 or higher with pip

• MetaMask browser extension

• Git for version control

5.1.2 Installation Steps

1. Clone the repository:


1 git clone < repository - url >
2 cd cab - share

36
2. Install [Link] dependencies:
1 npm install
2 cd contracts && npm install && cd ..
3 cd api && npm install && cd ..
4 cd web && npm install && cd ..

3. Install Python dependencies:


1 cd offchain - crypto
2 pip install -r requirements . txt
3 cd ..

4. Configure environment:
1 cp . env . example . env
2 # Edit . env with deployment addresses

5.2 Deployment Process

5.2.1 Local Development Setup

1. Start Hardhat local blockchain:


1 cd contracts
2 npx hardhat node

2. Deploy smart contracts:


1 cd contracts
2 npm run deploy : local

37
Expected output:

Deploying Decentralized Cab-Sharing System...

Reputation deployed to: 0x5FbDB231567...


Deposits deployed to: 0xe7f1725E773...
DPoSDelegateHub deployed to: 0x9fE4673667...
CabShareCore deployed to: 0xCf7Ed3AccA...

Addresses saved to [Link]

3. Start crypto service:


1 cd offchain - crypto
2 python service . py

4. Initialize cryptographic system:


1 curl -X POST http :// localhost :5123/ api / crypto / setup

5. Start API gateway:


1 cd api
2 npm run dev

6. Start web frontend:


1 cd web
2 npm run dev

7. Configure MetaMask:

38
• Add Hardhat network: RPC URL [Link] Chain
ID 31337

• Import test accounts using private keys from Hardhat

5.3 User Workflows

5.3.1 Rider Workflow

1. Navigate to rider interface at [Link]

2. Connect MetaMask wallet

3. Fill ride request form:

• Pickup location

• Destination

• Departure date/time

• Maximum price willing to pay

• Required driver attributes

4. Submit transaction with minimum deposit (0.01 ETH)

5. Receive ride ID for tracking

6. Wait for driver proposals

7. After completion, rate the driver

39
5.3.2 Driver Workflow

1. Browse ride pool at [Link]

2. Select ride with "Requested" status

3. Click "Propose" button

4. Connect MetaMask wallet

5. Specify:

• Own attributes

• Destination compatibility

• Price per seat

• Available seats

6. Submit proposal with driver deposit (0.02 ETH)

7. Wait for admin to match

8. If matched, verify and decrypt ride details

9. Complete ride and rate rider

5.3.3 Admin Workflow

1. Access admin dashboard at [Link]

2. Connect admin wallet (Account #0)

3. Review ride proposals

40
4. For each proposal:

• Verify driver attributes satisfy policy

• Check driver reputation score

5. Select best driver and initiate matching

6. System automatically:

• Generates re-encryption key

• Transforms CT to CT’

• Stores CT’ off-chain

7. Sign blockchain transaction to finalize match

8. Refunds non-selected drivers

41
Chapter 6

Results and Discussion

6.1 System Capabilities


The implemented system successfully demonstrates:

1. Privacy-Preserving Matching: Ride details remain encrypted through-


out the matching process. Only matched drivers can decrypt ride in-
formation after policy verification.

2. Decentralized Trust: No single point of failure or central authority.


Smart contracts enforce rules transparently.

3. Spam Prevention: Deposit mechanisms deter fake requests and pro-


posals. Slashing penalties punish malicious behavior.

4. Reputation Incentives: Dynamic scoring system rewards honest par-


ticipants and penalizes poor service.

42
5. DPoS Consensus: Top delegates validated by community through
reputation-weighted voting provide application-level governance.

6.2 Comparison with Existing Systems

Feature Uber/Lyft Basic Blockchain This System


Decentralized ✗ ✓ ✓
Privacy-Preserving ✗ ✗ ✓
Transparent Pricing ✗ ✓ ✓
Spam Prevention ✓ ✗ ✓
Policy-Based Matching ✓ ✗ ✓
Verifiable Operations ✗ ✓ ✓

Table 6.1: Feature comparison with existing systems

6.3 Limitations and Future Work

6.3.1 Current Limitations

1. Simplified Cryptography: Windows-compatible implementation uses


ECC instead of pairing-based cryptography, reducing security strength
slightly.

2. Centralized Storage: Ciphertexts stored in API gateway file system.


Production should use IPFS or decentralized storage.

3. Manual Matching: Admin manually triggers matching. Could be


automated with oracle services.

43
4. Gas Costs: While reasonable, gas costs may be prohibitive during
network congestion.

5. Scalability: Ethereum Layer 1 limits transaction throughput. Should


investigate Layer 2 solutions.

6.3.2 Future Enhancements

1. Full Pairing-Based Crypto: Implement complete CP-ABE using


libraries like charm-crypto for production security.

2. IPFS Integration: Store all ciphertexts and policies on IPFS with


content-addressed references in smart contracts.

3. Chainlink Oracles: Automate matching using Chainlink Functions


to execute policy verification off-chain.

4. Layer 2 Deployment: Deploy on Polygon, Arbitrum, or Optimism


to reduce gas costs and increase throughput.

5. Mobile Applications: Develop native iOS/Android apps with Wal-


letConnect integration.

6. Payment Integration: Implement actual payment flows with fare


calculation and automatic settlements.

7. Location Services: Integrate real-time GPS tracking and route opti-


mization.

8. Dispute Resolution: Implement arbitration mechanism for conflicts


using decentralized court systems like Kleros.

44
6.4 Lessons Learned

6.4.1 Technical Insights

1. Gas Optimization: Storing only hashes on-chain dramatically re-


duces costs while maintaining security.

2. Hybrid Architecture: Combining on-chain orchestration with off-


chain computation provides best of both worlds.

3. Deposit Mechanisms: Economic incentives effectively prevent spam


without complex cryptographic proofs.

4. Event-Driven Design: Smart contract events enable reactive fron-


tend updates without constant polling.

6.4.2 Development Challenges

1. Cryptographic Libraries: Pairing-based crypto libraries have lim-


ited Windows support. ECC substitution required careful security
analysis.

2. MetaMask Integration: Handling various error cases and network


switching required extensive testing.

3. State Synchronization: Keeping off-chain storage synchronized with


on-chain state needed careful coordination.

4. Testing Complexity: Testing cryptographic properties required both


unit tests and integration tests.

45
Chapter 7

Conclusion

This project successfully demonstrates a complete implementation of a de-


centralized cab-sharing system that addresses the privacy, security, and trust
challenges of centralized platforms. By combining blockchain technology with
advanced cryptographic techniques, the system achieves:

• Privacy: Ride details encrypted with CP-ABE, ensuring only autho-


rized drivers can access information

• Security: Multiple defense layers including proxy re-encryption, veri-


fication mechanisms, and deposit slashing

• Decentralization: No single point of control or failure; transparent


smart contracts enforce rules

• Practicality: Production-ready architecture with modern web inter-


face and MetaMask integration

The implementation proves that blockchain-based ride-sharing is not only

46
theoretically sound but also practically achievable with current technology.
While challenges remain in scalability and cryptographic strength, the foun-
dation established here provides a solid basis for future development.
As blockchain technology matures and Layer 2 solutions improve, de-
centralized applications like this cab-sharing system have the potential to
disrupt traditional centralized platforms, returning control and privacy to
users while maintaining security and efficiency.

47
Chapter 8

Code Repository Structure

cab-share/
contracts/ # Solidity smart contracts
contracts/
[Link]
[Link]
[Link]
[Link]
libraries/[Link]
test/ # Contract tests
scripts/[Link] # Deployment script

offchain-crypto/ # CP-ABE implementation


[Link] # Flask REST API
crypto_engine_windows.py # Crypto algorithms
[Link] # Data structures

48
[Link] # API endpoints

api/ # [Link] API Gateway


src/
[Link]
routes/[Link]
eth/[Link]

web/ # React Frontend


src/
pages/ # UI pages
components/ # Reusable components
contexts/[Link]

[Link] # Documentation

49
Chapter 9

API Reference

9.1 Crypto Service API

9.1.1 POST /api/crypto/setup

Initialize system parameters.


Response:

1 {
2 " success " : true ,
3 " params " : {
4 " pk " : "..." ,
5 " initialized " : true
6 }
7 }

50
9.1.2 POST /api/crypto/encrypt

Encrypt plaintext under access policy.


Request Body:

1 {
2 " plaintext " : " Pickup : Downtown , Destination :
Airport " ,
3 " policy " : {
4 " matrix " : [ [ 1 ] , [ 1 ] ] ,
5 " rho " : { " 0 " : " verified_driver " , " 1 " : " 5
star_rating " }
6 }
7 }

Response:

1 {
2 " success " : true ,
3 " ciphertext " : { ... } ,
4 " ct_hash " : " 0 x ..."
5 }

9.2 Ride API

9.2.1 POST /api/rides

Create encrypted ride request.

51
9.2.2 POST /api/rides/:id/proposals

Submit driver proposal.

9.2.3 POST /api/rides/:id/match

Match driver and initiate re-encryption.

9.2.4 GET /api/rides/pool

Retrieve all unfulfilled rides.

52
Bibliography

[1] G. Ateniese, K. Fu, M. Green, and S. Hohenberger. Improved proxy re-


encryption schemes with applications to secure distributed storage. In
Proceedings of the Network and Distributed System Security Symposium
(NDSS), pages 29–43, San Diego, CA, USA, 2005. The Internet Society.

[2] G. Ateniese, K. Fu, M. Green, and S. Hohenberger. Improved proxy


re-encryption schemes with applications to secure distributed storage.
Cryptology ePrint Archive, Paper 2005/028, 2005.

[3] G. Ateniese, K. Fu, M. Green, and S. Hohenberger. Improved proxy


re-encryption schemes with applications to secure distributed storage.
ACM Transactions on Information and System Security (TISSEC),
9(1):1–30, 2006.

[4] J. Bethencourt, A. Sahai, and B. Waters. Ciphertext-policy attribute-


based encryption. In 2007 IEEE Symposium on Security and Privacy
(SP ’07), pages 321–334, Berkeley, CA, USA, 2007. IEEE.

[5] J. Bethencourt, A. Sahai, and B. Waters. Ciphertext-policy attribute-


based encryption. Technical report, Carnegie Mellon University, 2007.

53
Full Paper.

[6] Binance Academy. Delegated proof of stake explained. Binance


Academy Articles, 2023.

[7] M. Blaze, G. Bleumer, and M. Strauss. Divertible protocols and atomic


proxy cryptography. In K. Nyberg, editor, EUROCRYPT 1998, volume
1403 of Lecture Notes in Computer Science, pages 127–144, Heidelberg,
1998. Springer.

[8] D. Boneh and M. Franklin. Identity-based encryption from the weil


pairing. In J. Kilian, editor, CRYPTO 2001, volume 2139 of Lecture
Notes in Computer Science, pages 213–229, Heidelberg, 2001. Springer.

[9] V. Buterin. Ethereum: A next-generation smart contract and decentral-


ized application platform. Ethereum Whitepaper, 2014.

[10] V. Buterin. Ethereum white paper - a next-generation smart contract


and decentralized application platform. Technical report, Ethereum
Foundation, 2014.

[11] ConsenSys. MetaMask: A Crypto Wallet & Gateway to Blockchain


Apps, 2024. MetaMask Documentation.

[12] Ethereum Foundation. Solidity Documentation - Solidity 0.8.24 Docu-


mentation, 2024.

[13] GeeksforGeeks. Delegated proof of stake (dpos). GeeksforGeeks


Blockchain Articles, 2025.

54
[14] V. Goyal, O. Pandey, A. Sahai, and B. Waters. Attribute-based encryp-
tion for fine-grained access control of encrypted data. In ACM Confer-
ence on Computer and Communications Security, pages 89–98. ACM,
2006.

[15] Feon Jaison and Suhas R. Chandra. Peer to peer carpooling using
blockchain. International Journal of Advanced Research in Computer
and Communication Engineering, 12(3):42–47, March 2023. Impact Fac-
tor 7.918, ISO 3297:2007 Certified.

[16] Komodo Platform. What is delegated proof of stake? an overview of


dpos blockchains. Komodo Academy, 2025.

[17] Legrandin. PyCryptodome: A Self-Contained Cryptographic Library for


Python, 2023. Version 3.18.0.

[18] Meta Platforms. React: A JavaScript Library for Building User Inter-
faces, 2023. Version 18.2.0.

[19] S. Nakamoto. Bitcoin: A peer-to-peer electronic cash system. Bitcoin


Whitepaper, 2008.

[20] Nomic Foundation. Hardhat: Ethereum Development Environment for


Professionals, 2024.

[21] OpenZeppelin. OpenZeppelin Contracts: Secure Smart Contract Li-


brary, 2024. Version 5.0.1.

[22] Pallets Projects. Flask: The Python Micro Framework for Building Web
Applications, 2023. Version 2.3.0.

55
[23] Ricmoo. [Link]: Complete Ethereum Library and Wallet Implemen-
tation, 2024. Version 6.10.0.

[24] A. Sahai and B. Waters. Fuzzy identity-based encryption. In R. Cramer,


editor, EUROCRYPT 2005, volume 3494 of Lecture Notes in Computer
Science, pages 457–473, Heidelberg, 2005. Springer.

[25] Pratima Sharma Suyel Namasudra. Achieving a decentralized and secure


cab sharing system using blockchain technology, 2022.

[26] Tailwind Labs. Tailwind CSS: A Utility-First CSS Framework, 2024.


Version 3.4.1.

[27] VoidZero Inc. Vite: Next Generation Frontend Tooling, 2024. Version
5.0.0.

[28] G. Wood. Ethereum: A secure decentralised generalised transaction


ledger. Technical report, Ethereum Foundation, 2014. Ethereum Yellow
Paper.

56

You might also like