• 沒有找到結果。

E-Commerce & Web Technology: Security and Encryption

N/A
N/A
Protected

Academic year: 2021

Share "E-Commerce & Web Technology: Security and Encryption"

Copied!
9
0
0

加載中.... (立即查看全文)

全文

(1)

Copyright (C) 2003 Jane Hsu 1

Security and Encryption

Jane Hsu

Copyright (C) 2003 Jane Hsu 2

The Internet Is An Insecure Place

n Many protocols do not provide any security. n Viruses, worms, Trojan horses etc. n Client/server applications often require

transmission of user identity/passwords. n “Crackers” may sniff passwords and other

sensitive information off the network. n Need to restrict control access privileges n “Crackers” also actively exploit many system

vulnerability or “security holes ” to inflict damages or to gain access to valuable information.

n No system is totally immune to security problems.

Copyright (C) 2003 Jane Hsu 3 Copyright (C) 2003 Jane Hsu 4

Solution?

n

There is nothing more secure then a

computer which is not connected to the

network --- and powered off!

n

But…

n

These restrictions are simply unrealistic

and unacceptable.

Copyright (C) 2003 Jane Hsu 5

Firewalls

Problems

n

Firewalls assume that “the bad guys” are

on the outside – a bad assumption!

n

Firewalls restrict how your users can use

the Internet.

Copyright (C) 2003 Jane Hsu 6

Web Security

n Content security

¨ Digital rights management (DRM) ¨ Encryption

¨ Digital watermark

n Network security

¨ Encryption

nSymmetric encryption: DES nAsymmetric encryption: RSA ¨ IP security

n Digital signature/envelope

(2)

Copyright (C) 2003 Jane Hsu 7

Security Threats

n

系統入侵

n

資料竊取

n

資料竄改

n

身份冒用

n

惡意破壞

Copyright (C) 2003 Jane Hsu 8

電子商務安全性的條件

n 存取控制(Access Control ) ¨必須能防止非法使用者或訊息任意進入,同時亦能授權 合法登入者,具有特定的使用權限 n 資料保密性(Confidentiality) ¨必須能防止非法的接收者竊取傳送並發現明文 n 資料完整性(Integrity) ¨接收方可確認所收到的資訊無被篡改或部分取代之虞 n 資料來源驗證性(Authentication) ¨可驗證接收到的資訊確實由合法的發送方所傳送,而非 別人偽造或利用以前的訊息來傳送 n 不可否認性(Non- Repudiation) ¨發送方於傳送完資訊後,不可否認其傳送過資訊之事實

Copyright (C) 2003 Jane Hsu 9

網路安全性管理工具

資料加密 數位簽章 電子認證 存取控制 入侵偵測 防火牆 虛擬私人網路 安全的 通訊管道 安全性 管理工具

Copyright (C) 2003 Jane Hsu 10

何謂密碼系統?

n

密碼就是發送訊息的一方,秘密地將信息

的原文更改成無法輕易辨識的密文,再將

密文不做任何特殊保護地傳送。 如此一旦

密文一旦落入攻擊者手中時,信息的原文

仍然受到保護。當密文傳送到收件者手

中,合法的收件者卻能巧 妙地恢復原文。

German Enigma Cipher Machine

n In 1918, Arthur Scherbius filed for a patent for Enigma

Cipher Machine and offered it to the German Navy.

n In 1926, German navy begins using Enigma Machine, lightly modified from a commercial model.

n In 1930, German armed forces introduced a significantly modified military model.

n In1932, Marian Rejewski , a 27- year-old Cryptanalyst (Cipher Bureau of the Polish Intelligence Service in Warsaw, Poland) mathematically determined the

Simple Cryptography

ροµανσ

αρε

Plaintext Ciphertext

(3)

Copyright (C) 2003 Jane Hsu 13

Caesar Cipher

ABCDEFGHIJKLMNOPQRSTUVWXYZ

NOPQRSTUVWXYZABCDEFGHIJKLM

THE GOTHS COMETH

rotate 13 positions

FUR TAFUE PAYRFU

Plaintext Key Ciphertext 13

Copyright (C) 2003 Jane Hsu 14

ABCDEFGHIJKLMNOPQRSTUVWXYZ BCDEFGHIJKLMNOPQRSTUVWXYZA CDEFGHIJKLMNOPQRSTUVWXYZAB DEFGHIJKLMNOPQRSTUVWXYZABC EFGHIJKLMNOPQRSTUVWXYZABCD FGHIJKLMNOPQRSTUVWXYZABCDE GHIJKLMNOPQRSTUVWXYZABCDEF HIJKLMNOPQRSTUVWXYZABCD...

Rotating Key Cipher

SOUND THE RETREAT

DEADFED

VSUPC XKG UEWWEX

plaintext key ciphertext

Copyright (C) 2003 Jane Hsu 15

General Principles

n

Longer keys make better ciphers

n

Random keys make better ciphers

n

Good ciphers produce “random” ciphertext

n

Best keys are used once and thrown away

Copyright (C) 2003 Jane Hsu 16

密碼系統的演進

n 早期的密碼系統其關鍵在於所使用的演算法只有 發文與收文的兩方知道,如果其他人也知道的 話,機密性將不復存在。這種將機密性建立在密 碼演算法的密碼系統,只適用於封閉性的環境, 但現今網路通訊是開放性的 ,因此必須使用共通 的密碼系統,也就是說密碼演算法必須公開 ,而 任何人都可以使用 n 為了因應這樣的需要,現代的密碼系統使用了鑰 匙 (key) 的概念

Copyright (C) 2003 Jane Hsu 17

金鑰(Key)

n 所謂「金鑰」實際上僅是一長串難以記憶的 0 與 1 的組 合,可以儲存於電腦的硬碟、磁片或 IC 卡片中 n 主要的功能是在文件透過網路傳輸的過程中,由特定的密 碼演算法利用金鑰將傳輸文件編碼加密,收件者在接獲文 件時,透過金鑰將文件解密還原 n 由於使用的演算法是公開的,因此必須確保演算法本身是 安全的、無法破解,並且需要保護鑰匙 n 雖然鑰匙是一連串 0 與 1 的組合,若使用暴力入侵,得嘗 試各種不同 0 與 1 的組合。但假設鑰匙的長度為 N 位 元,則有 2N種不同的鑰匙。因此鑰匙的長度 (位元數) 越 長,理論上安全性越佳

Copyright (C) 2003 Jane Hsu 18

(4)

Copyright (C) 2003 Jane Hsu 19

Symmetric (Private Key) Cryptography

n Examples:

¨DES (Data Encryption Standard) 56-bit key

¨IDEA (International Data Encryption Algorithm) 128-bit key

¨AES (Advanced Encryption Standard)

¨RC4, RC5, Skipjack

n Advantages: fast, ciphertext secure

n Disadvantages: must distribute key in advance, key must not be divulged

8

Copyright (C) 2003 Jane Hsu 20

DES: Data Encryption Standard

n Widely published & used - federal standard n Complex series of bit substitutions, permutations

and recombinations n Basic DES: 56-bit keys

¨Crackable in about a day using specialized hardware

n Triple DES: effective 112-bit key

¨Uncrackable by known techniques

Copyright (C) 2003 Jane Hsu 21

非對稱式加密系統流程

Copyright (C) 2003 Jane Hsu 22

Asymmetric (Public Key) Cryptography

8

8

u

Examples: RSA, Diffie-Hellman, ElGamal

u

Advantages: public key widely

distributable, does digital signatures

u

Disadvantages: slow, key distribution

RSA

nRSA 是 Rivest、Shamir 和 Adelman 的縮寫,這 三位數學家在 1977 年共同發表出特殊加密的演 算法 n這種演算法主要以兩個質數作為加密與解密的兩 個鑰匙,這兩個鑰匙分別稱為公開鑰匙和私人鑰 匙,鑰匙的長度(位元數)決定了加密編碼的複

RSA 加解密流程

n

找兩個很大的質數 p,q

n

n=pxq z=(p-1)x(q-1)

n

找一個與z互質的整數d

n

找一個整數e使得 (exd) mod z = 1

(5)

Copyright (C) 2003 Jane Hsu 25

RSA 加解密流程

Copyright (C) 2003 Jane Hsu 26

RSA 加解密範例

Copyright (C) 2003 Jane Hsu 27

Public Key Encryption: The Frills

Frills

nFast encryption/decryption nAuthentication of sender nVerification of message

integrity

nSafe distribution of public keys Technique nDigital envelopes nDigital signature nMessage digests nCertifying authorities

Copyright (C) 2003 Jane Hsu 28

Digital Envelopes

8

8

Copyright (C) 2003 Jane Hsu 29

數位簽章

n

數位簽章是以一組公開金鑰與私密金鑰對

來驗證個人身分

n

私密金鑰須由客戶妥善保管,不可洩漏他

人,而公開金鑰經過CA認證後,可作為驗

證私密金鑰的憑據

Copyright (C) 2003 Jane Hsu 30

數位簽章的安全保證

n 資料完整性(Integrity) ¨文件接收者透過數位簽章之核對可確保此文件的完整 性,避免被篡改、重送、遺失 n 資料來源辨識(Authentication) ¨文件接收者可確認此文件之發送者的身分,避免被冒名 傳送假資料 n 資料隱密性(Confidentiality) ¨文件可以金鑰加解密,以達到保密的安全保證 n 不可否認性(Non-repudiation) ¨因為只有文件發送者知道自己的私密金鑰,而且文件具 有發送者之數位簽章,使其無法否認發送此文件的事實

(6)

Copyright (C) 2003 Jane Hsu 31

產生數位簽章

Copyright (C) 2003 Jane Hsu 32

訊息摘要

n

赫序函數(Hash Function)則可將輸入的資

料濃縮成較短且為特定長度的結果

n

任意的文件資料經過一個單向赫序函數計

算後,可以產生一串固定長度的資料,因

為不太可能設計另一份文件資料而在同一

函數運算後產生相同的結果,所以該結果

可視為原始文件資料的特徵值,稱為數位

指紋 (digital fingerprint) 或訊息摘要

(message digest)。

Copyright (C) 2003 Jane Hsu 33

數位簽章像什麼?

Copyright (C) 2003 Jane Hsu 34

數位簽章運作的基本概念

(7)

Copyright (C) 2003 Jane Hsu 37

安全認證服務系統

n

交易認證中心

¨以安控標準提供網路傳輸與系統安全 ,為網路 支付安全把關 n

金鑰認證中心

¨以認證標準提供私法人憑證 、自然人憑證、交 易憑證之產製及核發,建立認證機制

Copyright (C) 2003 Jane Hsu 38

Hierarchy of Trust

Copyright (C) 2003 Jane Hsu 39

Secure, Verifiable Transmission

8

Copyright (C) 2003 Jane Hsu 40

Public Key Cryptography

on the Web

n

Secure Socket Layer (SSL)

¨Netscape Communications Corporation

n

Secure HTTP (SHTTP)

¨Commerce Net

n

SET (Secure Electronic Transaction)

Copyright (C) 2003 Jane Hsu 41

SSL

nSSL(Secure Socket Layer)網路安全協定 n由Netscape網景公司開發,用來保護網上使用瀏 覽器交易安全的規格,因為各家瀏覽器軟體都支 援它的功能,因此是目前在網路上最受到廣泛採 納的一種 nSSL傳輸的資料也是經過鑰匙加密的處理,雖然 有可能被第三者截取,卻很難讀取資料內容 ,而 且經過加密的資料可以保持完整,不會受到竄改 或破壞

Copyright (C) 2003 Jane Hsu 42

SSL and SHTTP, similarities

n

RSA public key cryptography

n

MD5 message digests

n

Variety of private key systems

¨Strong cryptography for use in U.S.

(8)

Copyright (C) 2003 Jane Hsu 43

SSL and SHTTP, differences

Physical Layer Network interface Internet Transport Application SSL HTTP TELNET NNTP FTP SHTTP

Copyright (C) 2003 Jane Hsu 44

SET

n

SET (Secure Electronic Transaction)安全

電子交易

n

一種在

網際網路進行付款交易的安全機制

n

其規格採用

RSA(1024 bits)

非對稱式運算法

則(即利用公鑰及私鑰分別加密與解密)

結合DES對稱式運算法則(加、解密為相同

之基碼)為安全方案,用以保護網路付款交

易之安全及隱密性

Copyright (C) 2003 Jane Hsu 45

SET

nSET由萬事達與威士兩個信用卡組織主導 ,結合 IBM、微軟、網景等國際資訊廠商共同推廣的網 路電子商務交易安全標準 n商家可以利用SET確認消費者身分,但不會看見 消費者信用卡的號碼,因此消費者在網上沒有被 盜刷的危險 n不過SET的系統太過複雜 ,建置的成本過高,所 以目前電子商務上的保密協定,還是以RSA、 SSL系統為主。

Copyright (C) 2003 Jane Hsu 46

Secure Servers

n

Netscape Commerce Server

n

Microsoft Internet Information Server

n

WebSite Professional

n

Quarterdeck/WebSTAR Professional

n

OpenMarket Secure Server

n

Apache SSL

n

Many others!

Secure Servers: Costs

n

Server software

¨Requires license from RSA Data Security

¨Often free for noncommercial use

¨$200-$1000 for commercial use

¨Export forbidden

Secure Servers: Set-up

n

Install & configure server software

n

Create “distinguished name” for your site

n

Fill out server certificate application at

Verisign’s Web site

(9)

Copyright (C) 2003 Jane Hsu 49

Using SSL

Copyright (C) 2003 Jane Hsu 50

SSL Failures

n Two well-publicized incidents in 1995 n 40-bit secret key used in export versions

vulnerable to brute force attack

¨Single encrypted message vulnerable to cracking in a few weeks on a network of workstations

¨Specialized hardware (probably) can crack in a matter of hours

n Implementation problem

¨Navigator 2.0 used predictable random number generator to generate secret keys

¨Messages crackable in a few minutes on conventional workstation

Copyright (C) 2003 Jane Hsu 51

Web Encryption Isn’t Panacea

n

Protect data at browser side & server side

n

Server certificates vouchsafe name of

server but not honesty of merchant!

n

Protect integrity of browser & server

software

Copyright (C) 2003 Jane Hsu 52

Alternative architectures

n

Separate Layer

¨Over TCP: SSL

¨Over IP: IPSec

n

Application-Specific

¨SHTTP

n

Parallel

¨Kerberos; Kerberos with TLS?

Copyright (C) 2003 Jane Hsu 53

Kerberos

n KERBEROS was the fierce watchdog of Hades. It was depicted as a three-headed dog with a serpent's tail, a mane of snakes, and a lion's claws.

n To provide strong authentication for client/server applicationsby using secret key cryptography.

n A client can prove its identity to a server (and vice versa) across an insecure network connection.

n Client/server can also encrypt all of their

communications to assure privacy and data integrity as they go about their business.

n Free implementation available from MIT

http://web.mit.edu/kerberos/www/

Copyright (C) 2003 Jane Hsu 54

Reference URLs

n

SSL Protocol

¨http://home.netscape.com/newsref/std/SSL.ht ml n

SHTTP Protocol

¨http://www.eit.com/projects/s -http/ n

Verisign

¨http://www.verisign.com/

n

RSA Data Security

參考文獻

相關文件

command line, he specifies an arbitrary (but specific; in this case, 9989) local port that ssh should forward through the secure tunnel to the remote Windows ma- chine’s port

command line, he specifies an arbitrary (but specific; in this case, 9989) local port that ssh should forward through the secure tunnel to the remote Windows ma- chine’s port

For those establishments not using computer, 84 intended to install computer in 2003; among which 36 establishments would connect to the Internet, 14 would set up web page or web

Too good security is trumping deployment Practical security isn’ t glamorous... USENIX Security

ˆ incrementally develop sender, receiver sides of reliable data transfer protocol (rdt). ˆ consider only unidirectional

Automobile Technology, Car Painting, Industrial Electronics, Web Design, Graphic Design, Computer Aided Control, IT PC and Network Support,. Telecommunication Apparatus,

(A) IP (Internet Protocol) (B) ICMP (Internet Control Message Protocol) (C) ARP (Address Resolution Protocol) (D)SNMP (Simple Network Management Protocol)

根據 Buur博士的定義(周瑞仁,2003):Mechatronics is a technology which combines mechanics with electronics and information technology to form both functional interaction