前言

Coursera 的 Internet History,Technology,and Security 进入最后一周的学习了,在这最后一周内,需要进行的内容是 public-key 公钥系统的讲解 和 一些改进。随着课程的结束,这个暑假也接近尾声了,回想已经结束的暑假生活,是充实而又有意义的,是一个很令人难忘的暑假。
初识这门课程,以 生动的历史 开篇,随后切入 并不乏味的 技术介绍篇,最后以对 网络安全 这一相对其它而言 “新兴” 的方向的介绍收尾。主讲人Chuck幽默风趣,从例子中学习知识巩固知识,并且伴随着每一个单元的课程考试来回顾与复习,不失为一种好的学习方法。

Public Key Encryption & Confidentiality

Review: Terminology

Confidentiality

  • Prevent unauthorized viewing of private information.

Integrity

  • Information is from who you think it is from and has not been modified since it was sent.

Public Key Encryption

Proposed by Whitfield Diffie and Martin Hellman in 1976.
Public-key cryptosystems rely on two keys which are mathematically(精确地) related to one another. Also called asymmetric-key(不对称的,与密钥相反) cryptosystem.
One key is called the public key and is to be openly revealed to all interested parties.
The second key is called the private key and must be kept secret.

在之前的课程中,在密钥的内容中,提到了利用digest和shared secret来验证数据的安全性(Integrity),通过计算SHA值(digest)然后进行比较,但是困难在于,在当今的Internet中,进行shared secret本身就是一件很困难的事情,因为中间媒介的不安全性。你不能总是把所有人“叫到一起”然后给出公共的secret。

公钥系统是需要身份认证的,它完美的解决了密钥中shared secret的问题。
不对称的密码系统:它依靠的是两个key,这两个key并不一样。跟之前的课程中,密钥用于加密和解密的key相同的机制 不一样:加密的key与解密的key不相同。
在电脑系统内部生成两个key,你向外界发送public key,public key是用于encryption加密的。而你自己保存的private key是用于解密的,加密的 public key 和解密的 private key 是紧密相关的。很难计算key的长度,因为它们都足够长。

Public key

A message encrypted by one of the keys can only be decrypted with the other key.
It is computationally(计算地) infeasible(不可执行的) to recover one key from the other.
Public-key cryptosystem solve the proble of secure key distribution because the public key can be openly revealed to anyone without weakening the cryptosystem.

public-key 是用来做加密工作的,很难从 public-key 解得 private-key,同时使用 public-key 对文本进行加密也是很困难的。
但是 很困难 并不意味着 不可能,我们在之前就提到了,除非你什么都不发送,让 发送的信息完全安全 是一件不可能的事情。
每一个人都知道破解它的方法,但是计算机计算的速度并没有那么快来得出答案,如果计算机变快了,我们需要做的只是增长密码即可。
所以 从可计算性的角度来看,破解它基本是一件基本不可能的事情。除了暴力破解它之外,没有什么好的方法来从public-key破解出private-key。

Generating Public/Private Pairs

Choose two large random prime numbers.
Mutiply them
Compute public and private keys from that very large number.

如果你想要使用公钥密码系统的话,你需要生成一个pair:随机 选择两个 非常长的素数,然后对他们进行乘法运算,得到一个更大的数字,然后经过一系列的操作,你可以从这个 巨大的数字 中获取 公钥的 public-key 和 private-key。
获取过程中最精华的部分,就是所选取的这两个素数,public-key 和 private-key 就是基于这两者找到的。

Public Key Math(light)

Some functions are easy in one directions, but in the other, not so much!
Example: What are the factors of 55124159?
If you know that one of the factors is 7919, it's also easy to find 6961!


Amazon 向用户发送了public key,中间的第三方有可能获取这个public key,用户通过这个public key加密了请求,发送给Amazon,中间的第三方也有可能截获这个请求,但是破解它相当之困难,基本接近不可能,Amazon 得到了这个数据报,并且通过 一直在自己手中从未发送的唯一对应的 secret key 解密了请求。

Secure Socket Layer(SSL) Security for TCP

我们利用这个 secret key 和 public key 的密码机制,对HTTP进行了改进,在数据模型中增加了一个小型的Layer。
HTTP 是应用层的一个协议,在应用层(application layer)和运输层(transport layer)之间,有一个小的层次:SSL。工作就是 利用公钥密码系统,加密和解密应用层传递的信息。
应用层发送的数据,都是未加密的。在TCP/IP四层模型的其他位置,比如中间的路由器,IP层,光纤等等,它们并不能区别加密的信息和未加密的信息,它们只是做了运输的工作。

Transport Layer Security(TLS) / SSL / HTTPS

Used to be called SSL and HTTPS.
Can view it as an extra layer between TCP and application layer.
It is very difficult but not impossible to break this security -normal people don't have the necessary compute resoureces to break TLS.
Encrypting and decrypting takes resources -so we use it for things when it is needed.
The IP and TCP is unware whether data has been encrypted.

我们能够看到 一个URL连接的首部 是HTTPS。

Secure Application Protocols

They are often secure and unencrypted application protocols.

  • http://www.facebook.com
  • https://www.facebook.com
    Your browser tells you when using a secure connection -you should never type passwords into a non-secure connections.
    Especially over wireless(无线) -especially at a security conference(会议)...

现在很多公司开始着手在服务器内安装安全协议,尽管这很昂贵。作为用户的我们需要注意的是,不要在没有使用https的URL链接的网页中 输入一些敏感的信息(比如密码)。一定要确保这样做。

但是我们仍然有可能丢失我们的数据:
(1)有病毒入侵了你的laptop,记录下了你的密码或者其他的信息。
(2)第三方欺骗了你,使你误以为第三方是你要发送的目的地,并向第三方发送数据报。

2016/8/13

【Coursera】Security Introduction -Ninth Week(1)的更多相关文章

  1. 【Coursera】Security Introduction -Ninth Week(2)

    对于公钥系统,我们现在已经有了保证它 Confidentially 的一种方法:SSL.SSL利用了公钥的概念. 那么 who we are talking to? Integrity Certifi ...

  2. 【Coursera】Security Introduction -Eighth Week(1)

    Security Introduction People With Bad Intent 今天,Bob 向 Alice 发送了一条 "Hello,Allice!" 的信息,他们希望 ...

  3. 【Coursera】Security Introduction -Eighth Week(2)

    Review -Terminology(术语): Confidentiallity & Integrity 泄密 & 欺骗 Confidentiallity: Prevent unau ...

  4. 【Coursera】Security Introduction -Summary

    对这门课程的安全部分进行一个小结. 往期随笔 第八周第一节 第八周第二节 第九周第一节 第九周第二节 前言:为什么互联网要提及安全 因为security牵扯到我们每一个人,有人每时每刻都想着要偷取别人 ...

  5. 【python】An Introduction to Interactive Programming in Python(week two)

    This is a note for https://class.coursera.org/interactivepython-005 In week two, I have learned: 1.e ...

  6. 【Coursera】Seventh Week

    Application Layer:Use the services of the TCP layer Quick Review Link Layer(Ethernet):gets the data ...

  7. 【Coursera】History: Dawn of Electronic Computing学后小结

    今天学习了Coursera上University of Michigan开的互联网的历史.技术和安全课程的FirstWeek内容. 先是吐槽下这个Coursera,认证非常麻烦,PC端需要摄像头拍照. ...

  8. 【Coursera】支持向量机

    一.最大间隔分类器 1. 函数间隔:\(γ^{i} = y^{i}(w^{T} x + b)\), 改变w和b的量级,对分类结果不会产生任何影响,但是会改变函数间隔的大小.因此,直接对函数间隔求最大值 ...

  9. 【转】An introduction to using and visualizing channels in Go

    An introduction to using and visualizing channels in Go 原文:https://www.sohamkamani.com/blog/2017/08/ ...

随机推荐

  1. sql server 基本问题解决思路

    1.数据库故障排查步骤,如何处理紧急数据库问题;首先根据报错信息找到故障原因.然后实施对应的解决方案.2.SQL调优步骤,如何来判断SQL语句存在问题,怎么定位问题,如何解决这些问题:可以建立一个Pe ...

  2. 帝国cms栏目别名怎样调用?栏目名称太短了

    在用帝国cms创建栏目时一般会填写栏目名称(较短)和栏目别名(为空则与栏目名相同),栏目别名可以设置长一些作为栏目标题,可是如何调用帝国cms栏目别名呢?默认的模板标题调用是<title> ...

  3. hdu1542 Atlantis(矩阵面积的并)

    这个题算是我的第一个扫描线的题,扫描线算是一种思想吧,用到线段树+离散化.感觉高大上. 主要参考了这位大神的博客. http://www.cnblogs.com/kuangbin/archive/20 ...

  4. 单利模式及python实现方式

    单例模式 单例模式(Singleton Pattern)是一种常用的软件设计模式,该模式的主要目的是确保某一个类只有一个实例存在.当希望在整个系统中,某个类只能出现一个实例时,单例对象就能派上用场. ...

  5. Winter Storm Warning

    2019-01-02 11:22:33 ...WINTER STORM WARNING REMAINS IN EFFECT UNTIL 6 AM AKST TUESDAY... * WHAT...He ...

  6. 7.MySQL必知必会之用通配符进行过滤-like

    用通配符进行过滤-like 1. like操作符 先说两个概念:

  7. http-equiv制作跳转欢迎页面

    做网站嘛,没有个欢迎页面肿么能忍? 要忽悠下浏览者的嘛. 然后此处省略一万字... 目的:不需要其他的脚本,直接在meta中控制时间,跳转页面 原理很简单: < meta http-equiv= ...

  8. 常用jquery记录

    1.jquery easing jQuery Easing是一款比较老的jQuery插件,在很多网站都有应用,尤其是在一些页面滚动.幻灯片切换等场景应用比较多.它非常小巧,且有多种动画方案供选择,使用 ...

  9. nginx安装,反向代理配置

    1.centos 版本 下载最新稳定版 https://www.nginx.com/resources/wiki/start/topics/tutorials/install/# 2.执行语句: ./ ...

  10. linux下安装vsftp(二)

    安装vsftpd 1.以管理员(root)身份执行以下命令 yum install vsftpd 2.设置开机启动vsftpd ftp服务 chkconfig vsftpd on 3.启动vsftpd ...