Project:-Offline E cash system
Developed By:- Rashmi Ranjan Parida(110cs0139) Bineet Satapathy(110cs0380)
E-payment systems
To transfer money over the Internet Methods of traditional payment Check, credit card, or cash Methods of electronic payment Electronic cash, software wallets, smart cards, and debit cards
Requirements for e-payments
Atomicity Money is not lost or created during a transfer Good atomicity Money and good are exchanged atomically Non-repudiation No party can deny its role in the transaction
E-cash
It is a type of e-payment. Primary advantage is Micropayments
Payments for items costing less than Rs 1. Anonymity.
Types of E-cash based on storage method On-line
Trusted third party, e.g. online bank, holds customers cash accounts
Off-line
Customer holds cash on smart card or software wallet. Example :- Smart card
Functional Requirements
There are 3 types of user Admin Customer Merchant Admin Generate Keys Add Customer Delete Customer Modify Customer
Merchant Deposit Ecoin
Customer But Ecoin Trace Ecoin View Details
Non- Functional requirements
The system requires the customer to identify
himself/herself using username and w. The system shall give responses in 1 second. The System must support 1000 users at a time. The user-interface screen shall respond within 3 seconds. The server should be connected to internet 24 X 7 and the Server must be on all time.
E-Cash System Protocol: The e-cash system consists of 4 participants : a customer ,a merchant , a bank ,
a clearing house and 3 protocols.
Account Opening Protocol Payment Protocol Deposit Protocol
System SetUp
Bank randomly chooses 3 prime number p, q & f such that p=(2*p*f+1) &
q=(2*q*f+1) are primes. e which is co-prime with both p-1 & q-1. Computes n=p*q, (n)=(p-1)*(q-1) & d=e-1 mod (n). g as a generator of n of order f. Clearing house chooses x in Z (n)* & computes Y=gx mod n. Public key(Y,g,n,e) , Private key (d,p,q,f,x). In Digital Signature signer signs with private key & verifier verifies with the Public key.
Account Opening Protocol:
.
It involves protocol between the customer and the bank in which the customer gets the secret membership key.
The customer chooses random number a,, in Zn* & computes
= * mod n Z=a * mod n & sends (,Z) to the bank. The bank computes w=z * -1 mod n , sends w to the customer & stores (w, ,Z) with the customers identity. The customer checks the authenticity by checking a=w mod n & keeps (w, ,Z) as his secret membership key.
Deposit Protocol:
It involves protocol between the merchant and bank in which the merchant deposits the e-coin to the bank.
The merchant sends the e-coin to the clearing house & the clearing house computes
w=/. & sends w to the bank. Based on the identity w ,the bank determines the real identity of a customer .Then deducts the money from the customers account & credits to the merchant.
Payment Protocol:
It involves protocol between the customer & the merchant in which the customer pays e-coin to merchant.
The merchant generates a payment message M as follws & sends it to the customer.
M=H( Shopid , amount of purchase , date). The customer requests a timestamp to the clearing house & obtains a timestamp t & chooses random number u in Z (n)* & sends u,t. The customer computes S= Ye mod n , R1= S+M gu mod n & sends (S,R1,t) to the clearing house. The clearing house checks the authenticity by verifying Sd =Y mod n. If it satisfies then chooses a random number K in Z (n)* & computes R2=(k-R1-t) mod (n) , R =(R1-S)g-k mod n & S+l = x-1(R2-u+R1)mod (n) & sends (S+l,R,R1,R2,t) to the customer. The customer computes l from the S+l & selects in random & computes = g x mod n & =w Y mod n. sends the e-coin(t,S,R,l,,) to merchant. The merchant verifies the e-coin as per following condition M=R Y (S+l) g t mod n. if so merchant accepts the e-coin otherwise it is rejected
Some proofs: S = Ye mod n Sd= Yed mod n but ed=1 mod (n) so ed= k* (n) +1 =>Sd=Y k* (n) +1 mon n =>Sd=Y mod n
R Y (S+l) g t mod n= R g x(S+l) g t mod n = R g (R2-u+R1)mod (n) g t mod n = (R1-S)g-k g (R2-u+R1) mod (n) g t mod n =M gu g-k g (R2-u+R1) mod (n) g t mod n =M g (R2-k+R1+t) mod (n) mod n =M ga * (n) mod n =M mod n, where a=0,1,2
UseCase Diagram
AddCustomer Customer DeleteCustomer
<<include>> KeyGeneration <<include>>
<<include>>
Bank
ModifyCustomer
Merchant LoginCustomer <<extend>>
BuyEcoin
ViewDetails
LoginMerchant <<extend>>
Deposit
Activity Diagram
Start
Open the Welcome page
Login as Bank admin
Login as Customer
Login as Merchant
Genrate public and private keys
Click on deposit button
View Customer Details
Buy Ecoin
Fill the details of ecoin
Add Cusomer
Delete Cusomer
Update Customer
Click on View Details button
Enter the purchase amount at corresponding merchant
click on Quit
Click on add button
Click on the cusomer u want to delete
Click on the customer u want to update
Click on buy button
Fill the details of Customer
Click on delete button
Clcik on update button
Do modification on the customer details click on quit
Click on quit
End
Class Diagram
Statechart Diagram
Login as customer
buy ecoin
show welcome page Login as bank admin
Add customer Delete customer
Modify Customer
Login as merchant
Deposit Ecoin
Sequence Diagram
Customer 1: Enter Login details Bank Controller
2: Invalid login details
3: View Customer Details
4: Buy ECoin
5: Enter the purchasing amount
6: Buy button
7: Click the Button 8: Cancel/Quit
Sequence Diagram
Merchant Bank
1: Enter Login details
2: deposit button
3: Click on Deposit Button
4: Details of Ecoin
5: Fill the details of ecoin
6: Quit
Collaboration Diagram
1: Enter Login details 5: Enter the purchasing amount 7: Click the Button Bank Customer 2: Invalid login details 3: View Customer Details 4: Buy ECoin 6: Buy button 8: Cancel/Quit
Controller
Collaboration Diagram
1: Enter Login details 3: Click on Deposit Button 5: Fill the details of ecoin Merchant Bank 2: deposit button 4: Details of Ecoin 6: Quit
Component Diagram
Customer
Bank
Merchant
Buy E-coin
Deposit E-Coin
Deployment Diagram
Bank
Customer
Merchant
Implementation
Thank You.