Thanh Toan Dien Tu
Thanh Toan Dien Tu
Thanh Toan Dien Tu
Monetary History:
ABSTRACTION
◼ Barter (direct exchange of goods)
◼ Medium of exchange (arrowheads, salt)
◼ Coins (gold, silver)
NEED
◼ Tokens (paper) BANKS
◼ Token money
❑ Represented by a physical article (e.g. cash)
❑ Can be lost
◼ Notational money
❑ Examples: bank accounts, frequent flyer miles
❑ Electronic (scriptural) money: wide recognition
❑ Jeton = electronic token with limited recognition
◼ Hybrid money
❑ Check
❑ Telephone card (carries jetons for future service)
The Money Matrix
◼ WITH GOVERNMENT
GOVERNMENT CENTRAL CHECK
BEARER BANK
BOND
SCRIPTURAL ◼ CERTIFIED ◼ BANK ◼ PERSONAL
CHECK ACCOUNT CHECK
◼ TRAVELER’S ◼ FREQUENT ◼ GIFT
CHECK FLYER MILES CERTIFICATE
Specialized Payment
Instruments
◼ Money order (allows named person to claim money)
◼ Traveler’s check (limited to one spender)
◼ Gift certificate (limited to one merchant)
◼ Coupons, food stamps (limited to certain goods)
◼ Bill of lading (sight draft), letter of credit
❑ Purpose: atomicity (connect goods and payment)
Ecommerce Payment Ranges
Minimum Typical Maximum
AMOUNTS IN USD Transaction Transaction Transaction
Value Value Value
BUYER SELLER
6. SELLER SHIPS GOODS TO BUYER
2. SELLER TRANSMITS
PAYMENT DATA TO
11. BUYER PAYS 10. BUYER’S BANK
8. SELLER’S BANK SELLER’S BANK
BUYER’S BANK SENDS BILL TO 5. SELLER’S BANK
CREDITS SELLER’S
USING SOME BUYER NOTIFIES SELLER
ACCOUNT
OTHER METHOD
OF PAYMENT 7. END OF DAY,
SELLER UPLOADS
3. SELLER’S BANK
COMPLETED
ASKS BUYER’S BANK
TRANSACTIONS
FOR AUTHORIZATION
TO BANK
BUYER’S SELLER’S
BANK BANK
4. BUYER’S BANK
AUTHORIZES/REJECTS
SOURCE: TRADECARD
Goods Move Faster Than Money
Bill of Lading (B/L) Transaction
PURPOSE: LINK PAYMENT TO SHIPMENT
BUYER’S SELLER’S
BANK BANK
5. BUYER’S BANK PAYS
DRAFT TO SELLER’S BANK
CARRIER IS AN ESCROW AGENT. IF B/L IS NOT PRESENTED, GOODS WILL NOT BE DELIVERED.
IF SELLER NEVER SHIPS GOODS, THERE WILL BE NO B/L AND BUYER’S BANK WILL NOT PAY
Major Ideas
◼ Money classifications
❑ Token v. notational (what form does it take?)
❑ Fiduciary v. scriptural (government or issuer-based)
❑ Prepaid, Instant-Paid, Postpaid
◼ Payment methods
◼ Cash is very expensive to use
◼ B2B payments are complex
◼ Atomicity between shipments and payments is
difficult to achieve
Q&A
Payment Risks
◼ ALL RISK HAS COST
❑ Suffering loss has cost
❑ Hedging
❑ Employee fraud
❑ Counterfeiting (ecash)
❑ Customer misuse
❑ System obsolescence
◼ Systemic
❑ Risk that failure to meet an obligation spreads
through the system, causing others to fail to
meet obligations
Payment Risks
◼ Legal
❑ Violation of law, ambiguity, legal sanctions
❑ Money laundering
❑ Inadequate disclosure
❑ Violation of privacy
❑ Foreign law
Payment Risks
◼ Banking
❑ Credit (non-payment, insolvency)
◼ Crime
❑ Fraud, forgery
❑ Theft
NHTW thuộc sở hữu hỗn hợp NHTW thuộc sở hữu chính phủ
NHTW thuộc sở hữu tư nhân
Bỉ Ngân hàng Pháp
Cục dự trữ liên bang Hoa Kỳ
Ngân hàng Nhật Bản Ngân hàng Anh
SOURCE: TRANSACTION.NET
Ngân hàng trung ương
◼ Tiền hợp pháp (tiền thật) được ban hành bởi các
ngân hàng trung ương có thẩm quyền
❑ Chính phủ sở hữu
❑ Sở hữu Tư nhân
PAYEE
AMOUNT
CURRENCY
DRAWEE
BANK
DRAWEE BANK
ACCOUNT NUMBER AUTHORIZED
NUMBER
SIGNATURE OF
MAKER’S AGENT
THIS CHECK IS AN ORDER TO MELLON BANK TO
PAY $100 TO PAYEE OR HIS TRANSFEREE FROM
THE CARNEGIE MELLON UNIVERSITY ACCOUNT
Checks
◼ U.S. -- 63 billion checks per year, average $1100
◼ 80% of noncash payments made by check
◼ “On-Us” (payor and payee in same bank -- 30%)
◼ Interbank (payor and payee in different banks) --
requires settlement
❑ Direct sends(Direct presentment)
❑ Correspondent banks
Check Check
Deposit
Ticket
Encode Sort/Balance Deposit
Ticket
BANK A’S
DEPOSITS
Clearing Check
Cash
House Letter
Check
“Clearing
Cash
House” Letter
OTHER BANKS
“Direct
Sends”
CITIBANK -107,071,775
MELLON BANK CLEARING CITIBANK
+107,071,775
HOUSE
06130018184310143700000000100000USD061200356425020010130
DRAWEE DRAWER CHECK AMOUNT CURRENCY PAYEE PAYEE DATE
BANK ACCOUNT NUMBER BANK ACCOUNT
NUMBER NUMBER NUMBER NUMBER
Settlement Systems
Sự kiện Blockchain Hub
https://tienmahoa.net.vn https://goo.gl/hbTYpF
Bù trừ điện tử -Electronic Clearing
MAKER (DRAWER) DATE CHECK
NUMBER The paper check is just
PAYEE a carrier of information.
AMOUNT
CURRENCY
Electronic transmission is
DRAWEE
BANK better.
DRAWEE BANK
DRAWER
AUTHORIZED
SIGNATURE OF
We dematerialize the check
NUMBER
ACCOUNT MAKER’S AGENT (remove the paper).
NUMBER
06130018184310143700000000010000USD06520035
DRAWEE DRAWER CHECK AMOUNT CURRENCY PAYEE PAYEE DATE
BANK ACCOUNT NUMBER 6425020010130 BANK ACCOUNT
NUMBER NUMBER NUMBER NUMBER
Chỉ thông tin được gửi đến trung tâm thanh toán bù trừ
Automated Clearing House (ACH)
Trung tâm thanh toán bù trừ tự
động
◼ Hệ thống thanh toán bù trừ điện tử
◼ Giao dịch được thực hiện theo lô (batch)
◼ Các Ngân hàng gửi giao dịch thanh toán đến ACH
◼ Các giao dịch được xử lý theo lô và chuyển kết quả bù trừ
cho các Ngân hàng
◼ Thực hiện định kỳ (ở Mỹ 1 giờ một lần, Hàn Quốc 1 lần
mỗi ngày).
◼ Hàng ngày thực hiện Kết toán (settlement) thông qua hệ
thống RTGS (Real Time Gross Settlement).
◼ Báo có trong vòng 1 đến 2 ngày làm việc.
◼ Chi phí thông thường (theo bên Mỹ) : $0.02 mỗi giao dịch;
phí thì cao hơn
Giao dịch không dùng tiên mặt của mỗi cá nhân
Switzerland 2 65 97%
Netherlands 19 128 87
Belgium 16 85 84
Denmark 24 100 81
Japan 9 31 78
Germany 36 103 74
Sweden 24 68 74
Finland 40 81 67
United Kingdom 7 58 50
France 86 71 45
Canada 76 53 41
Norway 58 40 41
Italy 23 6 20
United States 234 59 20
SOURCE: CHARLIE COOK
ACH Credit Transaction
1. BUYER SENDS
AN ORDER TO
BUYER’S BANK TO BUYER
CREDIT $X TO SELLER
SELLER’S ACCOUNT
6. SELLER’S BANK
IN SELLER’S BANK
CREDITS SELLER’S
2. BUYER’S BANK ACCOUNT WITH $X
SENDS TRANSACTION
TO AUTOMATED
BUYER’S CLEARINGHOUSE SELLER’S
BANK BANK
4. BUYER’S BANK
PAYS $Y TO
SETTLEMENT BANK
SETTLEMENT CLEARINGHOUSE
BANK
3. CLEARINGHOUSE DETERMINES THAT
5. SETTLEMENT BANK
BUYER’S BANK OWES SELLER’S BANK $Y
PAYS $Y TO
(ALL TRANSACTIONS ARE NETTED)
SELLER’S BANK
ATM and Debit Networks
SOURCE: NACHA
Electronic v. Traditional Payments (U.S., 2000)
Rất khó xác nhận người nào đã thực hiện giao dịch
❑ Rủi ro liên quan đến giao dịch và thông tin tài khoản cá nhân
❑ Rất khó bảm đảm tính toàn vẹn của thông tin được truyền
❑ Dễ tạo các tài liệu giả mạo
CASE STUDY
……..
Withdrawal $5,000,000 Withdrawal $5,000,000
Account number: NHB- Account number: NHB-
212551245 212551245
Offfice B Bank A
… .... … .... Send
Gửi
Vấn đề của thanh toán trực
tuyến
◼ Các lỗ hổng bảo mật
❑ Mất cắp thông tin cá nhân và thông tin giao
dịch thẻ
❑ Vi phạm thông tin cá nhân
❑ Hacker/Trộm cắp thông tin tài khoản trên
Internet
❑ Trôm cắp tên truy nhập và mật khẩu
➔Cần giải pháp bảo mật hiệu quả
An toàn trong Thanh toán điện tử
◼ Bảo mật thông tin (Privacy): Đảm bảo thông tin thanh toán
được giữ bí mật đối với đối tượng không được phép.
❑ CRYPTOGRAPHY – Mã hoá
◼ Toàn vẹn thông tin (Integrity): bảo đảm tính toàn vẹn
thông tin trong liên lạc hoặc giúp phát hiện rằng thông tin
đã bị sửa đổi.
❑ HASH FUNCTIONS – Hàm băm
◼ Xác thực (Authentication): xác thực các đối tác trong liên
lạc và xác thực nội dung thông tin trong liên lạc.
❑ PASSWORDS, DIGITAL CERTIFICATES – Mật khẩu, chứng thư số
◼ Chống lại sự thoái thác trách nhiệm (Non-repudiation): đảm
bảo một đối tác bất kỳ trong hệ thống thanh toán không thể
từ chối trách nhiệm về hành động mà mình đã thực hiện.
❑ DIGITAL SIGNATURES – Chữ ký số
Đối chiếu với sơ đồ OSI
OSI 7 Layer
PKI related product
Application Layer Digital Signature
Encryption/
Presentation Layer PKI toolkit Decryption
SSL Certificate
Session Layer
VPN
Phương pháp
Vấn đề Công nghệ sử dụng
bảo mật
Khó xác nhận Xác thực đối tượng Công nghệ chữ ký số
đối tượng tham gia tham gia (User authentication)
Vùng HASH
“Chuyển 5.000.000
đồng vào
• (Thông điệp đã bị băm)
•
“AF0E891B293”
Hàm Hash một chiều (One-
Way)
◼ Với bất kỳ thông điệp s, gọi hash của s là H(s), H(s)
có độ dài cố định (thường ngắn hơn s) còn được gọi
là bản tóm tắt của thông điệp (message digest)
◼ Tính một chiều: không thể suy ra dữ liệu ban đầu từ
kết quả, điều này tương tự như việc bạn không thể
chỉ dựa vào một dấu vân tay lạ mà suy ra ai là chủ
của nó được.
◼ Tính duy nhất: xác suất để có một vụ va chạm (hash
collision), tức là hai thông điệp khác nhau có cùng
một kết quả hash, là cực kỳ nhỏ.
Hàm Hash một chiều (One-
Way)
◼ Chỉ cần thay đổi một ký tự của thông điệp s thì hàm
hash mới sẽ khác nhiều với hàm cũ
❑ Từ "Illuminatus" đi qua hàm SHA-1 cho kết quả :
E783A3AE2ACDD7DBA5E1FA0269CBC58D
❑ Từ "Illuminatis" đi qua hàm SHA-1 cho kết quả :
A766F44DDEA5CACC3323CE3E7D73AE82
Ứng dụng củs hàm Hash
◼ Xác thực mật khẩu
◼ Xác thực thông điệp (Message authentication –
Thông điệp tóm tắt -message digests)
◼ Bảo vệ tính toàn vẹn của tập tin, thông điệp được
gửi qua mạng.
◼ Tạo chữ ký điện tử (Digital signatures)
Hàm hash SHA-1
“TRANSFER
$5000 TO MY
• •
•
Có thể chuyển ngược lại
SAVINGS (Chỉ khi biết
ACCOUNT” khóa bí mật))
•
•
• •
•
• •
“1822UX S4HHG7 803TG
0J71D2 MK8A36 18PN1”
Mật mã học (Cryptography)
MESSAGE SPACE CODE SPACE
(ALL POSSIBLE (ALL POSSIBLE
ENCRYPTION IS SECURE IF ENCRYPTED MESSAGES)
PLAINTEXT MESSAGES) ONLY AUTHORIZED PEOPLE
KNOW HOW TO REVERSE IT
“TRANSFER
$5000 TO MY
• •
SAVINGS
ACCOUNT” •
•
•
• •
•
• •
ENCRYPTION IS ONE-TO-ONE “1822UX S4HHG7 803TG
AND REVERSIBLE 0J71D2 MK8A36 18PN1”
EVERY CODE CORRESPONDS
TO EXACTLY ONE MESSAGE
Mật mã học (Cryptography)
◼ Cryptography giúp đảm bảo những tính chất
sau cho thông tin:
❑ Tính bí mật (confidentiality): thông tin chỉ được tiết
lộ cho những ai được phép.
❑ Tính toàn vẹn (integrity): thông tin không thể bị
thay đổi mà không bị phát hiện.
❑ Tính xác thực (authentication): người gửi (hoặc
người nhận) có thể chứng minh đúng là họ.
❑ Tính không chối bỏ (non-repudiation): người gửi
hoặc nhận sau này không thể chối bỏ việc đã gửi
hoặc nhận thông tin.
Data Encryption Standard (DES)
◼ Tiêu chuẩn mã hoá dữ liệu.
◼ DES là một phương pháp mật mã hóa được
FIPS (Tiêu chuẩn Xử lý Thông tin Liên bang Hoa
Kỳ) chọn làm chuẩn chính thức vào năm 1976.
◼ DES là thuật toán mã hóa khối, độ dài mỗi khối là
64 bit . nó xử lý từng khối thông tin của bản rõ có
độ dài xác định và biến đổi theo những quá trình
phức tạp để trở thành khối thông tin của bản mã
có độ dài không thay đổi.
Data Encryption Standard (DES)
◼ DES sử dụng khóa để cá biệt hóa quá trình
chuyển đổi. Nhờ vậy, chỉ khi biết khóa mới có thể
giải mã được văn bản mã.
◼ Khóa dùng trong DES có độ dài toàn bộ là 64 bit.
Tuy nhiên chỉ có 56 bit thực sự được sử dụng; 8
bit còn lại chỉ dùng cho việc kiểm tra.
◼ DES xuất ra bản mã 64 bit.
◼ Nhanh chóng thực hiện bằng phần cứng: 1
gigabit/second
Triple DES – 3DES
◼ Triple-DES chính là DES với hai chìa khoá
56 bit.
K1 K2 K3
Bản mã
Bản rõ
BLOCK 1
DES DES DES BLOCK 1
ENCRYPT DECRYPT ENCRYPT
Encryption Decryption
public private
Different but
Recipient’s mathematically Recipient’s
public key linked keys private key
HASH
Khoá bí mật Mã hoá bằng khoá bí mật
của MR. A
Thông điệp M
HASH =? HASH
Nếu kết quả băm giống nhau, Thông điệp được xác thực.
Tại sao?
Vì nếu bất kỳ BIT nào của M hay SIG bị thay đổi, kết quả băm sẽ khác
Giấy tờ tùy thân
◼ Giấy tờ tuỳ thân là gì? (Chứng minh nhân dân,
Passport, khai sinh, bằng lái xe)
❑ Mảnh giấy
❑ Với thông tin xác minh danh tính của người sở hữu
❑ Chữ ký
❑ Vân tay
Tin tưởng giấy tờ tuỳ thân
◼ Tại sao mọi người tin tưởng giấy tờ tuỳ thân?
◼ Phụ thuộc cơ quan ban hành
❑ Tôi có nhận ra giấy tờ này không?
Issuer
Message
Period of Validity
Digest
Subject
C=US ST=NY L=Albany O=OFT CN=John Doe
O: ORGANIZATION
RCA
RCA : Root Certificate Authority
BCA : Brand Certificate Authority
BCA GCA : Geo-political Certificate Authority
CCA : Cardholder Certificate Authority
MCA : Merchant Certificate Authority
PCA : Payment Gateway
GCA Certificate Authority
CERTIFICATE ISSUANCE
Root CA
Root CA Certificate Info Root CA's Private Key
Self Signed
Root Signature
Subordinate CA
Certificate Info Root CA's Private Key
Sub CA
Root Signature
Text
Document Alice's Private Key
Alice's Signature
Bob Alice
Sig
SOURCE: ANDREAS STEFFEN, ZHW
Public Key Infrastructure (PKI)
◼ Digital certificates alone are not enough to
establish security
❑ Need control over certificate issuance and management
◼ Certification authorities issue certificates
◼ Who verifies the identify of certification
authorities?
◼ Naming of entities
◼ Certification Practice Statement
◼ Certificate Revocation List
◼ The metafunctions of certificate issuance form
the Public Key Infrastructure
Certification Practice Statement
◼ Satement by a CA of the policies and procedures
it uses to issue certificates
◼ CA private keys are on hardware cryptomodules
◼ View Verisign Certification Practice Statement
◼ INFN (Istituto Nazionale di Fisica Nucleare) CPS
(JAVA, C)
COMPILER
Hình chim bồ
câu 3D: phải
trông như hình
3 chiều và Card Verification
dường như Value (CVV2): là 3
đang di chuyển số nằm chung trên
khi nghiêng thẻ khung chữ ký hay
tới phía trước nằm ngay bên phải
rồi ra phía sau. khung chữ ký (một
phần của số thẻ
Khung chữ ký: có thiết kế riêng biệt cũng có thể in trên
Dải từ khung chữ ký.
nhưng luôn chứa dòng chữ VISA
được in bằng mực in phản xạ tia cực
tím. Nếu ai đó cạo sửa băng chữ ký
thì sẽ lộ ra chữ “VOID”
Nhận diện thẻ Visa
Loại 1 Loại 2
Nhận diện thẻ Visa (tt)
Loại 3 Loại 4
7 thao tác cơ bản khi thực hiện cà thẻ
Declined Trả thẻ lại cho chủ thẻ và yêu cầu chủ thẻ đưa
(không chuẩn chi) thẻ Visa khác.
Call hay Call Center Gọi Trung tâm thẻ của NH thanh toán và nói
bạn nhận thông báo “Call” hay “Call Center”.
Thực hiện theo hướng dẫn của nhân viên NH.
Lưu ý: Trong hầu hết trường hợp, một thông
báo “Call” hoặc "Call Center" chỉ có nghĩa là
đơn vị phát hành thẻ cần bổ sung một số
thông tin trước khi giao dịch có thể được chấp
nhận.
Các thông báo trên màn hình EDC
Thông báo Xử lý
Pick Up Giữ lại thẻ nếu bạn có thể thực hiện điều
(giữ thẻ) này một cách ôn hòa, ổn thỏa.
2. Cà thẻ
◼ Thực hiện yêu cầu tra soát rất quan trọng, khi
yêu cầu này không được thực hiện, hoặc không
thực hiện theo đúng thời gian, hoặc bản sao
không rõ, việc bị chargeback hầu như không thể
tránh khỏi.
◼ Do đó, nếu ĐVCNT có lưu giữ hóa đơn thanh
toán, hãy nhanh chóng phản hồi và thực hiện
đúng các yêu cầu tra soát.
Hạn chế bị “yêu cầu tra soát”
◼ 3-D Secure
❑ authentication without certificates
◼ Fraud
◼ Pay with VISA
Participants
Processor Processor
Card
Association
Merchant
• Issuing Bank Consumer • Merchant Bank (Acquirer)
• Issues card • Sets up merchant
• Extends credit • Extends credit
• Assumes risk of card • Assumes risk of merchant
• Cardholder reporting • Funds merchant
Credit Cards on the Internet
◼ Problem: communicate credit card and purchasing
data securely to gain consumer trust
❑ Authentication of buyer and merchant
❑ Confidential transmissions
◼ Systems vary by
❑ type of public-key encryption
❑ type of symmetric encryption
❑ message digest algorithm
❑ number of parties having private keys
❑ number of parties having certificates
Credit Card Protocols
◼ SSL 1 or 2 parties have private keys VERY IMPORTANT.
◼ TLS (Transport Layer Security) USAGE INCREASING
Merchant
Non-Internet (telephone) line
Credit Card
Secure Acquirer
“tunnel”
through the ◼ Consumer must
Internet trust merchant
with card Acquirer
◼ Similar to notifies
Internet ordinary phone Issuer
order
◼ High transaction
costs
Credit Card
Consumer Issuer bills Consumer Issuer
Internet
Credit Card
Acquirer
Credit Card
Issuer
Consumer Issuer bills Consumer
payment GATEWAY
CERT
gateway
payment network
money transfer
issuer acquirer
(cardholder’s bank) (merchant’s bank)
SET Message Flow
Payment
Card Issuer
Gateway
9. 5. Auth. Request
Payment Capture 6. Auth.
10. Response
Payment Capture
Request Response
SET
1.
7.
3. Init
Inquiry
Request
PurchaseRequest
Request
Card Merchant
8. 2. Init Response
4. Inquiry
Purchase Response
Response
Holder
SET
SOURCE: HUTTER/STEPHAN
Dual Signature
hash sign
DUAL
SIGNATURE
data2 hash
RECIPIENT 1 RECIPIENT 2
RECEIVES: RECEIVES:
data1 data2
HASH OF HASH OF
DATA 2 DATA 1
DUAL
SIGNATURE
Using the Dual Signature
PI Hash Bank
PIMD
Merchant
messages
◼ 160-bit message digests
◼ Statistically globally unique IDs (XIDs)
◼ Certificates (5 kinds)
❑ Cardholder, Merchant, Acquirer, Issuer, Payment
Gateway
◼ Hardware cryptographic modules (for high security)
◼ Idempotency (message can be received many times but is
only processed once) f (f (x)) = f (x)
◼ Complex protocol. Over 600 pages of detail
◼ Dual signatures
SET Process Steps (Simplified)
1. Merchant sends invoice and unique transaction ID (XID)
2. Merchant sends merchant certificate and bank certificate
(encrypted
with CA’s private key)
3. Customer decrypts certificates, obtains public keys
4. Customer generates order information (OI) and payment info
(PI)
encrypted with different session keys and dual-signed
5. Merchant sends payment request to bank encrypted with bank-
merchant session key, PI, digest of OI and merchant’s certificate
6. Bank verifies that the XID matches the one in the PI
7. Bank sends authorization request to issuing bank via card
network
8. Bank sends approval to merchant
9. Merchant sends acknowledgement to customer
Secure Electronic Transactions (SET)
SET Overhead
Simple purchase transaction:
◼ Four messages between merchant and customer
◼ Two messages between merchant and payment gateway
◼ 6 digital signatures
◼ 9 RSA encryption/decryption cycles
◼ 4 DES encryption/decryption cycles
◼ 4 certificate verifications
Scaling:
◼ Multiple servers need copies of all certificates
◼ Compaq sells SET software equipped for 5,000,000
certificates
◼ NO ONE USES SET. WHY?
◼ Visa used to list all SET-enabled merchants on its website.
No more.
3-D Secure
◼ Idea: authenticate user without a certificate
◼ Requires the user to answer a challenge in real-
time
◼ Challenge comes from the issuing bank, not the
merchant
◼ Issuing bank confirms user identity to merchant
3-D (3-Domain) Model
Internet
Merchant
Cardholder
eMerchant Server
Wallet Server
Issuer Acquirer
Payment
Association
Issuer Domain Interoperability Domain Acquirer Domain
SOURCE: MASTERCARD
3-D Secure Process Flow
Cardholder 2. Determine
issuer
MPI
SSL Merchant Plug-In
3. Check user
participation Global 5. Verify user
participation
Directory
SSL
Issuer 4. Verify user
participation Payment Gateway
ACS Acquirer
Access Control Server
SOURCE: MASTERCARD
3-D Secure Process Flow
10. Payer Authentication Response
Merchant
SSL
Cardholder
Global
Directory
Issuer
Payment Gateway
SOURCE: MASTERCARD
3-D Secure (1)
1. Customer enters details at
merchant site Active Merchant Merchant
Customer 3-D Secure
Acquirer Plug-in
Merchant Plug-in
3-D Secure
Access Control Payment
Server Visanet Gateway
Issuer Acquirer
SOURCE: KMIS
3-D Secure (2)
6. Merchant Plug-in redirects
customer’s browser to issuer’s Access
Control Server with transaction details Active Merchant Merchant
Customer 3-D Secure
Acquirer Plug-in
Merchant Plug-in
3-D Secure
Access Control Payment
Server Visanet Gateway
Issuer Acquirer
SOURCE: KMIS
3-D Secure (3)
8. Customer presents
password into issuer system Visa
Directory
9. Issuer’s Access Control
Server validates password,
signs response and redirects
customer to Merchant Plug-in
3-D Secure
Access Control Payment
Server Visanet Gateway
Issuer Acquirer
SOURCE: KMIS
3-D Secure (4)
14. Merchant confirms transaction
and issues receipt to customer Active Merchant Merchant
Customer 3-D Secure
Acquirer Plug-in
Merchant Plug-in
13. Acquirer
sends transaction
response back to
merchant
10. Merchant
Visa submits normal
Directory transaction to
acquirer
HANDLES COMMUNICATION
WITH THE APPLICATION
Protocols
INITIALIZES COMMUNCATION
BETWEEN CLIENT & SERVER
HANDLES DATA
COMPRESSION
SSL Handshake Messages
CLIENT SIDE SERVER SIDE
OFFER CIPHER SUITE SELECT A CIPHER SUITE
MENU TO SERVER
SEND CERTIFICATE AND
CHAIN TO CA ROOT
ACTIVATE
ENCRYPTION
CLIENT PORTION ( SERVER CHECKS OPTIONS )
DONE ACTIVATESERVER
ENCRYPTION
( CLIENT CHECKS OPTIONS ) SERVER PORTION
DONE
NOW THE PARTIES CAN USE SYMMETRIC ENCRYPTION
SOURCE: VISA
3-D Secure Transaction Flow
Merchant Plug-in queries
Cardholder visits merchant site
and selects “Buy”
2
1 Directory for account
participation
MERCHANT
Cardholder
Merchant
Plug-in
Directory
Issuer 3
Directory
response
5
Access
Control indicates Merchant verifies the signature
4 Server CH is/not and sends an Authorization
enrolled Request with selected
Authentication
Issuer prompts for password (and chip card History authentication data (ECI and
insertion), validates password (and Server CAVV) to the Acquirer
cryptogram), calculates CAVV, digitally
signs response to Merchant, sends copy to
Authentication History Server
ISSUER
Visa Acquirer
Net Payment
Processor
8
Acquirer formats
Issuer verifies CAVV (or 7 6 message with ECI
interrogates VisaNet and CAVV
codes), authorizes the VisaNet verifies CAVV, forwards to Issuer
transaction, sends
response to the Acquirer
SPA (1)
3. SPA Applet requests
authentication information
from the user 1. SPA Applet detects SPA-enabled
merchant page
Customer Merchant
SPA Applet Acquirer Plug-in
2. SPA Applet reads information from
merchant’s websites
SPA Payment
Server Banknet Gateway
Issuer Acquirer
SOURCE: KMIS
SPA (2)
7. Merchant sends
authorization request
and authentication
token to acquirer
SOURCE: http://www.software.ibm.com/commerce/payment/specsheetetill.html
MasterCard Banknet
◼ Closed TCP/IP network
◼ Payment authorization in 130 milliseconds avg.
◼ Capacity: 2.5M transactions/hour, 700/second
◼ Busiest day: 36M authorizations, 40M debits
◼ 210 countries (more than SWIFT!)
◼ 25,000 issuing banks
◼ 650 service delivery points
❑ 13 global hubs
❑ 32 country hubs
SOURCE: MASTERCARD
Chương 7: Stored-Value Cards
ThS Phạm Mạnh Cường
Outline
E-Government
Banking Mass Transit Public
Telephony
Mobile Retail
Telecommunications W-LAN
Digital Rights
Enterprise Management
Security
Access control SOURCE: JEAN-JACQUES VANDEWALLE
ePayment by Smart Card
◼ Objective: replace cash
◼ Cash is expensive to make and use
❑ Printing, replacement
❑ Anti-counterfeiting measures
❑ Transportation
❑ Security
◼ Cash is inconvenient
❑ not machine-readable
❑ humans carry limited amount
❑ risk of loss, theft
◼ Additional smart card benefits
Smart Cards
◼ Magnetic stripe
❑ 3 tracks, ~140 bytes, cost $0.20-0.75
◼ Memory cards
❑ 1-4 KB memory, no processor, cost $1.00-2.50
◼ Optical memory cards
❑ 4 megabytes read-only (CD-like), $7-12
◼ Microprocessor cards
❑ Imbedded microprocessor
◼ (OLD) 8-bit processor,
16 KB ROM, 512 bytes RAM
◼ Equivalent power to IBM XT PC
◼ 32-bit processors now available
Magnetic Stripe Cards
◼ Three tracks: 1 & 3 at 210 bits/inch; 2 at 75 bpi
◼ Start sentinel (1 char): %
◼ Format code (1 char): B for bank/financial
◼ Primary Account Number (PAN) (19 char)
❑ Major industry identifier (1 or 2 char): 4, 5 for credit cards
SIM card
Crypto card
USB token
Microprocessor
Contacts
Contacts
Card
(Upside-down) Epoxy
Contacts (8)
SOURCE: SMART CARD FORUM
Old (8-bit) Smart Card
Architecture
EEPROM:
Electrically
Erasable
Programmable
Read-Only
Memory
◼ Typically 2 - 32 KB
1 2 3
n
n+1st record
ACCOUNT 4-DIGIT
NUMBER PIN
SECRET ENCRYPTED
BANK KEYS
3DES DATA BLOCK
SELECT 4-6 DIGITS
FROM ENCRYPTED DATA
BLOCK TO FORM P V V
PIN VERIFICATION
VALUE (P V V)
CARD HAS
ACCOUNT NUMBER
AND P V V
Using the Card
CARD HAS
ACCOUNT NUMBER
AND PVV
P V Vs MATCH?
ATM MACHINE READS ACCOUNT USER IS AUTHENTIC
NUMBER AND P V V
P V Vs DIFFERENT?
USER TYPES PIN
USER IS REJECTED
MACHINE NOW HAS:
ACCOUNT 4-DIGIT
PVV COMPARE CARD P V V
NUMBER PIN
WITH COMPUTED P V V
MACHINE HAS BANK
KEYS IN HARDWARE:
SECRET ENCRYPTED
BANK KEYS
3DES DATA BLOCK
PVV
COMPUTE P V V
OpenCard Framework (OCF)
CardService
Layer
(TALKS TO CARD)
CardTerminal
Layer
(TALKS TO READER)
SOURCE: OPENCARD.ORG
SOURCE: OPENCARD.ORG
Card Security Threats
Group 5
ATTACKS ON THE RUN-TIME
ENVIRONMENT THROUGH THE
Group 6
CARD ACCEPTANCE DEVICE (CAD)
THREATS FROM CARD APPS AND
NEED TO SHARE RESOURCES
Clone
Future
Past Group 7
Group 3 Current
ATTACKS USING CARDS THREATS BASED ON RTE
NOT YET ISSUED, OLD
CARDS, CLONES
CAD IMPLEMENTATION
Group 4
Group 1 ATTACKS ON CARD’S
INTERFACE TO THE OUTSIDE, Group 2
DIRECT ATTACKS ON E.G. PREMATURE REMOVAL INDIRECT ATTACKS
CHIP CIRCUITRY
ON CHIP CIRCUITRY
SOURCE: GAMMA
Power and Timing Analysis
power
consumption
time
Source: Rankl and Effing, "Handbuch der Chipkarten", 2002
Differential Power Analysis
◼ Send different inputs to the Smart Card to learn details of its
encryption key
◼ When a correct key value is tried, the algorithm responds
◼ Incorrect keys have zero average response
EXPANDED VIEW
OF ROUNDS 2 & 3
SOURCE: cryptography.com
Reverse
engineering
Probing with Needles
Contactless Card
◼ Communicates by radio
❑ Power supplied by reader
❑ Data rate 106 Kb/sec
❑ Read 2.5 ms, write 9 ms
❑ 8 Kb EEPROM, unlimited read, 100,000 writes
❑ Effective range: 10 cm, signals encrypted
❑ Lifetime: 2 years (data retention 10 years)
❑ Two-way authentication, nonces, secret keys
❑ Anticollision mechanism for multiple cards
❑ Unique card serial number SOURCE: GEMPLUS
RFID Tags
IC Chip
Antenna
How RFID Works
◼ Tag enters RF field Antenna
◼ RF signal powers tag
◼ Tag transmits ID, plus data
◼ Reader captures data
◼ Reader sends data to
computer
◼ Computer determines action
◼ Computer instructs reader
◼ Reader transmits data to tag Tag
Computer
RFID
Reader
SOURCE: PHILIPS
Euro Banknotes
◼ European Central Bank has announced plans to
implant RFID tags in banknotes by 2005
• Uses
– Anti-counterfeiting
– Tracking money flows
PAYMENT ON A KEYCHAIN
◼ Octopus
❑ 12 million cards, 15,000 readers
❑ 7 million transactions/day
❑ $48M HKD per day
◼ Visacash
◼ ComPass Visa (VME)
◼ Mondex
◼ GSM SIM, ePark
Octopus Card Features
◼ Hong Kong RFID payment card
◼ Operating distance: 15 cm
◼ Bandwidth: 211 Kb/sec
◼ Triple DES in 70 sec
◼ EEPROM 1536 bytes
◼ 128-byte data backup area
◼ 16-byte manufacturer ID; 16-byte issue ID
◼ Processing time: 50 msec on card, 300 msec
overall
◼ Random access and cyclic files SOURCE: MITSUBISHI
◼ Anti-collision protocol
Octopus Card Security
SOURCE: MITSUBISHI
Octopus
SONY RC-S833
CONTACTLESS SMART CARD
SONY READER/WRITER
SOURCE: SONY
Octopus Expansion
• Identity card
• Access control
• Hotel room key
• Credit card
• McDonalds
• Mobile phone
• Home readers
CENTRAL CLEARING
HOUSE SYSTEM
SERVICE
PROVIDER
CENTRAL
COMPUTER
LOCAL
DATA
PROCESSOR
SOURCE:
• DISTRIBUTE SOFTWARE
CENTRAL
• COLLECT TRANSACTIONS
STATION CLEARING
• PRINT REPORTS
COMPUTER HOUSE
• SEND DATA TO SPCC
CCHS SYSTEM
• VALIDATE DATA
• NET ACCOUNTING
SETTLE MENT
• MUTUAL HSBC HEXAGON OCTOPUS
AUTHENTICATION BANK
• CHECK BLACKLIST
• UPDATE CARD LOAD REGULAR ACCT
MTR’S
• STORE TRANSACTIONS AGENT’S BUFFER ACCT
BANK
FARE PROCESSORS BANK RESERVE ACCT
Major Ideas
◼ Smart cards replace cash
◼ Potential of cards is unexplored; new uses every
day
◼ Powerful microprocessors allow
❑ cryptography
❑ certificates, authentication
❑ secure purses
◼ Wireless (contactless) cards enable new business
models
◼ Smart card security is not perfect
Chương 8.1: Peer-to-Peer Payments
ThS Phạm Mạnh Cường
Outline
◼ Peer-to-peer payments
❑ PayPal
❑ eCount.com
◼ Electronic banking
◼ B2B payments
1. Peer-to-Peer (P2P) Concepts
◼ P2P
❑ payments not involving a bank
❑ payments “directly” between payor and payee
❑ classic example: cash
❑ email payments, transfers between digital wallets
❑ purchasing online content
❑ micropayments
◼ Distinguish between P2P payments and P2P
technology
❑ Napster, bitTorrent, Gnutella
◼ Someday we may use P2P technology for P2P
payments
PayPal
◼ > 188,000,000 accounts (2016)
◼ RTGS payment system (Real-time gross
settlement )
◼ Credit card hub
◼ Bookkeeping & accounting system
◼ Low-value foreign exchange system
PayPal Structure
PUBLIC COMPANY
eBay
- $100
+ $100
PayPal
1. A PAYS X VIA 6. PAYPAL NOTIFIES
PAYPAL (A HAS X OF PAYMENT. X
ENOUGH IN PAYPAL CHOOSES PAYMENT
ACCOUNT) METHOD
ACCOUNT INTERNET
PAYPAL EMAIL
ACCOUNT
HOLDER A HOLDER X
ACCOUNT A
... 5. PAYPAL CREDITS
ACCOUNT X’S PAYPAL ACCOUNT
ACCOUNT X
HOLDER A’S 2. OR: PAYPAL
CHARGES X’S
CREDIT CARD CREDIT CARD
3. OR: PAYPAL
INITIATES ACH
DEBIT
ACCOUNT 7. OR: PAYPAL ACCOUNT
ACH
HOLDER A’S INITIATES
HOLDER X’S
PROCESSOR ACH CREDIT
BANK BANK
SOURCE: PAYPAL
PayPal and Foreign Exchange
eBay
$ £
U.S. U.K.
PayPal U.S. PayPal U.K.
PayPal Bank PayPal Bank
U.K. PayPal $ Acct U.S. PayPal £ Acct
U.S.
U.S. User U.K. User U.K.
User’s Bank User’s Bank
PayPal Worldwide
SOURCE: PAYPAL
PayPal Statistics
Products Credit cards, payment systems
[1]
Revenue US$10.84 billion (2016)
[1]
Operating income US$1.586 billion (2016)
[1]
Net income US$1.401 billion (2016)
[1]
Total assets US$33.1 billion (2016)
[1]
Total equity US$14.71 billion (2016)
[1]
Employees 18,100 (2016)
Total PayPal Payment Volume
$3,000
$2,000
$1,500
$1,000
$500
$0
Q100 Q200 Q300 Q400 Q101 Q201 Q301 Q401 Q102 Q202 Q302 Q402 Q103
SOURCE: PAYPAL
PayPal Growth by Number of
Users 30,000
APRIL, 2004 > 41 MILLION
25,000
20,000
Users (000)
15,000
10,000
5,000
0
Q100 Q200 Q300 Q400 Q101 Q201 Q301 Q401 Q102 Q202 Q302 Q402 Q103
SOURCE: PAYPAL
PayPal Concepts (con.t)
◼ Merchants pay low fees; individuals pay nothing
◼ Interest paid on deposits
◼ Mass (bulk) payments
◼ Business model: fees + float
◼ Mobile payments possible
◼ What would happen if PayPal could be used for
everything?
Email Payments Market
SOURCE: CELENT.COM
Ecount.com
◼ Consumer ◼ Business
❑ Payments, eCheques ❑ Payments
❑ Savings ❑ Cash management
❑ Loan services ❑ Credit
❑ Aggregation of ❑ Financial instruments
accounts ❑ Factoring
❑ Securities ❑ Trade financing
❑ Insurance
◼ Both ❑ Foreign exchange
❑ Accounting
❑ Bill presentment
❑ Integration with
❑ Reporting
business systems
◼ Terrorism, laundering
❑ 24/7 generates
business
Australia Integrated eBanking Framework
Government Outputs: Budget Sector
Departmental Accounting
Revenue Expenditure
• Human Services • Commonwlth • Salaries
• Justice • Educat, NRE • Suppliers
• Taxes • Parliam, AG • Service Providers
Receipts • Tolls Cash • Transfer Payments
E-Business Management E-Commerce Payments
Value Bank Value
Transfer Bank Service and Transaction
Mgmt Transfer
• EFT • internet Single Acct for Govt
• cards • electronic OR • EFT • internet
• Single Acct for Dept • •
• cheq Maxi cards electronic
• cash • teleph Outer Budget • cheq • teleph
• mail TCV Balances • cash • mail
• counter
Information
Flows
Fund Flows Financial
Markets SOURCE: VICTORIA DEPT OF
TREASURY AND FINANCE (AU)
Internet Banking Services 2001
% of Banks Surveyed
Debit Credit
confirmation 8’ 9’ confirmation
Buyer’s Seller’s
bank 6 bank
Confirm conditions*
TrustAct Server
Confirm conditions*
6
Buyer Seller
*Optional flow
Major Ideas
◼ P2P is cheap
◼ P2P can be ubiquitous (email)
◼ P2P is real-time
◼ eBanking is unexplored territory
❑ Start: replicate paper statements
◼ B2B payments as part of a larger trade process
Thanh toán Điện tử
Trong Thương mại Điện tử
Chương 8: MICROPAYMENTS I
Micropayments
◼ Replacement of cash
❑ Cheaper (cash very expensive to handle)
◼ Small transactions
❑ Beverages
❑ Phone calls
❑ Internet content
2. AUTHORIZATION 5. AUTHORIZATION
REQUEST
7. SAM EXCHANGE
SAM SAM
LOADING MANAGER ISSUING BANK
9. OFFLINE
FILE TRANSFER
3. AUTHORIZATION SAM = SECURITY
4. AUTHORIZATION REQUEST APPLICATION
6. UPDATE
ACCOUNTS MODULE
AUTHORIZATION ACCOUNT
SERVER DATABASE
SOURCE: SHERIF
GeldKarte Payment
◼ Customer inserts GeldKarte in slot (at merchant
terminal or PCMCIA card)
◼ Merchant authenticates customer card OFFLINE
(NO THIRD PARTY)
◼ Customer authenticates merchant card
◼ Transfer purchase amount
◼ Generate electronic receipts
“Caroline” Trusted
Wallet Device
GeldKarte Reader
USB or Infrared
Connection to PC
◼ Assumptions
❑ Quan hệ User-Broker là quan hệ lâu dài
❑ Quan hệ Vendor-Broker là quan hệ lâu dài
❑ Quan hệ User-Vendor là quan hệ ngắn hạn
Micropayment Efficiency
◼ Providers need to process a peak load of at least
2500 transactions/second
◼ Public-key cryptography is expensive
❑ 1 RSA signature verifications = 1000 symmetric encryptions
= 10,000 hashes
◼ Need to minimize Internet traffic
❑ Servers must be up
❑ More servers required, longer queues, lost packet delay
❑ Remove the provider from the process (user + vendor only)
◼ For small payment amounts, perfection (sự hoàn
hảo) is not needed
❑ Losing a micropayment –
❑ Keep micropayment fraud low
Payword Concept
◼ Hash functions are one-way and easy to compute
◼ Use them to secure scrip
◼ Suppose we need N “coins”
◼ Start with a random number WN
◼ Hash it N times to form W0
WN WN-1 WN-2 • • • W1 W0
WN-1 = H(WN ) WN-2 = H(WN-1 ) W1 = H(W2 ) W0 = H(W1 )
⚫ No Central ownership,
authority, or control
⚫ Open Source, peer-
reviewed
⚫ Secure! And we know
this.
⚫ Push, not “pull” based
Who created bitcoin?
What is the most expensive
pizza in the world?
Bitcoin Basics
⚫ There will only ever be 21 million coins
⚫ Divisible! One bitcoin can be divided into
100,000,000 Satoshis
⚫ Network maintenance is performed by
miners, who are rewarded in Bitcoin
⚫ Defines a 'blockchain' the world's
distributed asset/ownership ledger
Bitcoin last year!
Bitcoin right now!
The Blockchain is Revolutionary
⚫ A protocol (system) for allocating scarce
resources
⚫ Has no center, everyone participates
⚫ Asserts 'truth' when everyone has an
incentive to lie
⚫ Manages Scarcity (Domain names, SSL
Certificates, Bandwidth Credits, Property
Deeds, Identity)
Why do we need Bitcoin?
⚫ Cash doesn't work online.
⚫ Credit cards are inconvenient
⚫ Transaction fees are too high
⚫ Micropayments
⚫ Current systems require too much trust!
⚫ Not all good customers are creditworthy.
⚫ Underserved Banking clients
⚫ Globalization
Traditonal Checkouts vs Bitcoin
1
2
3 4
5
6
7
8
9
10 11
12
13
Common Misconceptions
Where is this going?
⚫ Incumbents will compete, and fail.
⚫ Fast adoption in Remittance markets
⚫ Innovation without permission
⚫ Some countries will be forced to embrace a
mainstream Bitcoin economy
⚫ What Internet was to newspapers, Bitcoin
is to banks
⚫ Migrations away from Centralized
Databases
How to get started
⚫ Create a Coinbase account and buy some
bitcoins
⚫ Create a Blockchain.info wallet and
install the app on your phone
⚫ Accept Bitcoin from peers and clients.
⚫ Pro-actively offer to pay vendors in
Bitcoin in person and online!
Bitcoin is real, and here to stay!
Other popular digital cash