This chapter covers the basics of encryption, which essentially is the mathematical concatenation of data with a key. This chapter sets the foundation of the topics to follow.
这个章节涵盖了基本加密学知识,本质上就是基于数学理论的一种关联

The basic concept of encryption is simple. Cryptography attempts to take unencrypted (clear text) data and mathematically manipulate it to create encrypted ciphertext.

加密的本义:就是把明文的数据使用加密算法变成密文

___________________________________________________________________________________________________________________________________________________

The core concepts of confidentiality, integrity, authenticity, and nonrepudiation are integral to all schemes of encryption.

所有设计的加密体系都包含私密性、完整性、authenticity、和不可否认性。注:(authenticity字面理解为真实性,有的叫源认证(data origin authentication )。而在一些书中理解为高可用性confidentiality, integrity, availability ) 而高可用性是不太对的,Authenticity and Nonrepudiation 这两个总是在一起提出的;Authenticity 做为Nonrepudiation 的一个必要条件,但是并不充分,也就是达到不可否认还不够。Authenticity and nonrepudiation both involve identification as a way to protect data.这两个在一起保护数据需要涉及到身份识别。在ipsec里HMAC是(数据+key)来做hash,实际上是一种真实性的认证,但是却达不到一种不可否认的级别。试想别人也得到了这个key呢。
PKI’s objective in IPsec is to provide the best methods for authenticity and nonrepudiation 相对于IPsec ,PKI 对于 authenticity and nonrepudiation 可以提供更好的方法。

回顾一下:一份数据做了加密了,而且也把数据做了hash了(可以理解为hash就是完整性,完整性的定义就是数据部分那怕改一个标点符号,最后hash的结果也会不同),通过网络发送到你的手里,你如何确定是你认识的人发的。这里也就涉及到了身份识别。。。看这句话Authenticity and nonrepudiation both involve identification as a way to protect data.

在IPSEC vpn中,我们双方通过设置相同的key来标识对方。而更好的方式是PKI的数字证书和签名。可以这样说,如果有人伪造了你的数字签名,发生了法律纠纷,那么向你发送数字签名的第三方机构是要付法律责任的。

这里又谈到了三个关键词:PKI和数字证书和数字签名

PKI是公共密钥基础架构public key Architecture的简称,Authentication is the principal application of most PKI solutions.PKI解决方案最重要的就是解决了认证的问题。要提到PKI的理论基础是非对称加密算法,而对称加密算法的另一个应用在于密钥交换方面,是对称加密算法才是用于实际数据加密。比如在ipsec vpn的phase 1阶段通过非对称加密算法协商出SKE-ID,那么之后的实际数据加密的密钥就是SKE-ID衍生出来的。而绝不是我们敲得pre-share key。还记得pre-share key的用途吗,那是用于authenticity。

换一种说法非对称加密算法提供了PKI的理论基础,而PKI的主要作用就是认证。那么推导出非对称加密算法的一种用途就是认证

非对称加密算法另一种用途就是密钥交换。他不用于加密实际数据,不是不能,而是加密实际数据弊端实在太多。

 

_____________________________________________________________________________________________________________________________________________________