【Coursera】Security Introduction -Ninth Week(2)

时间:2023-03-10 01:24:20
【Coursera】Security Introduction -Ninth Week(2)

对于公钥系统,我们现在已经有了保证它 Confidentially 的一种方法:SSL。SSL利用了公钥的概念。

那么 who we are talking to?

Integrity

Certificate Authorities Integrity

服务器发送给我们的公钥,是加以签名(signed)的,被 third-party certification authority 认证(validated).

【Coursera】Security Introduction -Ninth Week(2)

我们并不是从 Coursera 得到的证书,而是从 GoDaddy 处得到的认证的证书。

GoDaddy 检查了 Coursera 的 ID,认证之后,给予private key签名。所以这是一种 确保你所交流的对象身份 的方法。

Digital Certificates

In cryptography, a public key certificate(公钥证书) (also known as a digital certificate(数字证书) or identity certificate(身份证书)) is an electronic document(电子文件) which uses a digital signature(数字签名) to bind(捆绑) a public key with an identity(使用数字签名 将一个 认证的身份/姓名 和public key捆绑在了一起) ---information such as the name of a person or an organization, their address, and so forth.

The certificate can be used to verify(核实) that a public key belongs to a individual.

举个例子,如果有一个guy来到了你的办公室,然后说,hey,我是翔翔。然后你就要指明他的身份了:hey,给我看看你的纹身。翔翔给你看了他的纹身,然后你证实了他的身份。这里的纹身就是 翔翔的 private key,就是 signature。

Certificate Authority(CA)

A certificate authority is an entity(实体) that issues(发布) digital certificates. The digital certificate certifies the ownership(所有权) of a public key by the named subject of the certificate.

A CA is trusted third party that is trusted by both the owner of the certificate and the party relying upon the certificate.

有时候,取得证书是一件很昂贵的事情,这些证书具有十分可靠的可信度。

比如我有一个网站,www.chuck.com,我在这个网站上面做一些教学的工作,因为我需要得到一些信息,所以需要申请安全的证书。我有 public key 和 private key,我向certificate authority 发送了它们,然后支付了一定的费用,然后它们返回给我了 具有可信度的 signed private key

优秀的CA证书具有很高的可信度,因此有时候取得证书是一件很昂贵的事情。为了保证这个certificate不会被第三方的人获取,CA需要一些时间来证明申请者的身份。

虽然我们花了很大的价钱购买了证书,但是CA同样也花了很大的精力来认证,防止错误地发送证书给第三方。

我们使用CA的证书来确认我们访问的对象,那么我们是怎么确认哪一个CA是我们可以相信的呢?

这取决于我们操作系统的供应商。

你的游览器和你的操作系统,为了确信的CA提前安装了public key certificates,就像Verisign。

Verisign 在它的发展过程中,以它的身份鉴证方式在多年来的实践中经受住了充分的考验,取得了众多公司的信任。

VeriSign是世界唯一一家在颁发给网站安全证书的同时对其企业真实身份进行实地考查,并进行法律认定的第三方安全认证机构。他首先保证了你交易的安全,其次保证了该网站是合法的网站。
不同的CA数字证书机构在身份鉴别上有着不同的策略,作为行业的领先者VeriSign一贯严格的身份鉴证,其身份鉴证方式在多年来的实践中经受住了充分的考验,其证书在整个互联网上拥有者极高的认知度。要想获得一张数字证书,申请者至少要提交如下资料:
1、 提交组织真实信息已证实组织是合法成立的机构
2、 提交信息以证明组织是该域名的合法拥有者,服务器证书有权使用该域名地址
3、 验证SSL服务器证书申请者作为企业的正式成员的真实身份并被组织授权申请证书

Public-Key issues

Public-Key cryptosystems have the problem of securely associating(使联系起来) a public key with an idividual.(将public key 和 个体联系起来)

I am about to type in my credit card and send it. -am I being Phished?

The remote server sent me a public key.

Should I use it? Is this really Amazon's public key?

前面我们解决了Integrity的问题:我们发送数据的对象 通过 public key 上的CA证书 证明是可靠的对象,是我们的数据想要发往的对象而不是第三方。

那么还有一个问题:怎么证明 网站发来的 public key 是真实的,或者说 不是第三方发送的?

Public/Private Key for signing

一个例子:

VeriSign 有一个public key 和 一个 private key,他们存储了private key。随后他们把 Verisign public key 交给了苹果,微软以及Linux,这些公司把 VeriSign public key 装进了你的laptop中

Amazon 此时想做一些交易,Amazon 在它的服务器中,生成了一对 Amazon public key 和 Amazon private key, Amazon private key从不离开Amazon的服务器。

然后,Amazon 把它的 Amazon public key 传送给 VeriSign,第三方可能会看见,但是没有关系,它只是public key。

在 VeriSign 的服务器内部,使用了它的 VeriSign private key 生成了摘要(digest),并且把证书和 在尾部添加了 digest 的 Amazon public key 发送给 Amazon。

【Coursera】Security Introduction -Ninth Week(2)

那么现在 Amazon 拥有的不是以前的 Amazon public key 了,它现在是 被 VeriSign 证明(通过digest) 的 Amazon public key,也就是说,之前 Amazon 把它的 public key 发送给 VeriSign, Verisign 对它进行了签名(也就是身份验证),使得第三方很难去伪造它。

【Coursera】Security Introduction -Ninth Week(2)

经过了很长的一段时间,你想在你的laptop上面登录 Amazon 购买一些鞋子。

Amazon 把带有 CA证书 和 digest 的 Amazon public key 发送给你,那么此时你拥有的是 从你购买电脑的那一刻起,安装在你电脑里面的 VeriSign public key,通过这个 Verisign public key 和 Digest 你验证了 Amazon public key 是经过 Verisign 认证的,那么也就是说,这个 Amazon public key 确实是 Amazon 发送过来的。

注意:附在 Amazon public key 之后的 digest 是在 Verisign 处 使用 Verisign 的 private key 形成的。

【Coursera】Security Introduction -Ninth Week(2)

所以,我们通过这个 Verisign 验证(digest)的 Amazon public key 证实了 它确实是从 Amazon 发送过来的。

这一次,通过发送过来的 Amazon public key (附着digest) 和 CA证书,我们证明了:

  • 这个发送过来的 public key 确实是 Amazon 发送过来的。
  • 因为有这个 Verisign 认证的 CA证书,我们可以放心的把我们的信息 通过发送过来的 Amazon public key 加密之后,发送给 目的地 而不是第三方。

接下来的事情,我们可以放心的用 发送过来的 Amazon public key 加密我们的信息(因为我们通过 Verisign 的 digest 验证了这个 public key 的安全性),然后发送给目的地 而不必担心目的地是虚假的(因为CA证书)

Amazon 收到了你用 Amazon public key 加密的 暗文,随后 Amazon 使用 从未离开的 Amazon private key 对 暗文 进行解密。得到了想要的信息。

第三方一直在监视这些过程,但是没有办法(或者说好的方法)来破解public key(之前提到的 large prime 得到因子是一件很困难的事情),所以这些过程真的是非常的精彩和智慧。

小结:

CA 和 SSL 解决了一大堆 非常有价值的 信息安全问题。

Message Confidentially / Message Integrity

Encrypting / Decrypting

Message digest and message signing

Shared secret key / Public Private key

【Coursera】Security Introduction -Ninth Week(2)

2016/8/14