Introduction to cryptography

cryptography & encription

cryptography 和 encription都是指加密,密码,但是这两个概念使用起来有点差异。

cryptography是“研究秘密写的科学”,是指安全系统,密码系统,概念的范围更大。

encription是加密,用算法加密,是指一个动作。往往是指“将明文,通过某种算法以后,得到密文”

密码系统关注的三个核心问题

  1. 机密性(confidentiality)

    保证数据或者信息的安全,所以需要对机密信息进行加密,形成密文(ciphertext)以后再保存或者传输,及时被泄露,窃取了。

    这样,及时被泄露,窃取了,窃听者也得不到明文(plaintext),或者在短时间内得不到明文。

  2. 身份验证(identity)

    在涉及机密信息传输的过程中,通信一方必须要能确定和他通信的另一方,就是他想要的一方,而不是一个伪装人。

  3. 安全传输、保证完整性(integrity)

    数据传输的过程中,接收一方得到的信息有可能被篡改,所以必须要有办法验证消息是否被篡改。

加密算法

对称加密(Symmetric key cryptography)

对称加密是指加密、解密秘钥相同。常用的对称加密方法有 1)流式加密,对明文的每一个字节和秘钥进行运算,得到密文。
2) 块式加密,对明文的某几个字节作为一个单位,和秘钥进行运算,得到密文。

常用的对称加密算法:DES,3DES,AES

公钥加密(Public key cryptography)或非对称加密(asymmetric cryptography)

加密的秘钥(一般称作公钥)和解密的秘钥(一般称作私钥)不相同。公钥往往是对外公开的,大家都可以拿到;私钥是不公开的,需要秘密保存的。

如果想给某人发消息,用其公钥加密原文,只有和此公钥配对的私钥才能解密此消息。

由于公钥加密对原文的长度有限制,所以公钥算法一般用做秘钥(key-exchange)交换和数字签名(Digital signatures)。

常用的公钥加密算法:RSA, Diffie-Hellman

Public-key Infrastructure

有了公钥加密算法,在不安全的通信环境下,可以安全的交换秘钥了。然而,通信两端在没有见面的情况下,怎么确认通信的另一方是靠谱的呢?
Internet PKI就是通过CAs(Certificate Authorities)来解决这个问题的。

   +----------+  Request certificate issuance(CSR)  +-----+          CSR          +----+
   |Subcriber |------------------------------------>| RA  |---------------------->| CA |  
   +----------+     Certificate signed              +-----+    Certificate signed +----+
        |                                      Validate subcriber's                  |
        |                                              identity                      |
        |Publish                                                                     |
        |certificate                  +---------------------------------+------------+
        |                             |                                 |
        V                             V                                 V
   +------------+              +------------+                  +----------------+
   | Web Server |              | CRL Server |                  | OCSP Responder |
   +------------+              +------------+                  +----------------+
          ^ |                      ^                                    ^
    1.Req | |2. Verify             |                                    |
    Cert  | | Signature            |                                    |
          | V                      |                                    |
   +---------------+               |                                    |
   | Relying Party |---------------+------------------------------------+
   +---------------+ 3. Check for revocation
Subcriber

准备提供安全服务的个人或者组织,往往需要向CA申请一个证书(certificate).

Registration authority

本地注册机构,对申请证书的用户,就行资料审核,确认等。是CA多分支组织架构中的一个分支结构。

Certification authority

证书颁发机构,是值得大家信任的一个组织。提供证书发行,管理,吊销等服务。目前的CA有很多。

Relying party

证书消费者,比如浏览器,操作系统,以及一些其他终端软件。

X.509

x.509是PKI的国际标准。PKI x.509工作组叫PKIX, 目前发布的主要标准文档是RFC 5280

Certificate

证书就是一个数字文档,包含了证书申请人的公钥,相关身份信息,已经证书签发机构的数字签名。

Certificate Chains

证书的签发只是经过一级签发机构,在安全上,管理上都存在很多问题。所以,证书一般会经过多级证书签发。

及,终端用户的证书是经过中间很多CA签发的,这样就形成了一个证书链。

形成证书链的原因:

  1. 保证根证书的绝对安全

    如果用根证书直接签发用户证书,一旦根证书秘钥泄露,那么所有被签发的证书都有了安全问题。这样吊销证书,重新发布都会遇到困难。

  2. 交叉认证(Cross-certification)

    重新发布CA,如果重新创建自己的Root key,是比较困难的。往往是通过知名的CA来签发自己的CA。

  3. 多分支机构(Compartmentalization)

    一个CA可以在不同地方设立多个下级CA,这样可以方便、高效的展开工作。

  4. 委派

    一个CA可以委派其他机构进行正式发布。

吊销(Revocation)
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
本书翻译原文来自美国PGP安全软件公司的产品PGP Desktop 9.9.0软件包中的Jon Callas在 2006年所著《An Introduction to CryptographyIntro To Crypto.pdf(CRC-32:79EE7FEF))》,原文的意旨在于使所有普通人都可以看懂这本关于密码学的书籍,经过翻译和改编,所以本书的文字简单,适合初学者阅读。内容从密码学的历史到密码学在现实生活中的应用,而且书中没有深入讨论任何专业性的问题,也不会讨论算法的细节,否则不少人会看不懂,最多的就是一个名字、一个概念,也可能是一个简单的数学知识。有兴趣的人可以从你感兴趣的方面深入的了解密码学。原作者是处在美国的法律环境,美国的法律更新和加密技术发展一样快,文章内众多法律名称也为我们了解美国关于密码技术的法律做了介绍。 Cryptography在英语中是密码术、密码学的意思,外国人认为的“密码”一词是个动词,意味加密,也就是加密数据,他们强调的是这个过程,中国人称的“密码”是开启秘密的那个口令码,它是使用密钥文件的钥匙。所以,外国人用词更加精确。其实“密码学”原义是包含数据加密和数据解密2个过程,而从中文字面上看就误解成了研究破解密码的一种学问,认为研究密码学的都是在破译密码,不完全对。破解密码的学问叫做:密码分析学! 注释中有大量本人的“非官方”说明,遇到不懂的请参阅注释!注释中还针对中国读者添加了一些中国的实例,推荐遇到有注释的环节都仔细看看,表达的意思可能就是另外一种。在前文出现的一些词汇你可能不是很明白,而在后面的时候,会有具体的介绍,大家要耐心看下去。原版中的尾注很不方便,我不喜欢到书籍的最后去找解释,所以我把尾注全部改为当页下方的脚注,读者可以很快找到当页里面自己想要的东西!而不是翻到书的最后,然后忘记了自己看到什么地方了!注释的链接基本都是英文内容的,也有中文的,大多是百度等一些百科网站的信息。所以我建议大家努力学习英语!推荐阅读本书的人最好具有简单的计算机知识和高等数学的底子,其实用到的地方也不是很多,你不会也不必担心,下方的脚注仔细一看就完全可以明白。这篇文档不是软件说明书,我也无法提供这过程中的细节! 翻译文章的要求是要达到信、达、雅,把一篇技术文章翻译成通俗文章很困难,把美国人的思维方式和幽默感中国化也是很困难的!为此,我都尽量的做了注明。外国人的名字就没必要翻译了,名字只是字符代号而已,这样可以使你更容易的在互联网上搜索关于他们的故事。文章语言尽可能通俗,太专业或者太“官方”会使与读者的距离变远。 附录部分并不是原书的内容,这本书出自PGP官方人员的手,在一些细节就会有特别的广告嫌疑。为了给读者一个更加宽阔的软件选择视野,我挑选了一些我认为比较可信的软件。有些文字几乎是复制粘贴上去的。因为我实在找不出更好语句来阐述它们了。 本文档可以使用PDF注释,你可以以邮件主题“加密学介绍文章交流”的电子邮件发送PDF注释文件到PDF内部的电子邮件上。我会及时更正发现的错误!也同时感谢你们对这本书的支持。
An Introduction To Cryptography<br><br>Chapter 1. The Basics of Cryptography . . . . . . . . . . . . . . . . . . . . . . . . .11<br>Encryption and decryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11<br>What is cryptography? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11<br>Strong cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12<br>How does cryptography work? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12<br>Conventional cryptography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13<br>’<br>An Introduction to Cryptography ix<br><br>Table of Contents<br>What is a passphrase? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .27<br>Key splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28<br>Technical details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .28<br>Chapter 2. Phil Zimmermann on PGP . . . . . . . . . . . . . . . . . . . . . . . . . . .29<br>Why I wrote PGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29<br>The PGP symmetric algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33<br>About PGP data compression routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .35<br>About the random numbers used as session keys . . . . . . . . . . . . . . . . . . . . .35<br>About the message digest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36<br>How to protect public keys from tampering . . . . . . . . . . . . . . . . . . . . . . . . . .37<br>How does PGP keep track of which keys are valid? . . . . . . . . . . . . . . . . . . .40<br>How to protect private keys from disclosure . . . . . . . . . . . . . . . . . . . . . . . . . .42<br>What if you lose your private key? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43<br>Beware of snake oil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43<br>Vulnerabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48<br>Compromised passphrase and private key . . . . . . . . . . . . . . . . . . . . . . . . . . .48<br>Public key tampering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49<br>Not Quite Deleted Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .49<br>Viruses and Trojan horses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .50<br>Swap files or virtual memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51<br>Physical security breach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52<br>Tempest attacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52<br>Protecting against bogus timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52<br>Exposure on multi-user systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .53<br>Traffic analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54<br>Cryptanalysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .54<br>Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57<br>Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
Review From the reviews: "The book is devoted to public key cryptography, whose principal goal is to allow two or more people to exchange confidential information … . The material is very well organized, and it is self-contained: no prerequisites in higher mathematics are needed. In fact, everything is explained and carefully covered … . there is abundance of examples and proposed exercises at the end of each chapter. … This book is ideal as a textbook for a course aimed at undergraduate mathematics or computer science students." (Fabio Mainardi, The Mathematical Association of America, October, 2008) "This book focuses on public key cryptography … . Hoffstein, Pipher, and Silverman … provide a thorough treatment of the topics while keeping the material accessible. … The book uses examples throughout the text to illustrate the theorems, and provides a large number of exercises … . The volume includes a nice bibliography. … Summing Up: Highly recommended. Upper-division undergraduate through professional collections." (C. Bauer, Choice, Vol. 46 (7), March, 2009) "For most undergraduate students in mathematics or computer science (CS), mathematical cryptography is a challenging subject. … it is written in a way that makes you want to keep reading. … The authors officially targeted the book for advanced undergraduate or beginning graduate students. I believe that this audience is appropriate. … it could even be used with students who are just learning how to execute rigorous mathematical proofs. … I strongly believe that it finds the right tone for today’s students … ." (Burkhard Englert, ACM Computing Reviews, March, 2009) "The exercises and text would make an excellent course for undergraduate independent study. … This is an excellent book. Hoffstein, Pipher and Silverman have written as good a book as is possible to explain public key cryptography. … This book would probably be best suited for a graduate course that focused on public key cryptography, for undergraduate independent study, or for the mathematician who wants to see how mathematics is used in public key cryptography." (Jintai Ding and Chris Christensen, Mathematical Reviews, Issue 2009 m) Product Description An Introduction to Mathematical Cryptography provides an introduction to public key cryptography and underlying mathematics that is required for the subject. Each of the eight chapters expands on a specific area of mathematical cryptography and provides an extensive list of exercises. It is a suitable text for advanced students in pure and applied mathematics and computer science, or the book may be used as a self-study. This book also provides a self-contained treatment of mathematical cryptography for the reader with limited mathematical background. From the Back Cover This self-contained introduction to modern cryptography emphasizes the mathematics behind the theory of public key cryptosystems and digital signature schemes. The book focuses on these key topics while developing the mathematical tools needed for the construction and security analysis of diverse cryptosystems. Only basic linear algebra is required of the reader; techniques from algebra, number theory, and probability are introduced and developed as required. The book covers a variety of topics that are considered central to mathematical cryptography. Key topics include: * classical cryptographic constructions, such as Diffie-Hellmann key exchange, discrete logarithm-based cryptosystems, the RSA cryptosystem, and digital signatures; * fundamental mathematical tools for cryptography, including primality testing, factorization algorithms, probability theory, information theory, and collision algorithms; * an in-depth treatment of important recent cryptographic innovations, such as elliptic curves, elliptic curve and pairing-based cryptography, lattices, lattice-based cryptography, and the NTRU cryptosystem. This book is an ideal introduction for mathematics and computer science students to the mathematical foundations of modern cryptography. The book includes an extensive bibliography and index; supplementary materials are available online. About the Author Dr. Jeffrey Hoffstein has been a professor at Brown University since 1989 and has been a visiting professor and tenured professor at several other universities since 1978. His research areas are number theory, automorphic forms, and cryptography. He has authored more than 50 publications. Dr. Jill Pipher has been a professor at Brown Univesity since 1989. She has been an invited lecturer and has received numerous awards and honors. Her research areas are harmonic analysis, elliptic PDE, and cryptography. She has authored over 40 publications. Dr. Joseph Silverman has been a professor at Brown University 1988. He served as the Chair of the Brown Mathematics department from 2001–2004. He has received numerous fellowships, grants and awards and is a frequently invited lecturer. His research areas are number theory, arithmetic geometry, elliptic curves, dynamical systems and cryptography. He has authored more than120 publications and has had more than 20 doctoral students.
本书翻译原文来自美国PGP安全软件公司的产品PGP Desktop 9.9.0软件包中的Jon Callas在 2006年所著《An Introduction to CryptographyIntro To Crypto.pdf(CRC-32:79EE7FEF))》,原文的意旨在于使所有普通人都可以看懂这本关于密码学的书籍,经过翻译和改编,所以本书的文字简单,适合初学者阅读。内容从密码学的历史到密码学在现实生活中的应用,而且书中没有深入讨论任何专业性的问题,也不会讨论算法的细节,否则不少人会看不懂,最多的就是一个名字、一个概念,也可能是一个简单的数学知识。有兴趣的人可以从你感兴趣的方面深入的了解密码学。原作者是处在美国的法律环境,美国的法律更新和加密技术发展一样快,文章内众多法律名称也为我们了解美国关于密码技术的法律做了介绍。 Cryptography在英语中是密码术、密码学的意思,外国人认为的“密码”一词是个动词,意味加密,也就是加密数据,他们强调的是这个过程,中国人称的“密码”是开启秘密的那个口令码,它是使用密钥文件的钥匙。所以,外国人用词更加精确。其实“密码学”原义是包含数据加密和数据解密2个过程,而从中文字面上看就误解成了研究破解密码的一种学问,认为研究密码学的都是在破译密码,不完全对。破解密码的学问叫做:密码分析学! 注释中有大量本人的“非官方”说明,遇到不懂的请参阅注释!注释中还针对中国读者添加了一些中国的实例,推荐遇到有注释的环节都仔细看看,表达的意思可能就是另外一种。在前文出现的一些词汇你可能不是很明白,而在后面的时候,会有具体的介绍,大家要耐心看下去。原版中的尾注很不方便,我不喜欢到书籍的最后去找解释,所以我把尾注全部改为当页下方的脚注,读者可以很快找到当页里面自己想要的东西!而不是翻到书的最后,然后忘记了自己看到什么地方了!注释的链接基本都是英文内容的,也有中文的,大多是百度等一些百科网站的信息。所以我建议大家努力学习英语!推荐阅读本书的人最好具有简单的计算机知识和高等数学的底子,其实用到的地方也不是很多,你不会也不必担心,下方的脚注仔细一看就完全可以明白。这篇文档不是软件说明书,我也无法提供这过程中的细节! 翻译文章的要求是要达到信、达、雅,把一篇技术文章翻译成通俗文章很困难,把美国人的思维方式和幽默感中国化也是很困难的!为此,我都尽量的做了注明。外国人的名字就没必要翻译了,名字只是字符代号而已,这样可以使你更容易的在互联网上搜索关于他们的故事。文章语言尽可能通俗,太专业或者太“官方”会使与读者的距离变远。 附录部分并不是原书的内容,这本书出自PGP官方人员的手,在一些细节就会有特别的广告嫌疑。为了给读者一个更加宽阔的软件选择视野,我挑选了一些我认为比较可信的软件。有些文字几乎是复制粘贴上去的。因为我实在找不出更好语句来阐述它们了。 发布版本: 预览版 2009.2.27 审阅版 2009.3.30 正式版 2009.4.9 文件说明: 密码学介绍(629Kb)_20090409.rar 密码学介绍(PDF-A-1A_1.43Mb)_20090409.rar 2个文件在内容上没有任何区别,公式文字没有任何的删减,体积小的文件是用于互联网传播。体积大的文件是符合PDF/A-1A标准,适合残疾人阅读的版本,同时支持互联网电子检索标准。 这个版本就是PDF-A-1A

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值