• 沒有找到結果。

XML Mail安全傳送

N/A
N/A
Protected

Academic year: 2021

Share "XML Mail安全傳送"

Copied!
106
0
0

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

全文

(1)XML Mail. ( ( (. ) ) ).

(2) XML Mail安全傳送. ....................................................... I. ................................................. V. ..................................................... VII. ................................................ 1. ....................................... 1. 1.1. ..................... 1. XML. 1.2. 1.3. ............................................. 2. 1.4. ............................................. 3. ............................................ 7 2.1 JAVA. ........................................ 7. 2.1.1 JAVA. ........................................ 7. 2.1.2 JAVA. ................................ 7. 2.1.3 JAVA. ........................................ 8. 2.1.4 JAVA. .............................. 9. 2.1.5 JAVA. ....................................... 11. ......................... 11. 2.1.5.1 JAVA TCP/IP. ........................... 11. 2.1.5.2 java java.net. 2.1.5.3 JAVA ServerSocket. 2.2 XML. ................. 12. ........................................ 13. 2.2.1 XML. ........................................ 13. 2.2.2 XML. ...................................... 14. 2.2.3 XML Web Service. 2.2.4 DTD. ............................ 15. ........................................ 17. 2.2.5 XML Schema. ................................. 17. .......................................... 18. 2.3. 2.3.1. ...................................... 19. 2.3.1.1. ................................ 19. 2.3.1.2. .............................. 19 I 逢甲大學 e-Paper (92學年度).

(3) XML Mail安全傳送. .............................. 20. 2.3.1.3. ................................... 20. 2.4 DES. ............................... 20. 2.4.1 Des. 2.5. .................................. 22. JAVA. ........................ 22. 2.5.1. 2.5.2. JCE ............................................ 22 2.5.2.1 JCE. ..................................... 22. 2.5.2.2 JCE. ..................................... 24. 2.5.3. ............ 25. des. java. ..................................... 26. ............................................ 26. 3.1. 3.1.1. ........................................ 26. 3.1.2. ........................................ 27. 3.1.3. .................................. 27. 3.1.4. .............................. 28. .......................................... 28. 3.2. 3.2.1. ........................................ 28. 3.2.2. ........................................ 29. 3.2.3. ............................................. 30. 3.2.4. ........................................ 32. 3.2.5. ............................................ 32. ............................................ 32. 3.3. 3.3.1. ............................................ 32. 3.3.1.1 email. ................................... 32. 3.3.1.2. .................................... 33. 3.3.1.3. .................................... 39. 3.3.2. ............................................ 39. ........................ 39. 3.3.3 Client / Server. 3.3.4. 3.4. 3.4.1.. ........................................ 41. ............................................ 41. (Evolutionary prototyping) ................ 41 II 逢甲大學 e-Paper (92學年度).

(4) XML Mail安全傳送. ........................... 42. 3.4.1.1. ........ 44. class. java. 3.4.1.2. ..................................... 45. 3.4.2. ) .......... 45. (. 3.4.2.1. 3.4.3. ............................................. 46. 3.4.3. ............................................. 47. ........................... 47. 3.4.3.1. route.conf. Domain. 3.4.3.1.1. .......... 47. readinput.java ........ 50. 3.4.3.1.3. ................................. 50. 3.4.3.2. ................................. 50. 3.4.3.2.1. ................................. 52. 3.4.3.3. 3.4.3.4 XML JDOM & SAX Pakage. .............. 54. ...................................... 55. 3.4.4. ..................................... 56. .......................................... 56. 4.1. 4.1.1 Client. (. ). (main).................. 61. 4.1.2 Server. (. ). (main).................... 62. 4.1.3 Client Server. ................ 65. 4.2. ........................................ 67. 4.3. ............................................ 68. 4.4 XML. ............................................. 70. .......................................... 76. 4.5. 4.5.1. ............................................. 77. 4.5.2. ............................................. 78. 3.. .......................................... 78. 5.. ........................................ 78. 7.. .................................................... 78. 6.. ...................................... 80 III 逢甲大學 e-Paper (92學年度).

(5) XML Mail安全傳送. 4.6. ........................................ 81. 4.7. : ................................... 83. 4.7.1 Client. ........................ 86. 4.7.2 Server. ........................ 88. ............................... 89 5.1 CLINET & SERVER: ...................................... 89. ....................... 89. 5.2. .......... 90. 5.3 XML. 5.4. .............................................. 91. 5.5. .......................................... 91. ................................... 93 6.1. ........................................ 93. 6.2. .............................................. 95. .................................................. 98. IV 逢甲大學 e-Paper (92學年度).

(6) XML Mail安全傳送. 1- 1. ................................................................6. 2- 1 XML Web Service. ......................................16. Cipher. 2- 2. ....................................................22. 3- 1. ......................................................................29. 3- 2. ..............................................................30. 3- 3. DFD. ......................................................................31. 3- 4 Server. ............................................37. 3- 5 Clinet. ............................................38. 3- 6 server. client. ..........................................40. 3- 7 client. server. 3- 8 server. (. 3- 12. java. java. (. 3- 9 client. 3- 11mail ip. ..............................41. ) ..........42. ) ........43. ......................................................................48. ........................................................................48. 4- 1 client. ..........................................56. 4- 5 server. ..........................................60. 4- 6 Client. Main Fcunction. 4- 7 Server Client. .............62. ................................63. 4- 8 Server. ........................................64. 4- 9. ......................65. 4- 10. ............................................................67. 4- 11. ....................................................69. 4- 12 xml. 4- 13. ............................................................70. email. ........................................................72. 4- 14. ........................................................73. 4- 15. ....................................................................77. 4- 16. ....................................................................79. 4- 17. ....................................80. 4- 18 ZIP. ................................................................81. 4- 19 ZIP. ................................................................82. 4- 20 Client. Server. ............................................84. V 逢甲大學 e-Paper (92學年度).

(7) XML Mail安全傳送. 4- 21. ............................................................85. Server. 4- 22 Client. ....................................87. 1- 1. ........................................................................4. 1- 2. ........................................................................5. 2- 1 Sun. SunJCE. 2- 2 JCE. ................................23. ..........................................................23. 3- 1. ..............................................................26. 3- 2. ......................................................................28. 3- 3 email. ..................................................................33. 3- 4. ..............................34. 3- 5. ..............................................34. 3- 6 java- class. 3- 7. 4- 1 conf. (client. ) ...................................44. ..................................................................45. ....................................................................68. 4- 2. ......................................71. VI 逢甲大學 e-Paper (92學年度).

(8) XML Mail安全傳送. email. xml. IT. VII 逢甲大學 e-Paper (92學年度).

(9) XML Mail安全傳送. 1.1 ,. ,. ,. ,. ,. ,. ,. ,. ,. XML. TAG. ,. ,. ,. XML. ,. ,. ,. XML. 1.2. ,. ,. ,. IP. ,. ,. XML. ,. DES. XML. ,. XML. Tag. ,. ;. ,. ,. JAVA Socket. ,. server. IP,. ,. ,. IP. ;. ,. ,. ,. ,. XML. ,. ,. client. ;. ,. client. server. client. ,. ,. XML 1 逢甲大學 e-Paper (92學年度).

(10) XML Mail安全傳送. 1.3 Java 2 SDK Standard Edition(J2SE 1.4). Java Cryptography Extension(JCE 1.2). Java API for XML Processing(JAXP 1.1). Cryptix. IAIK. ,. Java. ,. ,. ,. ,. ,. ,. ,. ,. ,. XML. XML. ,. XML. ,. ,. ,. :. Java. Java. Java. Server. DES. Cryptix IAIK,. DOM. JCE. XML. Java. ,. XSLT SAX. XML. JAXP API. XML. ,. Client. Socket. :. ,. ,. ,. Java. JCE JAXP. API. ,. 2 逢甲大學 e-Paper (92學年度).

(11) XML Mail安全傳送. 1.4. DES. XML. (SAX). (DOM). Server. 3 逢甲大學 e-Paper (92學年度).

(12) XML Mail安全傳送. Client. XML. Client. Server. Client. Server. XML &. JCE &. JCE. XML. 1- 1. 4 逢甲大學 e-Paper (92學年度).

(13) XML Mail安全傳送. 2. ~3. T1. 3. ~4. T2. 4. ~5. T3. 5. ~6. T4. Server. 6. ~7. T5. Client. 7. ~8. T6. 8. ~9. T7. 9. ~ 10. T8. 10. ~ 11. T9. 11. ~ 12. T10. 1- 2. 5 逢甲大學 e-Paper (92學年度).

(14) XML Mail安全傳送. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. T1. T2. T3. T4. T5. T6. T7. T8. T9. T10. 1- 1 6 逢甲大學 e-Paper (92學年度).

(15) XML Mail安全傳送. 2.1 JAVA 2.1.1 JAVA Sun. Java. Java. (Object- Oriented). Java. ByteCode. Java. Java. ByteCode. Java. Java. ,. 2.1.2 JAVA FreeBSD. :. compile Java. kaffe + JDK.. 1.. Java. Kaffe. JDK. compi l e. kaffe. Java. VM. source code. package. cl ass. zi p. byt e code.. .. ,. compile. :. ,. 1. pkg_add jdk- 1.0.2.tgz 2. pkg_add kaffe- 0.8.2.tgz 3.. csh/tcsh,. .cshrc/.tcshrc. setenv CLASSPATH /usr/local/share/java/classes.zip:\ 7 逢甲大學 e-Paper (92學年度).

(16) XML Mail安全傳送. /usr/local/share/kaffe/biss.zip:. setenv KAFFEHOME /usr/local/share/kaffe setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:/usr/local/lib set path=($path /usr/local/bin). JDK. !. ,. Kaf f e. source. kaffe. .. code. 2.. sh/ksh/bash. .. javadoc, kaffe, kaffeh. JDK. j avac,. . csr hc/ . t cshr c. sour ce. .. guavac. ,. java byte code. ,. , guavac. compi l e. .. binary. package. sour ce,. guavac. guavac,. 2.1.3 JAVA 1.. (Simple). 215k. 40k. (Object- Oriented). 2.. (. (. ). ). (Plug and Play). (Distributed) Java. 3.. HTTP. FTP. Java. TCP/IP. URLs. (Applications). (Local File System). 4.. (Robust). Java 8 逢甲大學 e-Paper (92學年度).

(17) XML Mail安全傳送. Java. Java. C/C++. (Overwriting Memory). (Pointer Model). (Corrupting Data). (Secure) Java. 5.. Java. (Interlocking). (Architecture Neutral). 6.. CPU. Java. .. 2.1.4 JAVA 1.. :. string. StringBuffer. acronym. url. docment. HTMLParser. FileNameMap. Collection. 2.. :. insert ( ). insertObject ( ). insertObjectAt ( ). 9 逢甲大學 e-Paper (92學年度).

(18) XML Mail安全傳送. :. 3.. s t a t i cf i n a l. MAX_VALUE. 4.. :. documentati on. widget. WidgetProcessor. widget. w. 5.. :. Java. i dent if i er. $. Java. 10 逢甲大學 e-Paper (92學年度).

(19) XML Mail安全傳送. 2.1.5 JAVA 2.1.5.1 JAVA TCP/IP IP. Java. IP. IP. IP. 32- b i t. 192.168.100.3. IP. 255. 0. IP. 192.16. www.orei. 8.100.3. Domain Name Syst em. lly.com.tw. DNS. Java. DNS. IP. inetaddress. 2.1.5.2 java java.net. 1.. URL. URL. :. I/O,. java.net. Java. ;. WWW(World Wide Web). URL. ,. (Universial Resource Locator), 11 逢甲大學 e-Paper (92學年度).

(20) XML Mail安全傳送. Socket. 2.. HTTP(HyperText Transfer Protocol). Web. ,. URL. :. Java. ,. Socket. Internet. Java. '(Client/Server). '. ,. 2.1.5.3 JAVA ServerSocket client. server. :. ServerSocket. socket. .. import java.net.ServerSocket;. :. server. Ser ver Socket. I P addr ess 127. 0. 0. 1. port. listen_socket = new ServerSocket(20353);. 163. 18.62.211. telent.exe. 20353. ) t el net 163. 18. 62. 211. (client. number 20353. srever socket. (163.18.62.211 , 20353). 20353. TESTserver. ServerSocket. por t number. listen_socket. server. while(true) {. Socket client = listen_socket.accept();. accept(). // ServerSocket. //. ,. client. // client.. client. Socket. ,. ,accept(). ,. waiting.. //. PrintStream stoc = new PrintStream(client.getOutputStream()); //. stoc.println("This message comes from dog server"); client.close(); 12 逢甲大學 e-Paper (92學年度).

(21) XML Mail安全傳送. }. //. client.getOutputStream(). Socket. client. Output. ,getOutputStream(). stream PrintStream stoc = new PrintStream(client.getOutputStream());. PrintStream stoc. I/O,. I/Ostream. stoc.println("This message comes from dog server");. I/O PrintStream. stoc. ,. OutputStream. "This message comes from dog server". OutputStream. ". ,. client. ". client. .. 2.2 XML 2.2.1 XML ( I nt er nat i onal St andar ds. XML. (Standard. Organization, ISO). Generalized Markup Language, SGML). XML. W3C. XML. /. Recommendation 1.0. SGML. SGML. XML. XML. XML. 13 逢甲大學 e-Paper (92學年度).

(22) XML Mail安全傳送. 2.2.2 XML 1.XML. XML. <name>. <ci t y_name>. HTML. HTML. 2.XML. (DTD). XML. XML. 3.XML. Internet. XML. 4.XML. EDI. PostScript. HTML. 5.XML. XML. XML. XML. 6.. XML. "Ralph Higglebrewer" 14 逢甲大學 e-Paper (92學年度).

(23) XML Mail安全傳送. XML. 7.XML. Web. Web. 8.XML. 9.XML. XSL. XML. Web. XML. Unicode. Unicode. XML. (UTF- 8). (UTF- 16). Script. XML. HTML. 10.XML. <A>. <A>. (URL). 2.2.3 XML Web Service XML. Web. X ML. SOAP. XML. UDDI. XML Web. XML Web Service. XML Web. 2.1. XML Web. Internet 15 逢甲大學 e-Paper (92學年度).

(24) XML Mail安全傳送. XML W eb. (. XML Web. W3C). XML. XML Web. Web Service. Web. 2.. Internet. SOAP. XML. :1.. - XML HTTP. TCP/IP. Web. Web. Web. Service. Service. xml. xml xml. Web. Web xml. Service. Service. xml. Client. Client. 2- 1XML Web Service 16 逢甲大學 e-Paper (92學年度).

(25) XML Mail安全傳送. 2.2.4 DTD DTD(Document Type Definition). DTD. XML. DTD. XML. XML. DTD. DTD. DTD. XML. DTD. XML. XML. XML. :. 4. DTD. (1) DTD. XML. (2) DTD. DTD. (3) DTD. XML. XML. (4) DTD. DTD. XML. (1). XML. (2). XML. (3). 2.2.5 XML Schema XML Namespace (. W3C. XML Schema. XML N amespace. XML. (1). XML. (2). (3). DTD 17 逢甲大學 e-Paper (92學年度).

(26) XML Mail安全傳送. XML. (4). XML Schema. XML Namespace. W3C. XML Namespace. XML. URI. DTD. URI. XML. XML Schema. DTD. DCD Document Content Description. superset. XML Schema. RDF Resource Descriptor Frame work. Structure. Data Types. XML. Structures. Datatype. XML Schema. Namespace. DTD. XML Schema. XML Schema. (1). (2). XML. (3). DTD. (4). XML Parser. XML. XML Schema. 2.3. 18 逢甲大學 e-Paper (92學年度).

(27) XML Mail安全傳送. 2.3.1 2.3.1.1. ). symmet r i c key (. ). )(. public key (. 2.3.1.2. -. A=C. Y. B=D. Z. A. B. "). (". 19 逢甲大學 e-Paper (92學年度).

(28) XML Mail安全傳送. 2.3.1.3. -. 2.4 Des 1977. Des. DES(Data. IBM. Encryption Standard). 1977. IC. PIN. DES. POS. 2.4.1 Des. 1970. IBM. 64bits. /. DES. /. 20 逢甲大學 e-Paper (92學年度).

(29) XML Mail安全傳送. DES. /. 56 bits. 8 bits. 64 bits. 56 bits. 6. DES. 3.1.. Dk=(Ek(m))=m. DES. Ek. Dk. m. Ek=(Dk(m))=m. Ek=(Ek(m))=m. Dk=(Dk(m))=m. DES. 2. 3.2.. ). (. 3.2.1.. ¨ 010. ¨ 010. K ¡ ¨ 01. ¨ 101. ¨ 101. K ¡ ¨ 10. ). (. 3.2.2. C. m. (Complement) DES. 3.3.DES. ¨ 101. ¨ 010. ¨ 111. ¨ 000. K. Ek(m)=C. 3.3.1.. Ek. Ek. ¦(. Ek(m). ¡¦ ). ¦(. DES. 3.4.. 1977. 2. 3.5.DES. 16. DES. Alan Konheim. DES. 8. 3.6.. (. XOR. ). (Character). 21 逢甲大學 e-Paper (92學年度).

(30) XML Mail安全傳送. java. 2.5 2.5.1. ;. Cipher. Key. Key. Cipher. Key. Cipher. javal. Key. Cipher. Cipher. Private Key Cipher. Key. Private Key. Cipher. 2- 2. 2.5.2. JCE 2.5.2.1 JCE Sun. JDK. SunJCE. SunJCE. 2- 1. Sun. API. SunJCE 22 逢甲大學 e-Paper (92學年度).

(31) XML Mail安全傳送. MD5. Sun. SHA- 1. DSA. SunJCE. HmacMD5. MAC. HmacSHA1. MAC. Cipher. DES. Cipher. DESede. Cipher. PBEWithMD5AndDES. DH. 2- 1Sun. Key. SunJCE. 2- 2. JCE. JCE. http://java.sun.com/products/jdk/ 1.2/jce/. Cryptix http://www.cryptix.org/. IAIK. http://wwwjce.iaik.tu- graz.ac.at/. 2- 2JCE 23 逢甲大學 e-Paper (92學年度).

(32) XML Mail安全傳送. 2.5.2.2 JCE ). Java 1.4.1(. java.security. C:\ jdk1.4.1\ jre\ lib\ security. C:\ Program Files\ Java\ JRE\ 1.4.1\ lib\ security Ps C:\ jdk1.4.1\. C:\ Program Files\ Java\ JRE\ 1.4.1\. java. java.security. security.provider.1=sun.security.provider.Sun. //. security.provider.2=com.sun.rsajca.Provider. //. security.provider.3=com.sun.crypto.provider.SunJCE. security.provider.1=sun.security.provider.Sun. //. security.provider.3=com.sun.crypto.provider.SunJCE //. security.provider.2=com.sun.rsajca.Provider. //. java.security. Java 1.3.1. jre. jre. http://java.sun.com/j2se/1.3/download.html. Java Cryptography Extension (JCE) 1.2.2. sun. 24 逢甲大學 e-Paper (92學年度).

(33) XML Mail安全傳送. http://jsecom15c.sun.com/ECom/EComActionServlet?StoreId=22&P. artDetailId=JCE- 1_2_2- G- JS&TransactionId=Try&LMLoadBalanced=. ). (. http://140.134.4.20/~d8956836/jce- 1_2_2.zip. jce1.2.2/lib/. jce. jar. jce1_2_2.jar. local_policy.jar. sunjce_provider.jar. US_export_policy.jar. jar. C:\ jdk1.3.1_09\ jre\ lib\ ext. C:\ Program Files\ JavaSoft \ JRE\ 1.3.1_09\ lib\ ext. C:\ Program. Ps C:\ jdk1.3.1_09\. Files\ JavaSoft\ JRE\ 1.3.1_09\. java. Java 1.4.1. java. 2.5.3. des Cipher;. /. /. Cipher. :. /. key. getInstance. Cipher. init. / 25 逢甲大學 e-Paper (92學年度).

(34) XML Mail安全傳送. 3.1 3.1.1 ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. , ,. ,. ,. ,. ,. ,. ,. (. ... ). ,. ,. 3- 1. 26 逢甲大學 e-Paper (92學年度).

(35) XML Mail安全傳送. 3.1.2. ). ,. :. (. 1.. 2.. 3. XML. XML. 4.. (. ,. ). :. ,. 5.. ,. ,. ,. ,. ,. 100%. ,. 3.1.3 ,. ,. ,. ,. ,. ,. ,. ,. ,. ,. (. ,. ). ,. ,. 27 逢甲大學 e-Paper (92學年度).

(36) XML Mail安全傳送. JAVA. XML. 3- 2. 3.1.4 ,. ,. ,. IT. ,. ,. IP,. 3.2 3.2.1 1.. :. 2.. :. 3.. ,. :. 4.. :. port. 5.. :. port 28 逢甲大學 e-Paper (92學年度).

(37) XML Mail安全傳送. :. 6.. :. 7.. :. 8.. :. 9.. 10.. :. 11.. :. 12.. :. :. 13.. 3.2.2 1.. 2. XML. :. XML. :. 3- 1. 29 逢甲大學 e-Paper (92學年度).

(38) XML Mail安全傳送. 3.2.3. Server. Client. 3- 2 30 逢甲大學 e-Paper (92學年度).

(39) XML Mail安全傳送. DFD. 3- 3. 31 逢甲大學 e-Paper (92學年度).

(40) XML Mail安全傳送. 3.2.4 ,. 1.. 2.. ,. 3.. 4.. 3.2.5 :. 1.. 2.IT. :. ,. ,. 3.3 3.3.1 3.3.1.1 email. 32 逢甲大學 e-Paper (92學年度).

(41) XML Mail安全傳送. email. "From:". email. "To:". email. "Cc:". "Bcc:". "Subject:". "Date:". "Size". "Name". "Copy". pop3. "Pop3mail". email. "Trashcan". "Peruse". "Message- ID". " compress". 0- 9 0:. " encrypt". 0- 4 0. 1~9. 1- 4. "MIME- Version" MIME. " Body". attach. MIME. "Content- Type". 3- 3email. 3.3.1.2 email. server. email. ip. system.conf. 33 逢甲大學 e-Paper (92學年度).

(42) XML Mail安全傳送. email. tag. compiler. GUI. textfield. compiler. compiler. textfield. java ***. 3- 4. *. 3- 5 34 逢甲大學 e-Paper (92學年度).

(43) XML Mail安全傳送. textField buffer_size = 8192. Buffer. buffer_size. ). (. Byte (1/1000 Mb). send_port = 2222. Client. Port Number. Port. remote_port = 2223. Client. Port Number. Port Number. delay_time = 10000. ms (1/1000 Sec). try_times = 10. divide_size = 5000. Byte (1/1000 Mb). divide_size. scan_time = 10000. scan_t i me. readinput.java. *.eml. scan_dir. E- mail 35 逢甲大學 e-Paper (92學年度).

(44) XML Mail安全傳送. Client. Server xml_dir. *.xml. *.eml. Cl ient. ). (. temp_dir. client. recieve. Gateway. Server. zipout. temp_dir. Server. server_xml. XML. Server. *.eml. XML. Server. server_out. readinput.java. *.eml. 36 逢甲大學 e-Paper (92學年度).

(45) XML Mail安全傳送. java **. "server_out" bufferedsize. "zipout". "recieve". "route_conf" ip. "system_conf". "server_xml". xml. 3- 4Server. 37 逢甲大學 e-Paper (92學年度).

(46) XML Mail安全傳送. java **. port. port. server_out. system_conf. route_conf. xml_dir. temp_dir. 3- 5Clinet. 38 逢甲大學 e-Paper (92學年度).

(47) XML Mail安全傳送. 3.3.1.3. 3.3.2. 3.3.3 Client / Server client / server. /. (fat client). (. ). (thin client). fat client model. server. client. 39 逢甲大學 e-Paper (92學年度).

(48) XML Mail安全傳送. clinet. server. xml. eml server. remote_port. 3- 6server. client. 40 逢甲大學 e-Paper (92學年度).

(49) XML Mail安全傳送. 3.3.4. 3.4 (Evolutionary prototyping). 3.4.1.. class. main. main. Eml. (. Xml. 5kb. Xml. main. Eml. ). server. 3- 7 client. 41 逢甲大學 e-Paper (92學年度).

(50) XML Mail安全傳送. email. 3.4.1.1 server. clinet. Conv.java. Server.java. Ztof.java. Decry.java. Trnxml.java eml. ps:server.java. (. 3- 8server. serverwin.java. java. ). 42 逢甲大學 e-Paper (92學年度).

(51) XML Mail安全傳送. Scan.java. Readinput.java. Client.java. Mailtoxml.java xml. Encry.java. Ftoz.java. Clientsend.java. server. Offline.java. remote_port. Remote.java. ps:clinet.java. (. 3- 9client. clinetwin.java. java. ). 43 逢甲大學 e-Paper (92學年度).

(52) XML Mail安全傳送. class. java. 3.4.1.2. ). java ( 15 ) class ( 24 Client ( 9 java 16 class ) readinput. conf. reader. analysis. clientwin. clientwin$1. clientwin$Button1Mouse1.class. scan. filescan. remind. nameFilter. mailtoxml. eml_reader. emltoxml. addfile. remote. sendto. encry. encry. ftoz. ftoz. clientsend. send. offline. offline. (. 1. readinput. Server serverwin. java 1. class). analysis. (. 5. java 7. class). serverwin$1. serverwin$Button1Mouse1. Receive. conv. conv. ztof. ztof. decry. decry. trnxml. trnxml. 3- 6java- class. (client. ). 44 逢甲大學 e-Paper (92學年度).

(53) XML Mail安全傳送. 3.4.2. Eml. Xml. Client. Xml. ). (. 3.4.2.1. Eml. Server. 20kb. 500kb. 5mb. 0.3. 0.2. 1.6. 0.1. 0.8. 6.8. 0.3. 0.4. 3.4. 5. 5. 5. 0.0. 0.02. 0.9. 0.1. 0.5. 3.8. 0.0. 0.6. 4.1. 0.4. 8. 18. 4. 4. 4. 3- 7. Ps. 1.. 2.. 3.. **. 4.. 5. 45 逢甲大學 e-Paper (92學年度).

(54) XML Mail安全傳送. 3- 10 46 逢甲大學 e-Paper (92學年度).

(55) XML Mail安全傳送. 3.4.3 3.4.3.1 Domain. 3.4.3.1.1. route.conf. Mime tag. route.conf. Mail. Cc ,. To ,. Bcc. 3- 11 mail ip. route.conf. example. IP. 111.222.333.444. Domain Name. E- mail. User_Name @ Gateway_Domain_name .mil. E- mail. FORMAT EXAMPLE. Gateway. 3- 12. (Gateway). E- mail. Domain. Doamin. //= = = =. Gateway. Domain. 47 逢甲大學 e-Paper (92學年度).

(56) XML Mail安全傳送. 3- 11mail ip. 3- 12 48 逢甲大學 e-Paper (92學年度).

(57) XML Mail安全傳送. System.conf. Client. System.conf. Server. 5. xml_dir = c:/xml/. c:/client/xml/. XML. Client. /xml/. 5. //Client Side Directory //. xml_dir = c:/client/xml/ //. temp_dir = c:/xml/client/temp/ //. System.conf. scan_tim 49 逢甲大學 e-Paper (92學年度).

(58) XML Mail安全傳送. try_time. //. //. System.conf. /* ~~~~~~~~~~ */. r eadi nput . j ava. class conf. readinput.java. system.conf. syst em. cong. //XML. readinput.java. 3.4.3.1.3. readinput.java. cl ass conf. Secure Gateway. System.conf. Readinput.java. Compile. Cl i ent. Ser ver. . cl ass Byt eCode. 3.4.3.2. 3.4.3.2.1 50 逢甲大學 e-Paper (92學年度).

(59) XML Mail安全傳送. readinput.java. System.conf. scan_dir. *.eml. *.eml. scan_dir. *.eml. Client. XML. (. ). server_out. XML. server_out. *.eml. Server. *.tmp. E- Mail. *.eml. route_conf. route.conf. To ,. route.conf. Cc ,. Bcc. !. Route.conf. system_conf. System.conf 51 逢甲大學 e-Paper (92學年度).

(60) XML Mail安全傳送. 3.4.3.3 Client. (. Java. 8. ). .Java. 14. Compile. .Class. (Java ByteCode). Client.java. clientwin$1.class clientwin$Button1Mouse1.class scan.java. filescan.class remind.class NameFilter.class mailtoxml.java. eml_reader.class emltoxml.class addfile.class remote.java. sendto.class encry. encry.class ftoz.java. ftoz.class clientsned.java. send.class oddline.java. offline.class second_domain.class. 52 逢甲大學 e-Paper (92學年度).

(61) XML Mail安全傳送. .class. 7. .Java. 5. Server. serverwin.java. serverwin$1.class serverwin$Button1Mouse1.class receive.class conv.java. conv.class ztof.java. ztof.class decry.java. decry.class trnxml.java. trnxml.class. readinput.java. Client. Server. system.conf. readinput.java compile. .class. conf.class , conf_reader , analysis. Server. Client. Server c:/Server. Client c:/client. 53 逢甲大學 e-Paper (92學年度).

(62) XML Mail安全傳送. 3.4.3.4 XML JDOM & SAX Pakage JDOM. *.xml. *.eml. API. Java classpath. 1.3. JDK. Gateway. package. API. Java. classpath. .jar. ant.jar. collections.jar. crimson.jar. jaxp.jar. jce1_2_2.jar. jdom.jar. jdom- jdk11.jar. local_policy.jar. US_export_policy.jar. xalan.jar. xerces.jar. 11. 11. .jar. .jar. C:\ ProgramFiles\ JavaSoft\ JRE\ 1.3.1_09\ lib\ ext C:\ jdk1.3.1_09\ jre\ lib\ ext (. java JDK. Email. ). XML. 54 逢甲大學 e-Paper (92學年度).

(63) XML Mail安全傳送. 3.4.4. Client. c:/client/. java clientwin. Server. c:/Server/. java serverwin. Client. Server. 5. System.conf. System.conf. 55 逢甲大學 e-Paper (92學年度).

(64) XML Mail安全傳送. 4.1. 4- 1client 56 逢甲大學 e-Paper (92學年度).

(65) XML Mail安全傳送. conf static. conf. Reader.readin( string ). l. int. Client.main(v oid). eml. string Analysis.act (void). system.conf. eml. void. Remind.run(). void. Filescan.startss( int , string email , ). void. startss. string. nameFilter.accept( file , string É, ). email. eml xml. 4- 2client. 57 逢甲大學 e-Paper (92學年度).

(66) XML Mail安全傳送. Sendto.sendrecord( string , ). void. Emltoxml.transform( sendto , string . String . ). String []. String []. void. Addfile.addf( string , sting . ) int. String [] Eml_reader.chkTitle( sting , ). boolean. mine. string. string. Encry.encrypt( string , string , int , ). eml_reader.chk _str(). Ftoz.compress( string , sting , int ). 4- 3client. 58 逢甲大學 e-Paper (92學年度).

(67) XML Mail安全傳送. string. Send.sending( string , string , int Y, int , int size , ). server. int. Offline.run(). void. Second_domain.search_target( BufferRead u, string , ). string. string. Second_domain.act( BufferRead u, string ). 4-4client. (. ). System.conf. (. ). XML. MIME 59 逢甲大學 e-Paper (92學年度).

(68) XML Mail安全傳送. TCP/IP Socket. ). (. Route.conf. /temp. Class. Client. Class. Method(. ). Main. 4- 5server 60 逢甲大學 e-Paper (92學年度).

(69) XML Mail安全傳送. Client. Server. ). (. XML. MIME. receive. /recieve. /temp ,. (main). ). (. 4.1.1 Client. Client. Client. ->. ->. ->. XML - >. while( ). Client. while( ). 4- 6.. ZIP. XML. client. Flag Bits. XML. E- Mail. MIME. E- Mail. 61 逢甲大學 e-Paper (92學年度).

(70) XML Mail安全傳送. 4- 6 Client. 4.1.2 Server. Main Fcunction. (main). ). (. while( ). Server. Client. Client. Sever. Server. Client. ). (. XML. MIME. 4- 6. port 62 逢甲大學 e-Paper (92學年度).

(71) XML Mail安全傳送. (Thread). Socket. Server. ). (. Thread. Accept. Client. TCP/IP. Client. 4- 7. TCP. Sccket. 4- 7Server Client. 63 逢甲大學 e-Paper (92學年度).

(72) XML Mail安全傳送. 4- 8. new. Thread. client. request. client. client. The I nformation Format Example: "21,0,1,name,13" 21 : f ilecount 0 : if Compress or Compress rate 1 : if Encry or Encry mode. 4- 8Server 64 逢甲大學 e-Paper (92學年度).

(73) XML Mail安全傳送. 4.1.3 Client Server 4- 6. Client. Server. Client. 4- 9(. 4- 9. ). (. Thread. Client. Server. ). ). (. ). (. E- Mail. Client. Server. 4- 9. XML. 4- 9. 65 逢甲大學 e-Paper (92學年度).

(74) XML Mail安全傳送. 4- 9. Client. test.eml - > test.xml - > test.xml.des - >test.xml.des.zip. Server. 66 逢甲大學 e-Paper (92學年度).

(75) XML Mail安全傳送. 4.2. n u ll. (. ). //x m l. (x m l. ) (. e m a il. ). in t s w itc h (. In t. x m l). °0 - 1 2. case. (. ). 4- 10 67 逢甲大學 e-Paper (92學年度).

(76) XML Mail安全傳送. XML. System.conf. divide_size. Scan_time. buffer_size. Buffer. remote_port. port number. Send_port. port_number. Try_times. Delay_time. 4- 1conf. Java.io. BufferedReader. Class conf. 4.3 Mail. Client. scan. scan_time. Java. class File. list( ). Scan. Fi l enameFi l t er. ¨ cl ass NameFi l t er i mpl ement s. FileName Filter 68 逢甲大學 e-Paper (92學年度).

(77) XML Mail安全傳送. .eml(. ). 4- 11. 0_abc.eml. a_abc.eml. 69 逢甲大學 e-Paper (92學年度).

(78) XML Mail安全傳送. 4.4 XML XML. XML. client. XML tag. server. Gateway. XML. email. null. email. JDOM. tag email. JDOM. xml. 4- 12xml 70 逢甲大學 e-Paper (92學年度).

(79) XML Mail安全傳送. MIME tag. XML. MIME tag. 1. Received. 2. From:. 3. To:. 4. Cc:. 5. Bcc:. 4. Subject:. 7. Date:. (. 8. Size:. 9. MIME- Version. ). MIME. 10. Body. 11. Attach. 4- 2. JDOM. E- Mail. XML. SAX(Simple API for XML). JDOM(Document Object Model). JDOM. XML. 71 逢甲大學 e-Paper (92學年度).

(80) XML Mail安全傳送. email. email. null. email. §tag. buffer_size. send_port. remote_port. delay_time. try_times. divide_size. scan_time. xml_dir. temp_dir. zipout. recieve. email. 4- 13. email. 72 逢甲大學 e-Paper (92學年度).

(81) XML Mail安全傳送. DOM(Document Object Model). XML. JDOM. API. DOM. SAX. Java 2. XML. MIME. To ,. Cc ,. tag. Bcc. tag. JDOM. Vector. record. static Vector position = new Vector();. 4- 14. eml xml. eml. ¨t ¡ ,¡ , bcc ,. tag vector. 4- 14. 73 逢甲大學 e-Paper (92學年度).

(82) XML Mail安全傳送. To ,. Cc ,. Bcc. Check. Mail Server. 140 . 134 . ??? . ??? - >. 140.134.. mail.a_instance.com.tw- >. mail.a_instance.. XML Element rootElement = new Element("xmlmail"); Document document = new Document(rootElement);. XML. XML. JDOM. Document. 74 逢甲大學 e-Paper (92學年度).

(83) XML Mail安全傳送. XML. MIMI. XML. Document. XMLOutputter. XML XMLOutputter outputter = new XMLOutputter();. E- Mail. XML. MIME. MIME. SAX(Simple API for. MIME. XML). tag. tag. SAX. XML. XML. E- Mail. XML. Client. 75 逢甲大學 e-Paper (92學年度).

(84) XML Mail安全傳送. 4.5 java. jce. 1.4. 1.3. api. jce. import java.io.*; import java.security.*; import java.security.spec.*; import javax.crypto.*; import javax.crypto.spec.*;. java.security. java.io.*. javax.crypto. 76 逢甲大學 e-Paper (92學年度).

(85) XML Mail安全傳送. 4.5.1. 4- 15. 1.. 2.. key. DESKeyFactory. SecretKeyFactory. SecretKey. SecretKeyFactory. 3.. 4.. 5.. getIntance(). Cipher. Cipher. cipher. getInstance(). cipher. init(). Cipher. byte[]. chiper. 6.. 7.. java. 77 逢甲大學 e-Paper (92學年度).

(86) XML Mail安全傳送. 4.5.2. padding. 1.. 2.. key. DESKeyFactory. SecretKeyFactory. SecretKeyFactory. getInstance(). SecretKey. SecretKeyFactory. generateSecret(). 3.. 4.. cipher. getInstance(). cipher. init(). 5.. byte[]. chiper. 4.. 7.. key. SecretKeyFactory . generateSecret(). 78 逢甲大學 e-Paper (92學年度).

(87) XML Mail安全傳送. 4- 16. des. key. server. client. email. 79 逢甲大學 e-Paper (92學年度).

(88) XML Mail安全傳送. 4- 17. 1.clinet. 0- 4. email. class. 2. clinet. 0. 1- 3. server. 3. clinet. 4. clinet. 5.server. 6.. 80 逢甲大學 e-Paper (92學年度).

(89) XML Mail安全傳送. 4.6 (ZIP archive). Zip. (dir- entry). ZIP. 4- 18. ZIP. 4- 18ZIP. dir- entry. ZipEntry. Zip. ZipEntry. ZIP. ZIP. (. 4- 18. (. (. ). (. ). ). ). ZIP. 81 逢甲大學 e-Paper (92學年度).

(90) XML Mail安全傳送. ZipEntry. byte. byte zipentry. 4- 19ZIP. ZIP. 4- 19. FileInputStream input = new FileInputStream(. );. BufferedInputStream bmyinput = new BufferedInputStream(input); ZipEntry myzipentry = new ZipEntry(input);. ZipEntry. 82 逢甲大學 e-Paper (92學年度).

(91) XML Mail安全傳送. ZipEntry. ZipEntry. 4- 18. ZipEntry. :. 4.7 Client. Java. TCP/IP. 4- 7. Socket. Hostname. Port Number. IP number. InputStream. Server. (. Server. OutputStream. ). route.conf. 4- 7. InputStream. OutputStream. FileInputStream. Java Socket. Stream. ). getOutputStream(. getInputStream(. ). (. Stream. ). ). ( 83. 逢甲大學 e-Paper (92學年度).

(92) XML Mail安全傳送. "21,0,4,name,13". 21. 13. ¨ nam. Stream. DataInputStream(. InputStream. ). Integer(. String(. ). DataOutputStream(. ). OutputStream. ). Server. 4- 20Client. (Information). 4- 20. `,`. Client. Client. Server. 84 逢甲大學 e-Paper (92學年度).

(93) XML Mail安全傳送. Server. Client. Server. 4- 21. 85 逢甲大學 e-Paper (92學年度).

(94) XML Mail安全傳送. 4.7.1 Client Client. Server. Client. Client. Server. information. ( Clientsend.java. function sending ). XML. (. 5000 Bytes) Server. 7. Client. 4 Byte). 1(. Server. 2. Server. Client. Server. 86 逢甲大學 e-Paper (92學年度).

(95) XML Mail安全傳送. Server. 4- 22Client. 87 逢甲大學 e-Paper (92學年度).

(96) XML Mail安全傳送. m. Clinet. i. Server. information. k. Server. k. k. Client. X4. Client. Server. k. Clinet. k. m. 4.7.2 Server 4- 22. Client. Server. information. Client. Server. XML. MIME. 88 逢甲大學 e-Paper (92學年度).

(97) XML Mail安全傳送. XML. MIME. (Java Class). Client. XML. Server. (Directory). XML. Client. Server. 5.1 Clinet & Server: MIME. Client. XML. ZIP. Server. ). (. XML. MIME. (Method). 5.2. 89 逢甲大學 e-Paper (92學年度).

(98) XML Mail安全傳送. ASCII. 0abc.eml > 9abc.eml > aabc.eml > zabc.eml. (Method). 5.3 XML SAX. XML. XML. XML. (Simple API for XML). XML. XML. SAX. SAX. SAX. DOM. DOM. W3C. DOM. (. XML. ). XML. XML. DOM. XML. XML. 90 逢甲大學 e-Paper (92學年度).

(99) XML Mail安全傳送. DOM. XML. DOM. DOM. XML. DOM. DOM. XML. DOM. XML. DOM. ). (. XML. DOM. DOM. XML. XML. XML. DOM. 5.4 Java. JCE. (Method)JDK1.3. Java. API. JDK1.4. JCE. Classpath. 5.5 Client. Server. TCP/IP Socket. 91 逢甲大學 e-Paper (92學年度).

(100) XML Mail安全傳送. Client. Server. ?. Server. Server. Server. Client. Server. Client. Server. Client. Server. Client. information. Client. Server. Client. Client. Server. Server. information. Server. Client. Client. Thread(. ). (Main Thread). 92 逢甲大學 e-Paper (92學年度).

(101) XML Mail安全傳送. 6.1 SMTP/POP3. MIME. XML. XML. XML. XML. XML. XML. XML. E. SQL SERVER IBM. DB2. Oracle. oracle. EDI(. Electronic Data Interchange) EDI. EDI. 93 逢甲大學 e-Paper (92學年度).

(102) XML Mail安全傳送. XML. XML. XML. XML. XML. HTML. XSL. XML. CSS. XML. XML. 1.. XML. 2.. 3. XML. XML. DOM. XML. 4.. XML. 94 逢甲大學 e-Paper (92學年度).

(103) XML Mail安全傳送. 6.2 ). (. eml. ). (. java. xml. windowsXP. zipentry. java. io. java. compiler. java. compiler. run. java. jce 1.4. jdk1.3.1. jce. jre(java. api. ). java. java.security. xml. eml. java. java. jsax. java. io. 95 逢甲大學 e-Paper (92學年度).

(104) XML Mail安全傳送. ). (. Java. XML. E- mail. XML. XML. XML. XML. DOM. JAVA. SAX. XML. JAVA. XML. JAXP API. XML. JAVA. JAVA. JAVA. Thread. JAVA. JAVA. JAVA ServerSocket. JAVA. Client. Server. Client. Server. Client. Server. JAVA. ;. 96 逢甲大學 e-Paper (92學年度).

(105) XML Mail安全傳送. (. ). Java. C++. C++. C. XML. Java. 6. XML. Java. API. XML. 15. 6. 8. Client. Server. (Information). Server. Server. Client. 97 逢甲大學 e-Paper (92學年度).

(106) XML Mail安全傳送. java. [1]. [2]. mar.2003. p8- 3~P15- 79. sep.2002. java I/O. /. aug.2001. [3]Shelly/Cashman. [4]. ,pp.112- 135,. ,XML. ,May.2002 [5]. ,JAVA2. ,pp.182- 205,. ,Mar.2002. 98 逢甲大學 e-Paper (92學年度).

(107)

參考文獻

相關文件

3.16 Career-oriented studies provide courses alongside other school subjects and learning experiences in the senior secondary curriculum. They have been included in the

1.4 For education of students with SEN, EMB has held a series of consultative meetings with schools, teachers, parents and professional bodies to solicit feedback on

112 學年度身心障礙學生升學

Abstract In this paper, we consider the smoothing Newton method for solving a type of absolute value equations associated with second order cone (SOCAVE for short), which.. 1

E-mail   通訊地址 任職單位/.

例如 : http ( 網頁伺服器所用的協定 ) 定義了 client 如何向 server request 網頁及 server 如何 將網頁及其中的各種內容回傳給 client 。. 提供服務給 application layer

主旨:檢送 104 學年度第一學期「大和 何溪明優秀清寒學生獎學金申請辦 法」乙份,惠請協助公告並鼓勵貴校學生踴躍申請,敬請

Binding Warning message Binding Update message AAAO: the AAA server of the old foreign network to which the OFA belongs. AAAF: the AAA server of the new foreign network to which the