電訊茶室's Archiver

角色 發表於 2019-4-18 01:58

Brief introduction of SSL/TLS certificates and keys for beginners

[i=s] 本帖最後由 角色 於 2019-4-18 02:05 編輯 [/i]

如果你第一次接触SSL/TLS certificates and keys,真的给它们搞到你头都大,里面出出现很多terms,例如什么叫certificates,什么叫keys,还有public keys,private keys等等一大推问题,希望用这个章节去简单讲解一下那么怎样用。

还有我会搜集一些文章方面大家去理解这个问题。

角色 發表於 2019-4-18 02:06

[i=s] 本帖最後由 角色 於 2019-4-18 02:40 編輯 [/i]

SSL/TLS简介

SSL/TLS都是一样的东西——加密和解密。SSL是早期的协议和TLS在SSL后出现的产品 [1]。


References:
[1] [url]http://www.steves-internet-guide.com/ssl-certificates-explained/[/url]
[2] [url]https://en.wikipedia.org/wiki/Transport_Layer_Security[/url]
[3] [url]https://computer.howstuffworks.com/encryption4.htm[/url]

角色 發表於 2019-4-18 02:07

[i=s] 本帖最後由 角色 於 2019-4-18 23:29 編輯 [/i]

为了理解SSL/TLS,我通过一问一答方式来进行。

问题列表:
[list]
[*] 加密(encryption)and 解密(decryption)?[url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7425&pid=46753]Link[/url]
[*] Ciphers: symmetric and asymmetric [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7425&pid=46756]Link[/url]
[*] 加密方式从DES到AES [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7425&pid=46754]Link[/url]
[*] Hashing [url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7425&pid=46757]Link[/url]
[*] Public and private keys是什么和有什么用?[url=http://www.telecom-cafe.com/forum/redirect.php?goto=findpost&ptid=7425&pid=46755]Link[/url]
[*] SSL/TLS是什么?
[*] Certificates是什么?
[*] 什么时候CA?
[*] 什么叫certificate and key pair?
[*] Father of modern cryptography
[/list]

角色 發表於 2019-4-18 11:38

[i=s] 本帖最後由 角色 於 2019-4-19 01:42 編輯 [/i]

加密(encryption)and 解密(decryption)?

从加密信息历史里[1,2,3],就知道信息要加密才能不然敌方知道自己的计划。

最初Internet发源于美国的大学,每所大学的电脑之间怎样连起来呢?那么在那里时候Internet的雏形就出来,名称当然不是用Internet,而是用别的名字,当大家之间都连起来后,发现挺好用的,那么大家都用,那么每一处的网net都连起来inter-net,那么变成现在的Internet,因为那个时候都是美国本土用,所以32-bit IP address就够用了。

那个时候电脑之间传送资料中,很多都是以text模式进行,而世界上有好人和坏人,全都是好人那么传送就算让他们看都没有所谓,但是实际上这个世界是有坏人的(hacker),他们会偷取你的信息,那么我们怎样办呢?

那个时候就出现信息加密(encryption),“真正”对方会用解密方法去解密(decryption)。这个问题在摩斯电报码也有出现,但是那个时候加密和加密都比较简单。

References:
[1] [url]https://www.gemalto.com/review/Pages/a-brief-history-of-encryption.aspx[/url]
[2] [url]https://en.wikipedia.org/wiki/History_of_cryptography[/url]
[3] [url]https://searchsecurity.techtarget.com/Understanding-encryption-and-cryptography-basics[/url]

角色 發表於 2019-4-18 14:25

[i=s] 本帖最後由 角色 於 2019-4-18 22:46 編輯 [/i]

加密方式从DES到AES

最早期的加密方式就用DES(Data Encryption Standard)[1],大约到1999年附近,改用了AES (Advanced Encryption Standard)[2]。应该这样说老式的加密(解密)方法DES已经不用了,但是你可以在很旧的routers都能看见它的踪影。现在新的家里大部分都才采用AES方式,有的routers更加hardware accelerator for AES algorithm.

References:
[1] [url]https://en.wikipedia.org/wiki/Data_Encryption_Standard[/url]
[2] [url]https://www.geeksforgeeks.org/difference-between-aes-and-des-ciphers/[/url]

角色 發表於 2019-4-18 16:03

[i=s] 本帖最後由 角色 於 2019-4-19 16:19 編輯 [/i]

Public and private keys是什么和有什么用?

如果你用到加密,这两种keys(public and private keys)经常会出现,他们是设么?怎样用?

例如有两个人Bob and Alice,如果Bob想send一些information给Alice,Bob先问Alice取得Alice的public key,Bod用Alice的public key对information加密,然后encrypted information到Alice手里,她用她的自己private key去解密(decrypt)encrypted information,那么Alice就可以看到Bob放过的information。

因为加密用public key和解密用private key,两条keys都不一样,所以这种方式称为Asymmetric cryptography

大家是否想过,Bob怎样取得Alice的public key呢?还有public and private keys怎样取得呢?

References:
[1] [url]https://searchsecurity.techtarget.com/definition/asymmetric-cryptography[/url]

角色 發表於 2019-4-18 16:39

[i=s] 本帖最後由 角色 於 2019-4-18 16:49 編輯 [/i]

Ciphers: symmetric and asymmetric

Cipher就是对data进行加密和解密[1]。

Ciphers分两类:

1. Symmetric key algorithms (Private-key cryptography, symmetric ciphers), where the same key is used for encryption and decryption, and

2. Asymmetric key algorithms (Public-key cryptography, asymmetric ciphers), where two different keys are used for encryption (with public ciphers) and decryption (with private ciphers).

Reference:
[1] [url]https://en.wikipedia.org/wiki/Cipher[/url]

角色 發表於 2019-4-18 23:26

Hashing

我们用Alice and Bob,如果我们还没有发送时所以所有数据经过一个系统(数学function)然后出现一串的数字(bit size都是一样,这个string就是这些数据的fingerprint (hashing value),如果中间有一个或者多个变动,这个data的fingerprint就会不一样。需要再从新发过来,直到hashing value是一致后,再把data送到解密。

Reference:
[1] [url]https://en.wikipedia.org/wiki/Cryptographic_hash_function[/url]

頁: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.