1. 程式人生 > >Coursera:Internet History ,Techornology and Security

Coursera:Internet History ,Techornology and Security

應用 關系 距離 多人 shift media web 出行 random

WEEK1

War Time Computing and Communication

  • Bletchley Park 布萊徹利莊園:a top-secret code breaking effort by the British government during World War II. 二戰時期英國政府為了破譯德國的“Enigma”電報加密裝置而設立的,聚集了一大批高端的密碼學、數學人才的基地。最後在Alan Truing(艾倫圖靈)的主導下設計了第一個計算機。(以上中文註釋來自筆者觀看電影《模仿遊戲》得到的資料)
    • 筆者的註釋:嚴格意義上來說Alan Turing此時參與研制的計算機與現在常見的計算機有一些不同。在Bletchley Park誕生的計算機學術上稱為電子模擬計算機,其數值是由一些例如指針轉動、計算尺長度表示的(這點在本課程的視頻Alan Turing and Bletchley Park中的計算機復制品的運作場景也可以得到印證,其運算的時候有很多個轉盤同時在運動)。而現在常見的計算機被稱作電子數字計算機,其數值是按位運算的,而且不斷跳動。
  • Bomba:波蘭人研制的破解Enigma的機器主要針對的是德國人repeating the message header(重復使用信息頭)
  • Bombe:以Alan Turing為首的團隊設計的機器,主要針對的是德國人sending stereotyped messages(模塊化的信息,也就是有一定格式的軍事指令).
  • Colossus(巨人):針對德國加密機器升級版的機器,第一臺被稱作Mark 1.(難道Iron Man命名的靈感就來源於此?)第二臺稱作Mark 2.Mark 2直接參與了諾曼底登陸戰。巨人計算機具有大多數現代計算機的特征,除了沒有內存。通過紙條讀取數據,

    Computing with Phone Lines

  • 這部分主要介紹了早期計算機之間的聯通模式:通過電話線撥號實現信息傳送
    • local call to local computer
    • distance call to remote computer(有點類似於遠程計算機)
    • computer to computer(leased lines):較昂貴,常見於銀行系統

      WEEK2

      Supercomputers Justify a National Network

  • 這部分主要介紹了早期計算機之間的連接方式及其演變。
    • 1.電纜連接(有線連接、專線網絡)leased lines
      • 通過電纜直接將計算機聯系在一起。It is really expensive.The cost base on distance.成本與距離線性相關。
      • 傳輸速度慢
      • 信息需要排隊通過
      • Save Money with More "Hops":通過連接更多的學校(因為當時只有學校擁有計算機),來分攤修建路電纜的費用已達到減少開支的方法。
    • 2.Bitnet比特網,校園網的主要方式
      • 為了節省開支而產生的連接方式
      • 缺點和優點一樣明顯:大號的文件可能會長時間占用線路,影響其他較小文件的傳輸,所以傳輸速度很慢。
    • 3.ARPANET:美國軍方研制的,供給軍隊使用的網絡
      • the primary motivation was to improve the use of their compution equipment.
      • ARPANET與Bitnet的主要區別:“packet switching”(分組交換):sending data across the link and then keep sending it until it was done.
        • packet:breakinga big message into small parts,labeling each one of them individually將數據分塊成為數據包,以數據包為單位傳輸數據
        • able to sneak and bypass the traffic jam能夠避開交通堵塞(這裏的traffic jam可以理解為處在busy的線路)
        • allowing simultaneously multible message to be in fight at the same time(個人將這句話理解為允許同是傳送不同消息,這裏體現了ARPANET與Bitnet的重要不同)
        • 同一組數據在被分成數據包以後可能會經由不同路徑進行傳輸,但是因為路徑的不同數據包可能在不同時間送達。就好比我在淘寶上買東西了一個手辦(message),但是店家把這個手辦的分解成零件(packets),從北京中關村發到福州上街鎮,但是可能每個零件從北京到福州的路徑不一樣例如有一個零件走的是(北京-->濟南-->南京-->杭州-->福州),而另一個零件走的是(北京-->太原-->西安-->重慶-->貴陽-->南寧-->廣州-->福州),但無論通過什麽路徑,最後都能到福州,而我需要做的是按照說明書把手辦拼起來。
    • 技術分享圖片
      • between getway and getway have links and routers(路由器,主要作用是轉發信息):breaking messages into packets,packets can take different paths,and then they arrive and they are reassembled(重組)
  • Larry Smarr
    • 天文物理學家,因為接觸到了一個需要超級超級計算能力的課題,於是不遺余力的推動超級計算機的建設。經過不斷的努力,後來還建立了NSFNET

      The frist "Internet"

  • 這部分主要講述了一些Internet發展過程中的曲折故事和相關訪談。
  • Doug Van Houweiling
    • 因為各方面原因大學難以擁有自己的超級計算機,於是另辟蹊徑為密歇根大學的計算機建立了網絡。最早的預算只夠建立運輸速度為56kb的線路,後來在一系列的爭取以後,將其提高到了1.5mb。自此,NSFNet成為世界上最快的網絡,取代ARPANET成為世界主流網絡。
  • Leonard Kilenrock
  • Katie Hafner(一個記者,曾經準備寫關於互聯網的專題報道)
  • NSFNet:National Science Foundation,美國國家科學基金會,簡稱NSF

    WEEK3

    The Early World-Wide-Web

  • 這部分描述了早期的world-wide-web(萬維網)
  • Robert Cailliau :one of the co-inventor of the world-wide-web
    • Physcists have need for spreeding documentation around .So they built something like centralized databases((集中式數據庫) to kept high energy physics articles(高能量物理學文章).
    • Robert將計算機分割為上層(browser瀏覽器)和下層(database數據庫)
    • The first server was up end of 1990 in the USA.
    • Gopher:早期的信息檢索工具,在WWW出現以前是主要的信息檢索工具。
    • Mosaic:Firefox瀏覽器前身,歷史上著名的瀏覽器,運行時只有一個窗口,每個新窗口自動代替上一個界面。
    • WWW的特點:every time that you clicked here, you had another window(與Mosaic的重要區別:每次點擊都會打開一個新的頁面)
    • 1994年,第一屆國際萬維網大會召開,

      A Search Engine for Physics Articles

  • 這部分介紹了物理學文章的搜索引擎
  • use the database by the web.(此處的database就是前文中提到的存放物理學文章的centralized databases)
  • The first Web server in America can query a database on a mainframe.(美國第一臺網絡服務器可以在數據庫中查詢數據)
  • Paul kunz used a CREN server software ,which was written in C to creates the first Web server in America.
    • get the query that the user had made and turn it into a database query.(獲取用戶所做的查詢並將其轉換為數據庫查詢)

      Making the Web Available to All

  • Gopher:在web流行起來以前gopher是主流的網絡資源檢索工具
  • Mosaic:另一款瀏覽器,由NCSA的Joseph Hardin牽頭發明
    • At 1990s,NCSA at Urbana-Champaign, University of Illinois, built an open source web browser that worked on Mac, Windows, and Unix. (支持多個多個系統)
    • it is possible for people to share in real time images of their data, the spreadsheets of their data, and papers.
    • 有必要提一下的是,後來Mosaic項目的大部分員工創建了有名的網景公司(Netscape),該公司推出了現在很多人使用的Firefox瀏覽器。

      WEEK4

      Explosive Growth of the Internet and Web

  • 1994:Year of the Web(1994年時互聯網發展的重要一年,互聯網不再是純粹的學術或者技術,而是帶來了許多的資金投入,許多的it公司的建立等等)
    在當時許多的公司之中,Netscape與Microsoft無疑是強烈的競爭對手,但是當時的Netscape的體量和Microsoft相比還比較小,Netscape險些被Microsoft收購吞並。
  • Mitchell Baker: one of the founders of Mozilla.
    • Microsoft收購Netscape失敗以後二者進入了競爭。
    • Netscape is a failure product,because of it ,Baker was be laying off in 2001. But it wasn‘t really possible to take her place and she continued as a volunteer.
    • 在這段競爭歲月中,網景公司創造了現在依然很火的JavaScript語言。後來兩家之間以價格為主要戰場的商業戰爭不再贅述,畢竟我不需要分析這次市場競爭行為的利弊以及歷史意義。(套路無非是惡性降價競爭,甚至免費的產品,以達到占領市場的目的。但是這個時候的發展重點依然是技術,而不是一味的打價格戰。如果當時有融資這種東西的話,就和和這幾年的某些公司在某些領域的競爭很像了)
    • In 2003 the Mozilla foundation was formed
  • Brendan Eich:JavaScript主要創造者與架構師
    • JavaScript和Java的關系不大(我長期以來一直以為JavaScript時Java的延申或者在某一方面的定制版本,這次課糾正了我這個思維定勢)
    • JavaScript是一種對初學者和業余程序員都比較友好的語言。

      Commercialization of the Web

  • 這部分主要講述了網絡商業化
  • Microsoft give their browser away free, which made it impossible for Netscape to charge for the browser.(微軟為了競爭而對用戶免費提供瀏覽器)
  • the World Wide Web Consortium(萬維網聯盟) was created in October of 1994.
    • Jeff Bezos: the founder of Amazon.com(亞馬遜創始人貝索斯,沒錯就是最近離婚的那個)
      • books is the frist product to sell online.Music is the second.最早亞馬遜買的是書,後來擴展到CD一類的音樂產品。
      • 說到網購平臺,突然想起來最近看到的一個關於馬雲的視頻,感觸頗深,視頻來自虎撲步行街-->傳送門

        WEEK5

  • Hops:one portion of the path between source and destination. Data packets pass through bridges(網橋), routers and gateways(網關) as they travel between source and destination. Each time packets are passed to the next network device, a hop occurs.[插入圖片Hop-count-trans.png]
  • Packet-switching(分組交換):break message into packets(將信息分割成數據包,)
    • bridge,router,gateway is forwarding packets(網橋、路由器、網關負責的是儲存與中轉數據包),but not longs term storage of message.
  • shared Network infratructure only focuses on packets,not reliability or anyting else.(共享網絡只關註數據包而不是可靠性或其他)
  • layered network model(分層網絡模型):OSI model(Open System Interconnection model開發系統互連模型):為了簡化解決方案,以便解決問題、管理,就將網絡劃分為幾個部分。在每層中只需要考慮本層的問題,不需要被其他層的問題影響。
  • Layered Architecture(分層架構)
    • 技術分享圖片

    • Link:一段傳輸介質,例如光纜,數據通過一個link就是一個hop,路由器接受上一個link的數據並將收到的數據push到下一個link。就好比在淘寶上買東西了一個手辦(message),但是店家把這個手辦的分解成零件(packets),每個packets在來福州的路上會經過許多中轉站(rounter),而每個中轉站之間的要用各種交通工具運輸(link),中轉站之間的運輸就是hop。
      • how to avoid the chaos when they‘re sharing?
        • with a technique called, Carrier Sense Media Access with Collision Detection.
        • To aviod garbled messages,systems must observe "rules"(Protocols)
        • Ethernet rules are simple
      • common link technologies:Ethernet(以太網),WiFi,Cable modem(電纜調制解調器),DSL(數字用戶線路[撥號上網]),Satellite(衛星),Optical(光纖)

        Internet Protocol(互聯網協議)

  • IP drop data if it go bad.如果數據包出錯或傳輸數據有故障,可以丟棄這個數據包,避免出現錯誤殘破的數據包。the address is broken into two parts. There is the network number part which is the prefix(前綴), and then there is the computer number within network.As soon as the packets enter the network, it only looks at the prefix.網絡只關心IP地址的前綴,就是只關心來自哪個網絡。
  • portable cpmputer:dynamic host configuration protocol:動態主機配置協議,主要用於解決移動計算機例如筆記本電腦、iPad等無固定本地連接的IP地址分配問題。即分配臨時的本地IP,一般格式為192.168.xxx.xxx,而這個IP地址只屬於本地網絡,可以理解為IP地址的分支。這個方法也可以用來解決IP地址數量不足的問題。
  • network address translation(在IP數據包通過路由器或防火墻時重寫來源IP地址或目的IP地址)
  • Time-to-live (TTL) is a value in an Internet Protocol (IP) packet that tells a network router whether or not the packet has been in the network too long and should be discarded.告訴路由器數據包是否在網絡中存在太久。當數據包的hops數超過255(32bit)是被丟棄。原理是如果一個數據包經過了255hops都還沒送達,可以認為數據進入了死循環。為了避免占用網絡引起網絡擁堵,故產生了這種診斷方式。

    WEEK6

    Transport/Reliability

  • TCP層建立在IP層之上,TCP層的作用是彌補IP層可能出現的一些問題。
  • TCP(Transmission Control Protocol 傳輸控制協議)layer:The purpose of the TCP layer is to compensate for the possible errors in the IP layer as well as make best use of available resources.
  • the key idea in TCP/IP is that when we send some data, we break it into packets and then we send each one. And then we keep them until they get an acknowledgement(確認送達的回復) from the other side and then and only then do we throw them away. And at some point, if a packet gets lost It can be sent again, until it finally is acknowledged in the destination system.(預防傳輸過程出錯而設置的機制,直到發送方確認發送完成才結束傳輸,若出現傳輸錯誤就重新發送,直到完全成功傳輸為止)It figures out which packets have or have not made it across the Internet layer.
  • 作為一個球迷,筆者將TCP理解為莫德裏奇(IP)身邊的卡塞米羅(TCP),幫助IP防守的同時和IP協作使得球隊(network)的運轉更加流暢和順利。(這是筆者的自嗨,換成加圖索和皮爾洛或者類似的誰和誰一樣成立,看不懂請忽略 ^^_^^ )
  • the slow start algorithm at a high level。
    • 隨著越來越多的計算機接入網絡,網速變得很慢,許多數據包丟失。(是不是因為太長時間沒有送達,上一周講到的Time-to-live機制起作用了?)Van Jacobson對此的對策是:TCP congestion control.
    • 技術分享圖片

    • 技術分享圖片

    • 這個機制簡單描述就是,控制進入網絡的packet數量(有點類似北京n環限號出行以緩解堵車的既視感),當收到確認送達的acknowledgement的時候才向網絡發送packet。但是這個機制有一個難點就是起步的時候發送方不知道現在的網絡狀況如何(因為發送第一個數據包的時候沒有上一個數據包的acknowledgement)。所以van Jacobson設計了Slow Start Algorithm(慢啟動算法),也就是在數據傳輸的初期以慢速發送。這樣就能夠防止網絡堵塞。
      • 補充:不是只有收到上一個數據包的acknowledgement才發送下一個數據包(這樣未免太慢了,顧此失彼),而是在發送開始的時候壓低速度,後面在不影響網絡速度的前提下逐步提高傳輸速度。
  • Domain Name System(域名系統):the visible name that we could switch the mapping from the name of the IP address transparently(可以從IP地址名稱切換映射的可見名稱),a big distributed data base(分布式數據系統).[使用更加便於人類記憶的命名方式代替IP地址,IP地址是從左往右就是從大到小,而域名系統相反,例如www.si.umich.edu這個域名,edu代表這個域名屬於教育機構,umich代表了教育機構裏面的密歇根大學,si代表的是密歇根大學的信息學院,www是服務器]
  • the transport control protocol has a responsibility of compensating for the imperfections of the IP layer

    WEEK7

    Application

  • client application(客戶端應用程序)
  • server application(服務器應用程序)
  • client app make request ,and server make response back.客戶端發送請求,服務器返回響應內容。
  • two basic problem
    • which application gets the data:
      • this is using a mechanism(機制) called ports(端口).ports allow a IP address or a single computer or a single server.端口依附於IP存在,類似於IP地址的分支路徑。不同的端口對應不同的功能與服務。
      • 下圖是我的電腦的部分端口信息
      • 技術分享圖片
  • application protocols(應用程序協議),在端口進行信息交換的規則。
  • 過程:click-->request-->response-->display
  • browers(瀏覽器):request the server application ,HTML comes back ,which discribe how this page document supposed to show.And show to user.
  • HTTP:超文本傳輸協議,一種廣泛使用的網絡協議,一些網站前面加了“ http:// ”的意思就是該網站遵循HTTP協議
  • If we know how to talk, if we know what port to talk to, and we know what protocol to talk to that port we can write a client that meets the needs of that server and extract the data.(如果我們知道如何通信,如果我們知道要與哪個端口通信,如果我們知道要與那個端口通信的協議,我們就可以編寫一個滿足服務器需求的客戶機並提取數據。)
  • Information that‘s sort of qualitatively the same as all naming or identity information, but it‘s spread randomly across the whole packet. (信息在質量上與所有命名或身份信息相同,但它在整個數據包中隨機傳播)

    WEEK8

    Hiding Data from Others

  • It is does not exist of absolute security.Security is a cost benefit analysis(成本效益分析)
  • security is naturally imperfect(安全是天生不完美的),世界上不存在絕對的安全,過度的安全會限制本身的各個活動,我們應該采用的是折衷方案。
  • confidentiality(保密性),encryption(加密) and decryption(解密)
    • plain text and ciphertext(純文本和密文):Encryption is the act of going from plain text to ciphertext.And returning the ciphertext back to the plain text is decryption.
    • secret key
      • symmetric key(對稱密鑰), which means that both parties have to be in possession of the same information, basically use the same key material to encrypt as you do to decrypt.(雙方必須擁有相同的信息,基本上使用與解密相同的密鑰材料進行加密)
      • the problem that secret key has, that led to the need to invent a public key, is the fact that you need to at some point have a secure communication.(密鑰機制的問題在於需要有一個完全安全的方式進行解密方式的傳輸)
      • shift(移位加密):將文本的字母向上/向下移動n位(n=shift number,1 < shift number < 26)
        • 移位加密的破譯方式很簡單暴力,就是把1~25的shift number都使一次(很顯然shift number為0或者26沒有意義,shift number大於等於26可視為0~25的變種)
        • rot13:常用的移位加密方法,但加密與解密方式相同,所以解密只需要再進行一次加密。
    • public key
      • it has a way of distributing the key in a using insecure medium.(公鑰有一種方法在不安全介質中分發密鑰)

        Insuring Data Intergrity

  • Cryptographic Hashing(哈希):map from a message to the hash(散列) or the digest(摘要)
    • takes a large amount of text and reduces it down to some small set of numbers(將大量的文本縮小)
    • hashing passwords(哈希密碼):when creating a password,run a cryptographic hash on it, store the cryptographic hash.when log in next,just input the plain text to the system,and the system will run the presented password through the same cryptographic hash.
      • hash cannot go backward.(哈希是單向的),you can go from the frame text to the hash, but you can‘t go from the hash to the plain text, which is very different than encryption and decryption.(哈希與加密解密的最大不同就是哈希是不可逆的,無法通過散列還原文本),you need to run the plain text through the hash again and then compare
      • the system doesn‘t know what is the password, but it know what is not the password.
    • 哈希的方法廣泛運用與密碼的保存和確認識別中,如果運營商能夠將密碼以明文形式發送給用戶,這個運營商的密碼機制肯定是不安全的,因為黑客可以通過截獲郵件獲得密碼。運營商應該保存的是密碼的哈希值,但是因為哈希的不可逆性,運營商本身也無法知道真正的密碼是多少,而用戶下次登陸輸入密碼後將密碼的明文進行哈希以後發送給運營商,運營商通過對比保存的密碼哈希來確認身份。
    • 哈希還可以用於確認郵件是否被惡意篡改,方法為,在一段信息的後面加上一個特定的字符串,對整個文本進行哈希加密,然後將哈希的值的前幾位加在文本後面。文本接收方把收到的文本後面加上特定字符串後進行哈希,如果文本被惡意篡改過,哈希值的前幾位會不同

      WEEK 9

      Securing Web Connections

  • public key encryption(公鑰加密),it relies on two asymmetric keys(依賴於兩個不對稱的鍵).There is a public key, which is actually, does not need any protection whatsoever, and a private key(私鑰).You generate the public key and the private key. You send out the public key, the public is used to do the encryption. And then private key is used to do the decryption. And they‘re related mathematically(在數學上是相關的)
  • if you‘re going to use public private key encryption, you have to generate a pair.(公鑰私鑰必須成對存在)
  • choose a random number really big-->look around for a nearby prime number and you choose two of those(選擇兩個附近的質數)-->multiply them-->through some calculations, you compute the public and the private keys from that large number.
  • 破解公鑰加密的難點在於,很難計算出一個很大的數是由哪兩個也很大質數相乘得到的,而文件的接收方由於知道其中的一個質數,解密起來非常簡單。
  • Message was encrypt by application protocols(such as HTTP).it stay encrypted all the way through the entire network.all of the sequencing and re-transmission that happens in the TCP layer(所有的排序和傳輸都發生在TCP層).The rest of the internet just move the data.
  • Transport Layer Security(SSL、HTTPS):it‘s between the TCP layer and the application layer.

    Identity on the Web

  • Secure Socket Layer, an public private key encryption.
  • 在TCP層和application層之間的SSL層是一個為安全提供保障的部分,為網絡連接提供安全的網絡接口。運用了SSL的超文本傳輸協議就是HTTPS。SSL後來進化為TLS。
  • the certificate authority which is a trusted, third-party that signs these certificates(受信任的證書頒發機構,第三方簽署了證書,以確認對話的對象是不是真正的服務器)

Coursera:Internet History ,Techornology and Security