0
Tải bản đầy đủ (.pdf) (119 trang)

MÔ HÌNH NGHIỆP VỤ

Một phần của tài liệu NGHIÊN CỨU MỘT SỐ BÀI TOÁN TRONG HỆ THỐNG TIỀN ĐIỆN TỬ (Trang 88 -88 )

4.2.1. Biểu đồ ngữ cảnh.

Hình 13. Biểu đồ ngữ cảnh của hệ thống.

Các y/c gửi tiền

Khách

hàng

Ngân

hàng

Y/c khởi tạo tài khoản y/c xác thực

y/c rút tiền

Tiền điện tử

Các y/c KH Y/c thanh toán

0

Hệ thống

thanh

toán tiền

điện tử

Xác thực Số tài khoản

Tiền điện tử sinh ra

4.2.2. Biểu đồ phân rã chức năng.

1).Hệ thống thanh toán dành cho khách hàng.

Hình 14. Biểu đồ phân rã chức năng trong hệ thống khách hàng.

Hệ thống thanh toán tiền điện tử

E-Money Payment System Client

1. Khởi tạo TK Open Account 2. Rút TĐT Withdraw Money 3. Thanh toán TĐT Payment Money 4. Gửi TĐT Deposit Money 1.1 Sinh u1, u2 Generate u1, u2 1.2 Tính I Calculate I 1.3 Gửi I cho NH Send I to Bank 2.1 Xác thực Authenticate 2.2 Nhận TĐT Get Money 3.1 Trả TĐT cho Bob Pay Money 3.2 Nhận TĐT từ Alice Get Money

4.1 Bob gửi tt TT cho NH

Send PayInfor

4.2 Bob thử thách Alice

Bob test Alice

2.3 Lƣu TĐT

Save Money

Giải thích chi tiết các chức năng:

Chức năng 1.1: Ngƣời dùng sinh ngẫu nhiên hai giá trị u1 và u2.

Chức năng 1.2: Ngƣời dùng tính giá trị 1 2

1 2

u u

Ig g

Chức năng 1.3: Ngƣời dùng gửi I tới Ngân hàng.

Chức năng 2.1: Ngân hàng yêu cầu ngƣời dùng chứng minh về sở hữu tài khoản.

Chức năng 2.2: Sau khi xác thực, ngƣời dùng nhận tiền điện tử từ Ngân hàng.

Chức năng 2.3: Ngƣời dùng lƣu tiền điện tử do Ngân hàng gửi.

Chức năng 3.1: Khi thực hiện các giao dịch, với tƣ cách là ngƣời mua hàng, ngƣời dùng (Alice) trả tiền cho ngƣời cung cấp hàng hoá (Bob hoặc merchant).

Chức năng 3.2: Đồng thời trong các giao dịch, với tƣ cách là ngƣời bán hàng, Bob nhận tiền từ các ngƣời dùng khác trong hệ thống (Alice).

Chức năng 4.1: Sau khi thực hiện các giao dịch, để kiểm tra những đồng tiền mình nhận đƣợc có hợp pháp không, Bob gửi các thông tin thanh toán tới Ngân hàng để yêu cầu Ngân hàng kiểm tra.

2).Hệ thống thanh toán dành cho Ngân hàng.

Hình 15. Biểu đồ phân rã chức năng trong hệ thống Ngân hàng.

Hệ thống thanh toán tiền điện tử

E-Money Payment System Bank

1. Quản lí KH Manage Customer 2. Tạo TĐT Create Money 3. Thanh toán TĐT Payment Money 1.1 Quản lí tt KH Manage CustInfor 1.2 Quảnlí tkKH Manage CustAccount 2.3 Trả TĐT Return Money 2.1 Xác thực KH Authenticate 2.2 Sinh TĐT Generate Money 3.1 Kiểm tra TĐT Check Money 3.2 Hạch toán TK Payment 3.3 Lƣu t.t TĐT Save MoneyInfor

Giải thích chi tiết các chức năng:

Chức năng 1.1: Ngân hàng quản lí các thông tin về khách hàng (ví dụ nhƣ: họ tên, địa chỉ, giá trị I tƣơng ứng,…).

Chức năng 1.2: Ngân hàng quản lí thông tin về tài khoản của khách hàng.

Chức năng 2.1: Ngân hàng kiểm tra xem khách hàng có phải chủ sở hữu hợp pháp của tài khoản hay không.

Chức năng 2.2: Sau khi xác thực, Ngân hàng tạo tiền điện tử.

Chức năng 2.3: Ngân hàng trả lại tiền điện tử theo yêu cầu của khách hàng.

Chức năng 3.1: Ngân hàng kiểm tra tính hợp pháp của tiền điện tử theo yêu cầu của khách hàng.

Chức năng 3.2: Ngân hàng cộng thêm (khi khách hàng là ngƣời bán hàng) hoặc trừ đi một lƣợng tiền (khi khách hàng là ngƣời mua hàng) trong tài khoản của khách hàng, tuỳ từng trƣờng hợp cụ thể.

Chức năng 3.3: Các thông tin về tiền điện tử mà khách hàng đã tiêu xài, đƣợc Ngân hàng lƣu trữ trong CSDL dùng để truy vết kẻ gian lận.

4.3. MÔ HÌNH KHÁI NIỆM / LOGIC.

4.3.1. Hệ thống thanh toán dành cho khách hàng.

1).Biểu đồ luồng dữ liệu mức 0.

Hình 16. Biểu đồ luồng dữ liệu mức 0 trong hệ thống khách hàng.

Customer B 1 Open Account Bank System 2 Withdraw Money 4 Deposit Money Customer Infor 3 Payment Money Customer Infor Money Money Bank System I E- Money E- Money Customer Infor u1, u2

2).Các biểu đồ luồng dữ liệu mức 1.

Hình 17. Biểu đồ luồng dữ liệu mức 1 cho chức năng Open Account.

1.1 Generate u1, u2 E-money Client 1.2 Calculate I 1.3 Send I Customer Infor Bank System

Hình 18. Biểu đồ luồng dữ liệu mức 1 cho chức năng Withdraw Money. 2.1 Authenticate E-money Client 2.2 Get Money 2.3 Save Money Customer Infor Bank System Money

Hình 19. Biểu đồ luồng dữ liệu mức 1 cho chức năng Payment Money. 3.1 Pay Money Customer B 3.2 Get Money Money A Customer A Money B

Hình 20. Biểu đồ luồng dữ liệu mức 1 cho chức năng Deposit Money. 4.1 Send PayInfor 4.2 Test A Money B Bank System Money B Customer A

4.3.2. Hệ thống thanh toán dành cho Ngân hàng.

1).Biểu đồ luồng dữ liệu mức 0.

Hình 21. Biểu đồ luồng dữ liệu mức 0 trong hệ thống Ngân hàng.

2 Create Money 1 Manage Customer Customer Customer Payment History 3 Payment Money Used Money Customer

Money Type Customer Account

Money Type

2).Các biểu đồ luồng dữ liệu mức 1.

Hình 22. Biểu đồ luồng dữ liệu mức 1 cho chức năng Manage Customer.

1.2 Manage Cust Account 1.1 Manage CustInfor Customer Customer Customer Identify Customer Account

Hình 23. Biểu đồ luồng dữ liệu mức 1 cho chức năng Create Money. 2.3 Return Money 2.1 Authenticate Customer Customer Customer Identify Customer Account 2.2 Generate Money Money Type Customer Used Money

Hình 24. Biểu đồ luồng dữ liệu mức 1 cho chức năng Payment Money. 3.3 Save MoneyInfor 3.1 Check Money Customer Customer Used Money Customer Account 3.2 Payment Illegal Customer Customer Payment History

4.3.3. Biểu đồ quan hệ thực thể.

1).Hệ thống thanh toán cho khách hàng.

Hình 25. Biểu đồ quan hệ thực thể trong hệ thống thanh toán cho khách hàng.

CUSTOMER INFOR MONEY THUỘC BANK SYSTEM

v

Bank Code Bank Name

CustID Account Number

u1 u2

MoneyDateTime

Money ID Money Status

^

2).Hệ thống thanh toán dành cho Ngân hàng.

Hình 26. Biểu đồ quan hệ thực thể trong hệ thống thanh toán cho Ngân hàng.

<

^

v

=

PAYMENT HISTORY CUSTOMER BANK SYSTEM USED MONEY CUSTOMER ACCOUNT CUSTOMER IDENTIFY MONEY TYPE ILLEGAL CUSTOMER THUỘC

Bank Code Bank Name

Bank Name Cust ID Payment Type Amount DateTime

Cust Name Cust Male Cust Birth

Cust ID Bank Name Account Number Cust Address hu Identify ho PublicKey Date Issue Cust ID SymmetricKey AccountNum Cust ID Bank Code Current Amount

MoneyID MoneyType MoneyValue a DateTime a0 d b r0 b0 z0 CustID a z0 r2 r3 C b0 a0 b d r0 r1

>

>

>

>

=

4.3.4. Một số giao diện chính.

1).Mở tài khoản.

3).Thanh toán.

4.3.5. Trích dẫn một số phần mã nguồn.

Thiết lập Ngân hàng - Established Bank

package EMoneyPaymentSystemBank.Brands; import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import EMoneyPaymentSystemBank.Brands.DBMS.Environment; import EMoneyPaymentSystemBank.Brands.DBMS.EnvironmentHome; import java.util.Collection; import java.util.Iterator; import java.math.BigInteger; import javax.ejb.SessionBean; import javax.ejb.SessionContext; import javax.naming.NamingException;

public class EstablishBankBean implements SessionBean {

Commond commond;

CommondHome commondHome; public void EstablishBankBean() {

try {

Context context = new InitialContext();

commondHome = (CommondHome)PortableRemoteObject.narrow(context.lookup("Commond"), CommondHome.class); commond = commondHome.create();

} }

public Boolean establishBank(BigInteger primeP, BigInteger primeQ) {

String MethodName ="establishBank"; try

{

commond.writtingToLogFile("Processing of establishment Bank is starting ..."); //Set prime P

if (commond.setPrime("p",primeP).booleanValue()) {

commond.writtingToLogFile("set prime P successfully"); //Set prime Q

if (commond.setPrime("q",primeQ).booleanValue()) {

commond.writtingToLogFile("set prime Q successfully"); //Chose g, g1, g2

if (commond.setGenerator("g").booleanValue()) {

commond.writtingToLogFile("Chose generator g successfully"); if (commond.setGenerator("g1").booleanValue())

{

commond.writtingToLogFile("Chose generator g1 successfully"); if (commond.setGenerator("g2").booleanValue())

{

commond.writtingToLogFile("Chose generator g2 successfully"); if (commond.setPrivateBankKey().booleanValue())

{

commond.writtingToLogFile("Chose privated key x of Bank successfully"); if (commond.setPublicBankKeyH().booleanValue())

{

commond.writtingToLogFile("set public key h = g^x mod p of Bank successfully"); commond.writtingToLogFile("Processing of establishment Bank is finished successfully!"); return Boolean.TRUE;

} else {

commond.writtingToLogFile("not set public key h = g^x mod p of Bank successfully"); commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE;

} } else {

commond.writtingToLogFile("not chose privated key x of Bank successfully");

commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE;

} } else {

commond.writtingToLogFile("not chose generator g2 successfully");

commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE;

} } else {

commond.writtingToLogFile("Chose generator g1 successfully");

commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE;

} } else {

commond.writtingToLogFile("not chose generator g successfully");

commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE;

else {

commond.writtingToLogFile("not set prime Q successfully");

commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE;

} } else {

commond.writtingToLogFile("not set prime P successfully");

commond.writtingToLogFile("Processing of establishment Bank is not finished successfully!"); return Boolean.FALSE; } } catch(Throwable ex) { try{

commond.writtingToLogFile("Can't establishBank successfully"); }catch (Throwable ex1){

return Boolean.FALSE; }

}

return Boolean.TRUE; }

Khởi tạo tài khoản - Open Account

package EMoneyPaymentSystemBank.Brands; import javax.ejb.SessionBean; import javax.ejb.SessionContext; import java.math.BigInteger; import javax.naming.Context; import javax.naming.InitialContext; import javax.rmi.PortableRemoteObject; import EMoneyPaymentSystemBank.Brands.DBMS.CustomerAccount; import EMoneyPaymentSystemBank.Brands.DBMS.CustomerAccountHome; import EMoneyPaymentSystemBank.Brands.DBMS.CustomerAccountPK; import EMoneyPaymentSystemBank.Brands.DBMS.CustomerIdentify; import EMoneyPaymentSystemBank.Brands.DBMS.CustomerIdentifyHome; import EMoneyPaymentSystemBank.Brands.DBMS.CustomerIdentifyPK; import EMoneyPaymentSystemBank.Brands.DBMS.Environment; import EMoneyPaymentSystemBank.Brands.DBMS.EnvironmentHome;

public class OpenAccountBean implements SessionBean {

Commond commond;

CommondHome commondHome; CustomerIdentify customerIdentify;

CustomerIdentifyHome customerIdentifyHome; CustomerAccount customerAccount;

CustomerAccountHome customerAccountHome; public void OpenAccountBean()

{ try {

Context context = new InitialContext();

commondHome = (CommondHome)PortableRemoteObject.narrow(context.lookup("Commond"), CommondHome.class); commond = commondHome.create(); customerIdentifyHome = (CustomerIdentifyHome)PortableRemoteObject.narrow(context.lookup("CustomerIdentify"), CustomerIdentifyHome.class); customerIdentify = customerIdentifyHome.create(); customerAccountHome = (CustomerAccountHome)PortableRemoteObject.narrow(context.lookup("CustomerAccount"), CustomerAccountHome.class); customerAccount = customerAccountHome.create(); }

public BigInteger getUserPrivatedKey() {

Integer bitLength = new Integer("0");

BigInteger userPrivatedKey = new BigInteger("0"); String MethodName =":getUserPrivatedKey:"; try

{

bitLength = commond.getLengthRundomNumber(); userPrivatedKey = commond.getRundomNumber(bitLength);

commond.writtingToLogFile(MethodName+"chose user privated key successfully"); return userPrivatedKey;

}

catch(Throwable ex) {

//not chose user privated key successfully

//commond.writtingToLogFile(MethodName+"not chose user privated key successfully"); return userPrivatedKey;

} }

public Boolean setUserIdentifierPublicKeyHu(String Cust_ID, String DateIssue, String Status, BigInteger Hu) {

String MethodName =":setUserIdentifierPublicKeyHu:";

CustomerIdentifyPK customerIdentifyPK = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(customerIdentifyPK); customerIdentify.setHu(Hu.toString());

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not set User Identifier Public Key Hu successfully"); return Boolean.FALSE;

} }

public BigInteger getUserSecretRundomNumberO1(String Cust_ID, String DateIssue, String Status) {

Integer bitLength;

BigInteger userPrivatedKey = new BigInteger("0"); String MethodName =":getUserSecretRundomNumberO1:"; try

{

bitLength = commond.getLengthRundomNumber(); userPrivatedKey = commond.getRundomNumber(bitLength);

commond.writtingToLogFile(MethodName+"get user seret rundom O1 successfully"); return userPrivatedKey;

}

catch(Throwable ex) {

//not chose user privated key successfully

//commond.writtingToLogFile(MethodName+"not get user seret rundom O1 successfully"); return userPrivatedKey;

} }

public BigInteger getUserObserverIdentifierPublicKeyH0(String Cust_ID, String DateIssue, String Status) {

BigInteger userObserverIdentifierPublicKeyH0 = new BigInteger("0"); String MethodName =":getUserObserverIdentifierPublicKeyH0:";

CustomerIdentifyPK customerIdentifyPK = new CustomerIdentifyPK(Cust_ID, DateIssue, Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(customerIdentifyPK); userObserverIdentifierPublicKeyH0 = new BigInteger(customerIdentify.getHo());

commond.writtingToLogFile(MethodName+"get User Observer Identifier Public Key H0 successfully"); return userObserverIdentifierPublicKeyH0;

}

catch(Throwable ex) {

//not chose user privated key successfully

//commond.writtingToLogFile(MethodName+"not get User Observer Identifier Public Key H0 successfully"); return userObserverIdentifierPublicKeyH0;

} }

{

BigInteger userIdentifierPublicKeyI = new BigInteger("0"); String MethodName =":getUserIdentifierPublicKeyI:";

CustomerIdentifyPK customerIdentifyPK = new CustomerIdentifyPK(Cust_ID, DateIssue, Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(customerIdentifyPK); userIdentifierPublicKeyI = new BigInteger(customerIdentify.getIdentify());

commond.writtingToLogFile(MethodName+"get User Identifier Public Key I successfully"); return userIdentifierPublicKeyI;

}

catch(Throwable ex) {

//not chose user privated key successfully

//commond.writtingToLogFile(MethodName+"not get User Identifier Public Key I successfully"); return userIdentifierPublicKeyI;

} }

public BigInteger getSignatureOnUserIdentificationZ(String Cust_ID, String DateIssue, String Status) {

BigInteger userSignatureOnUserIdentificationZ = new BigInteger("0"); String MethodName =":getSignatureOnUserIdentificationZ:";

CustomerIdentifyPK customerIdentifyPK = new CustomerIdentifyPK(Cust_ID, DateIssue, Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(customerIdentifyPK); userSignatureOnUserIdentificationZ = new BigInteger(customerIdentify.getIdentify());

commond.writtingToLogFile(MethodName+"get Signature On User Identification Z successfully"); return userSignatureOnUserIdentificationZ;

}

catch(Throwable ex) {

//not chose user privated key successfully

//commond.writtingToLogFile(MethodName+"not get Signature On User Identification Z successfully"); return userSignatureOnUserIdentificationZ;

} }

public Integer getUserAccountBalance(String Cust_ID, String Bank_code, String Account_Number) {

Integer userAccountBalance = new Integer("0"); String MethodName =":getUserAccountBalance:";

CustomerAccountPK customerAccountPK = new CustomerAccountPK(Cust_ID, Bank_code, Account_Number); try

{

customerAccount = customerAccountHome.findByPrimaryKey(customerAccountPK); userAccountBalance = new Integer(customerAccount.getCurrentAmount().toString());

return userAccountBalance; }

catch(Throwable ex) {

//not chose user privated key successfully

//commond.writtingToLogFile(MethodName+"not get User Account Balance successfully"); return userAccountBalance;

} }

public Boolean setUserIdentifierPublicKeyI(String Cust_ID, String DateIssue, String Status, BigInteger Identify) {

String MethodName =":setUserIdentifierPublicKeyI:";

CustomerIdentifyPK customerIdentifyPK = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(customerIdentifyPK); customerIdentify.setHu(Identify.toString());

commond.writtingToLogFile(MethodName+"set User Identifier Public Key I successfully"); return Boolean.TRUE;

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not set User Identifier Public Key I successfully"); return Boolean.FALSE;

} }

public Boolean setUserObserverIdentifierPublicKeyH0(String Cust_ID, String DateIssue, String Status, BigInteger Ho) {

String MethodName =":setUserObserverIdentifierPublicKeyH0:";

CustomerIdentifyPK customerIdentifyPK = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(customerIdentifyPK); customerIdentify.setHu(Ho.toString());

commond.writtingToLogFile(MethodName+"set User Observer Identifier Public Key H0 successfully"); return Boolean.TRUE;

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not set User Observer Identifier Public Key H0 successfully"); return Boolean.FALSE;

} }

public Boolean setUserPublicKeyPKI(String Cust_ID, String DateIssue, String Status, BigInteger Public_Key) {

CustomerIdentifyPK userPublicKeyPKI = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(userPublicKeyPKI); customerIdentify.setHu(Public_Key.toString());

commond.writtingToLogFile(MethodName+"set User Public Key PKI successfully"); return Boolean.TRUE;

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not set User Public Key PKI successfully"); return Boolean.FALSE;

} }

public BigInteger getUserPublicKeyPKI(String Cust_ID, String DateIssue, String Status) {

String MethodName =":getUserPublicKeyPKI:";

CustomerIdentifyPK userPublicKeyPKIPK = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(userPublicKeyPKIPK); commond.writtingToLogFile(MethodName+"get User Public Key PKI successfully"); return new BigInteger(customerIdentify.getPublic_key());

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not get User Public Key PKI successfully"); return new BigInteger("0");

} }

public BigInteger getUserSymmetricKey(String Cust_ID, String DateIssue, String Status) {

String MethodName =":getUserSymmetricKey:";

CustomerIdentifyPK userSymmetricKeyPK = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(userSymmetricKeyPK); commond.writtingToLogFile(MethodName+"get User Symmetric Key successfully"); return new BigInteger(customerIdentify.getSymmetric_key());

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not get User Symmetric Key successfully"); return new BigInteger("0");

} }

public Boolean setUserSymmetricKey(String Cust_ID, String DateIssue, String Status, String Symmetric_Key) {

String MethodName =":setUserSymmetricKey:";

CustomerIdentifyPK userSymmetricKeyPK = new CustomerIdentifyPK(Cust_ID, DateIssue,Status); try

{

customerIdentify = customerIdentifyHome.findByPrimaryKey(userSymmetricKeyPK); customerIdentify.setSymmetric_key(Symmetric_Key.toString());

commond.writtingToLogFile(MethodName+"set User Symmetric Key successfully"); return Boolean.TRUE;

}

catch(Throwable ex) {

//commond.writtingToLogFile(MethodName+"not set User Symmetric Key successfully"); return Boolean.FALSE; } } } Xu li so lon package EMoneyPaymentSystemBank.Brands.Cryptography; import javax.ejb.SessionBean; import javax.ejb.SessionContext; import java.math.BigInteger;

public class BigNumberBean implements SessionBean {

public void ejbCreate() {

}

public void ejbActivate() {

}

public void ejbPassivate() {

}

public void ejbRemove() {

}

public void setSessionContext(SessionContext ctx) {

}

//Method name: getQ //Input: BigInteger p //Output: BigInteger

//Description: Tinh gia tri so nguyen to q! p=nq +1 //Date:25/08/2006

//Version:1.0.0

//Copyright by: Ha Thanh Huyen - huyen.hathanh@gmail.com

//************************************************************// public BigInteger getQ(BigInteger primeP)

{

BigInteger p = primeP;

BigInteger maxFindNumber = new BigInteger("1"); BigInteger currentCountNumber = new BigInteger("2"); BigInteger[] divAndRem = new BigInteger[2]; int lengthPrimaryQ = p.bitLength()/2;

p = p.subtract(new BigInteger("1"));

maxFindNumber = p.divide(new BigInteger("2")); boolean foundPrimery = true;

while (foundPrimery && currentCountNumber.compareTo(maxFindNumber)<=0) { divAndRem = p.divideAndRemainder(currentCountNumber); if (divAndRem[1].compareTo(new BigInteger("0"))==0) { if (divAndRem[0].isProbablePrime(lengthPrimaryQ)) { foundPrimery = false; }else {

currentCountNumber = currentCountNumber.add(new BigInteger("1")); }

} else {

currentCountNumber = currentCountNumber.add(new BigInteger("1")); }

}

if (!foundPrimery) return divAndRem[0]; else

return new BigInteger("0"); }

//************************************************************// //Method name: pow

//Input: BigInteger x, BigInteger exponent //Output: BigInteger

//Description: Tinh gia tri x^exponent //Date:25/08/2006

//Copyright by: Ha Thanh Huyen - huyen.hathanh@gmail.com

//************************************************************// public BigInteger pow(BigInteger x, BigInteger exponent)

{

BigInteger resultBigInteger = new BigInteger("1"); BigInteger resultTenExponent = x;

String exponentString = exponent.toString(); Integer valueTenNumber ;

int lengthExponent = exponentString.toString().length();

if (lengthExponent >=0) {

if (lengthExponent == 0) {

valueTenNumber = new Integer(exponentString.substring(0,1)); if (valueTenNumber.intValue() > 0)

{

//Truong hop gia tri cua don vi thu i khac 0

resultBigInteger = resultTenExponent.pow(valueTenNumber.intValue()); return resultBigInteger; } else return resultBigInteger; } else {

for (int i=lengthExponent-1;i>=0;i--) {

valueTenNumber = new Integer(exponentString.substring(i,i+1)); if (valueTenNumber.intValue() != 0)

{

//Truong hop gia tri cua don vi thu i khac 0

resultBigInteger = resultBigInteger.multiply(resultTenExponent.pow(valueTenNumber.intValue())); resultTenExponent = resultTenExponent.pow(10);

} else {

//Truong hop gia tri cua don vi thu i bang 0 resultTenExponent = resultTenExponent.pow(10); } } return resultBigInteger; } } else

return new BigInteger("0"); }

KẾT LUẬN

Luận văn đã trình bày những kiến thức tổng quát nhất về tiền điện tử, đi sâu nghiên cứu và phân tích giải pháp cho các bài toán nảy sinh khi dùng tiền điện tử. Những kết quả chính của luận văn là:

1/. Nghiên cứu và hệ thống lại các vấn đề sau:

+ Khái niệm, tính chất, cấu trúc, mô hình giao dịch, thanh toán với tiền điện tử. + Nghiên cứu giải pháp cho ba bài toán phát sinh khi dùng tiền điện tử.

2/. Xây dựng mô phỏng hệ thống tiền điện tử dựa trên lƣợc đồ Brand.

Hƣớng tiếp theo của luận văn là nghiên cứu để đề xuất mô hình hệ thống tiền điện tử hiệu quả và thử nghiệm mô hình.

DANH MỤC CÔNG TRÌNH CỦA TÁC GIẢ

1. “Hướng dẫn học sinh giải bài toán liên quan đến tính góc

Sáng kiến kinh nghiệm cấp Thành phố năm học 2001 – 2002. 2. Phần mềm: “Giảng dạy môn Vật lý

Sáng kiến kinh nghiệm cấp Thành phố năm học 2002 -2003.

3. “Kinh nghiệm hướng dẫn học sinh giải bài toán rút gọn biểu thức Đại số lớp 8” Sáng kiến kinh nghiệm cấp Thành phố năm học 2003 – 2004.

4. “Kinh nghiệm hướng dẫn học sinh giải toán hình về quan hệ giữa các yếu tố trong tam giác

Sáng kiến kinh nghiệm cấp Thành phố năm học 2004 – 2005.

5. “Kinh nghiệm hướng dẫn học sinh giải bài toán bằng cách lập phương trình” Sáng kiến kinh nghiệm cấp Thành phố năm học 2005 – 2006.

6. “77 bài phương trình vô tỷ

TÀI LIỆU THAM KHẢO

Tiếng Việt.

1.Phan Đình Diệu GS (2006), Lý Thuyết Mật Mã và An Toàn Thông Tin, Nhà xuất bản Đại học quốc gia Hà Nội.

2.Trịnh Nhật Tiến PGS. TS (2007), Bài giảng môn An toàn và bảo mật dữ liệu. 3.Trịnh Nhật Tiến PGS. TS (2007), Bài giảng môn Phân tích đánh giá thuật toán. 4.Trịnh Nhật Tiến PGS. TS, (Hội thảo: Nghiên cứu cơ bản và ứng dụng công nghệ thông tin, thành phố Hồ Chí Minh 2005), Khoa CNTT, Đại học Công nghệ, Đại học quốc gia Hà Nội, Báo cáo “Chữ ký: “mù”, “nhóm”, “mù nhóm” và ứng dụng”. 5.Nguyễn Văn Vỵ PGS –TS (2002), Phân tích thiết kế Hệ thống thông tin, Nhà xuất bản thống kê Hà Nội.

Tiếng Anh.

6.ByeongKon Kim, School of Engineering, Information and Commmunications University (2004), Bài viết: “Design of Fair Tracing E_cash System based on Blind Signature” trên trang web:

http://caislab.icu.ac.kr/Paper/thesis_files/2004/Thesis_bgKim.pdf

7.[Ebook - C] Applied Cryptography Second Edition - John Wiley & Sons Inc.pdf 8. Prentice Hall - Modern Cryptography - Theory And Practice - 2003.pdf

9.Mandana Jahanian Farsi, Master’s Thesis in Computer Science, Department of mathematics and computing science,

Goteborg

University (1997), Bài viết: “Digital Cash” trên trang web: http://www.simovits.com/archive/dcash.pdf.

Một phần của tài liệu NGHIÊN CỨU MỘT SỐ BÀI TOÁN TRONG HỆ THỐNG TIỀN ĐIỆN TỬ (Trang 88 -88 )

×