Molecular Biomedical Informatics 分子生醫資訊實驗室 Social Web Design & Research 社群網站設計 & 研究 Social Web Design & Research 1.

Slides:



Advertisements
Similar presentations
Social Web Design 1 Darby Chang Social Web Design.
Advertisements

Molecular Biomedical Informatics Web Programming 1.
Chapter 17: WEB COMPONENTS
Murali Mani SQL-PL Interface. Murali Mani Some Possible Options Web Interface Perl /CGI with Oracle/mySQL Install your own web server and use servlets.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Web Programming 網際網路程式設計 1.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Web Programming 網際網路程式設計 1.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Web Programming 網際網路程式設計 1.
Cryptography and Network Security
An Introduction to Secure Sockets Layer (SSL). Overview Types of encryption SSL History Design Goals Protocol Problems Competing Technologies.
Module 5: TLS and SSL 1. Overview Transport Layer Security Overview Secure Socket Layer Overview SSL Termination SSL in the Hosted Environment Load Balanced.
BASIC CRYPTOGRAPHY CONCEPT. Secure Socket Layer (SSL)  SSL was first used by Netscape.  To ensure security of data sent through HTTP, LDAP or POP3.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Web Programming 網際網路程式設計 1.
Netprog: Cryptgraphy1 Cryptography Reference: Network Security PRIVATE Communication in a PUBLIC World. by Kaufman, Perlman & Speciner.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Web Programming 網際網路程式設計 1.
SSL & SharePoint IT:Network:Applications. Agenda Secure Socket Layer Encryption 101 SharePoint Customization SharePoint Integration.
1 Supplement III: Security Controls What security services should network systems provide? Confidentiality Access Control Integrity Non-repudiation Authentication.
Mar 12, 2002Mårten Trolin1 This lecture Diffie-Hellman key agreement Authentication Certificates Certificate Authorities SSL/TLS.
Principles of Information Security, 2nd edition1 Cryptography.
TCP/IP summary Skills: none IT concepts: review This work is licensed under a Creative Commons Attribution-Noncommercial- Share Alike 3.0 License.
Web Server Administration
講師:陳烱勳 第1章:網路安全概論 講師:陳烱勳
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
Security Outline Encryption Algorithms Authentication Protocols Message Integrity Protocols Key Distribution Firewalls.
Network Security Secure hypertext transfer protocol (https) Cookies Public Key Cryptography.
How Clients and Servers Work Together. Objectives Learn about the interaction of clients and servers Explore the features and functions of Web servers.
CSC 2720 Building Web Applications Database and SQL.
Chapter 20: Network Security Business Data Communications, 4e.
TLS/SSL Review. Transport Layer Security A 30-second history Secure Sockets Layer was developed by Netscape in 1994 as a protocol which permitted persistent.
Lecture slides prepared for “Business Data Communications”, 7/e, by William Stallings and Tom Case, Chapter 8 “TCP/IP”.
Molecular Biomedical Informatics 分子生醫資訊實驗室 Social Web Design & Research 社群網站設計 & 研究 Social Web Design & Research 1.
Cryptography 101 Frank Hecker
How HTTPS Works J. David Giese. Hyper Text Transfer Protocol BrowserHTTP Server GET / HTTP/1.1 HOST: edge-effect.github.io HEADERS BODY HTTP/ OK.
SYSTEM ADMINISTRATION Chapter 13 Security Protocols.
 TCP/IP is the communication protocol for the Internet  TCP/IP defines how electronic devices should be connected to the Internet, and how data should.
Digital Certificates Made Easy Sam Lutgring Director of Informational Technology Services Calhoun Intermediate School District.
CSI315 Web Development Technologies Continued. Communication Layer information needs to get from one place to another –Computer- Computer –Software- Software.
1 Web Server Administration Chapter 1 The Basics of Server and Web Server Administration.
資訊安全實務 : 傳輸安全 ( SSL 安全網站建置流程) 大華技術學院資管系 資訊安全實作(四):系統傳輸安全規劃與設定.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Cosc 4765 SSL/TLS and VPN. SSL and TLS We can apply this generally, but also from a prospective of web services. Multi-layered: –S-http (secure http),
Learning Aid Type Text Page 206 MGS GROUP C Svitlana Panasik.
Material being covered 3/9 Remainder of Text Chapter 6 (Q5, 6) Text Chapter 6A Material Posted 3/9 Midterm Information Introduction to Text Chapter 7.
Cryptography, Authentication and Digital Signatures
How cryptography is used to secure web services Josh Benaloh Cryptographer Microsoft Research.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
 2004 Prentice Hall, Inc. All rights reserved. 1 Segment – 6 Web Server & database.
1 Security Protocols in the Internet Source: Chapter 31 Data Communications & Networking Forouzan Third Edition.
Internet-security.ppt-1 ( ) 2000 © Maximilian Riegel Maximilian Riegel Kommunikationsnetz Franken e.V. Internet Security Putting together the.
1 Cryptography NOTES. 2 Secret Key Cryptography Single key used to encrypt and decrypt. Key must be known by both parties. Assuming we live in a hostile.
CSCI 3140 Module 6 – Database Security Theodore Chiasson Dalhousie University.
Server Management WEB Servers  Win2K TCP/IP Environment  WWW : IIS 5 / Lotus Domino  SSL : Secure Socket Layer  Apache HTTP Server National Taiwan.
Course FAQ’s I do not have any knowledge on SQL concepts or Database Testing. Will this course helps me to get through all the concepts? What kind of.
TCP/IP (Transmission Control Protocol / Internet Protocol)
Visual Programing SQL Overview Section 1.
SQL Jan 20,2014. DBMS Stores data as records, tables etc. Accepts data and stores that data for later use Uses query languages for searching, sorting,
Encryption Basics Module 7 Section 2. History of Encryption Secret - NSA National Security Agency –has powerful computers - break codes –monitors all.
Database Security Cmpe 226 Fall 2015 By Akanksha Jain Jerry Mengyuan Zheng.
IAD 2263: System Analysis and Design Chapter 7: Designing System Databases, Interfaces and Security.
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
Invitation to Computer Science 5 th Edition Chapter 8 Information Security.
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Lecture 6 (Chapter 16,17,18) Network and Internet Security Prepared by Dr. Lamiaa M. Elshenawy 1.
SSL: Secure Socket Layer By: Mike Weissert. Overview Definition History & Background SSL Assurances SSL Session Problems Attacks & Defenses.
Secure Sockets Layer (SSL)
Database Management Systems
Presentation transcript:

Molecular Biomedical Informatics 分子生醫資訊實驗室 Social Web Design & Research 社群網站設計 & 研究 Social Web Design & Research 1

Database 2 Social Web Design & Research

Database A database is an organized collection of data The data and their supporting data structures rather than the database management system (DBMS) –the database data collection with DBMS is called a database system –well known DBMSs include Oracle, IBM DB2, Microsoft SQL Server, Microsoft Access, PostgreSQL, MySQL, and SQLite Data models –relational model –entity-relationship model (for example, the food in a restaurant) –object model –object relational model –XML as a database data model Social Web Design & Research 3

Table A row is an entry; a column is a property Social Web Design & Research 4 FoodPlace F1P1, P2 F2P1, P3 PlaceFood P1F1, F2 P2F1, F3 FoodPlace F1P1 F1P2 F2P1 F2P3 NamePrice F1100 F2200 (a) (b) (c) NamePhone P1… P2…

You prefer? Social Web Design & Research 5

SQL (Structured Query Language) Different DBMSs can inter-operate by using standards (e.g. SQL) and ODBC (Open Database Connectivity) to support together a single application The most common operation in SQL is the declarative SELECT statement, which includes –a list of columns to be retrieved (an asterisk means all columns) –FROM clause to specify the table(s) from which data is to be retrieved –JOIN subclauses to connect tables –WHERE clause to specify the conditions –ORDER BY clause to specify the sorting scheme Social Web Design & Research 6

SELECT SELECT * FROM food WHERE price > 100 ORDER BY name SELECT place.phone FROM place JOIN f-p ON place.name = f-p.place JOIN food ON f-p.food = food.name WHERE food.price > 100 Social Web Design & Research 7 FoodPlace F1P1 F1P2 F2P1 F2P3 NamePrice F1100 F2200 NamePhone P1… P2…

INSERT, UPDATE and DELETE INSERT INTO food (name, price) VALUES (F1, 100) UPDATE food SET price = 100 WHERE name = F1; DELETE FROM food WHERE name = F1; Social Web Design & Research 8

Other SQL operations Definition –CREATE –ALTER –DROP Control –GRANT SQL 教學 - SQL Tutorial SQL 教學 - SQL Tutorial Social Web Design & Research 9

Database technologies Storage (B+ tree)Schema (normalization)SQL phpMyAdminOther apps Social Web Design & Research 10

SQL in Perl #!/usr/bin/perl –w use DBI; my $dbh = DBI->connect( 'dbi:mysql:db_name:host', 'user' ) or die $DBI::errstr; # insert $dbh->do( "INSERT INTO `food` ( `name`, `price` ) VALUES ( 'F1', 100 )" ) or die $DBI::errstr; # select my $sth = $dbh->prepare( "SELECT * FROM `food` WHERE `price` > 100" ); $sth->execute() or die $DBI::errstr; while ( my $row = $sth->fetchrow_hashref() ) { print $row->{name}, "\n"; } Perl DBI - dbi.perl.org DBI - search.cpan.org Social Web Design & Research 11

SQL in PHP 100" ) or die( mysql_error() ); while ( $row = mysql_fetch_assoc( $result ) ) { echo $row['name'], "\n"; } mysql_free_result($result); mysql_close($conn); ?> PHP: Mysql - Manual Social Web Design & Research 12

Any Questions? Social Web Design & Research 13

HTTPS 14 Hypertext Transfer Protocol Secure Social Web Design & Research

HTTPS A combination of the Hypertext Transfer Protocol (HTTP) with the SSL/TLS protocol HTTP operates at the highest layer of the OSI Model, the Application layer; but the security protocol operates at a lower sublayer, encrypting an HTTP message prior to transmission and decrypting a message upon arrival HTTP Secure - Wikipedia, the free encyclopedia Social Web Design & Research 15

SSL/TLS Transport Layer Security (TLS) and its predecessor, Secure Sockets Layer (SSL), are cryptographic protocols that provide communication security over the Internet TLS and SSL encrypt the segments of network connections at the Transport Layer, using asymmetric cryptography for key exchange SSL was developed by Netscape for secure web communication with a great success; while IETF ( made it a standard (RFC2246) and called it TLSwww.ietf.org In technique, the SSL 3.0 and TLS 1.0 are very similar Transport Layer Security - Wikipedia, the free encyclopedia Social Web Design & Research 16

Social Web Design & Research 17 In short, HTTPS is not a separate protocol, but refers to use of ordinary HTTP over an encrypted SSL/TLS connection 加密  傳  解密

Asymmetric cryptography The basic of modern cryptography ( 密碼學 ) XOR could be a symmetric cryptography –there is a problem… Social Web Design & Research 18

Suppose Social Web Design & Research 19 you are a king and want to communicate with another king…

Public/private key Symmetric-key algorithms, used for thousands of years, use a single secret key for both encryption and decryption where the sender and receiver must securely share a key in advance Two separate keys, one to lock or encrypt the plaintext, and one to unlock or decrypt the cyphertext Neither key will do both functions, namely useless One of these keys is published or public and the other is kept private –if the lock/encryption key is the one published then the system enables private communication from the public to the unlocking key’s owner –if the unlock/decryption key is the one published then the system serves as a signature verifier of documents locked by the owner of the private key Public-key cryptography - Wikipedia, the free encyclopedia Social Web Design & Research 20

Creating asymmetric key pairs Heavily depends on large prime numbers  mathematics is important The ‘direct’ (encryption) operation is relatively easy, but the ‘inverse’ (decryption) operation must be significantly more difficult The multiplication of integers is easy, but finding the prime factors of the product is much harder –the famous RSA algorithm uses this concept The one-way function have many applications, such as the famous MD5 algorithm MD5 - Wikipedia, the free encyclopedia Social Web Design & Research 21

Perfect Social Web Design & Research 22 with asymmetric cryptography?

The man-in-the-middle attack Social Web Design & Research 23

What exactly to do Install –$ sudo apt-get install apache2 $ sudo apt-get install openssl $ sudo apt-get install ssl-cert $ sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf \ /etc/ssl/private/host.pem In apache.conf – SSLEngine On SSLCertificateFile /etc/ssl/private/host.pem Start –$ a2enmod ssl # enable ssl module of apache –$ /etc/init.d/apache2 restart # make the settings work 在 Ubuntu 上安裝 Apache2 的 HTTPS Server 在 Ubuntu 上安裝 Apache2 的 HTTPS Server So… Social Web Design & Research 24

25 Nothing you can do, unless you are the web administrator Social Web Design & Research

26 The world is big Actually there are things you can do (heard of malicious code?)

Any Questions? Social Web Design & Research 27

Today’s assignment 今天的任務 Social Web Design & Research 28

Make your site more fluent Use database in your site Reference –Perl DBI - dbi.perl.orgPerl DBI - dbi.perl.org –DBI - search.cpan.orgDBI - search.cpan.org –PHP: Mysql - ManualPHP: Mysql - Manual Your web site ( will be checked not before 23:59 5/14 (Tue). You may send a report (such as some important modifications) to me in case I did not notice your features. me Social Web Design & Research 29

Appendix 附錄 30 Social Web Design & Research

Advance tips of MySQL BLOB is binary; TEXT is text –BLOB vs. TEXTBLOB vs. TEXT |CHAR| is [0,255]; |VARCHAR| is [0,65535] –CHAR vs. VARCHARCHAR vs. VARCHAR DATE vs. DATETIME vs. TIMESTAMP –DATE from ' ' to ' ' –DATETIME from ' :00:00' to ' :59:59' –TIMESTAMP from ' :00:01' UTC to ' :14:07' UTC. VARCHAR(320) –Maximum length of a valid idMaximum length of a valid id utf8 –$dbh→do('SET NAMES utf8'); –UTF8, MySQL, Perl and PHPUTF8, MySQL, Perl and PHP Social Web Design & Research 31

通訊協定堆疊總結 應用層支援網路的各種應用軟體 –FTP, SMTP, HTTP 傳輸層負責兩端點之間資料傳輸的虛擬連線 –UDP, TCP 網路層負責傳送端和接收端之間的路徑 –routing protocol, IP 連結層負責相臨端點之間的傳輸 –Ethernet, PPP 實體層為實體線材上的訊號 Social Web Design & Research 32

Social Web Design & Research 33 實際上的通訊 Application Transport Network Link Physical Application Transport Network Link Physical Application Transport Network Link Physical Application Transport Network Link Physical