Fw: [問題] Certificate 憑證

看板Network作者 (.)時間12年前 (2013/08/03 13:07), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
※ [本文轉錄自 Web_Design 看板 #1H_8_-WV ] 作者: sean72 (.) 看板: Web_Design 標題: [問題] Certificate 憑證 時間: Sat Aug 3 13:07:08 2013 最近在網路上看了certificate的內容 但是不是很了解 因為本身在寫python程式 所以也就參考了他上面的說明 我逐字閱讀還是有不懂得地方 我將我的問題貼在文章的前頭 希望有人能幫忙回答 謝謝 自己整理的結論: 所以憑證裡面包含的東西有 a. subject的名稱以及subject的公鑰 b. issuer裡面的資訊: 誰是subject,以及憑證裡面subject的公鑰是否正確 整串短文看完,我還是不清楚這個東西如何運作 我知道certificate是由第三方公司例如verisign所認證簽發 所以如果當我登入某家銀行的網站 那麼我的電腦就是subject,銀行的主機就是issuer這樣嗎? 那麼當我連接到銀行主機的時候,這個certificate是什麼時候飛進我和銀行之間? certificate是銀行寄給我的嗎? 如果是,銀行寄給我憑證,我打開憑證,使用裡面我(subject)的那把公鑰, 去解開我私鑰加密的訊息? 那銀行一開始怎麼會有我的公鑰? 難道我的公鑰大家都可以任意取得? Verisign如何取得我的電腦名稱以及公鑰資訊?自己整理的結論: 所以憑證裡面包含的東西有 a. subject的名稱以及subject的公鑰 b. issuer裡面的資訊: 誰是subject,以及憑證裡面subject的公鑰是否正確 整串短文看完,我還是不清楚這個東西如何運作 我知道certificate是由第三方公司例如Verisign所認證簽發 所以如果當我登入某家銀行的網站 那麼我的電腦就是subject,銀行的主機就是issuer這樣嗎? 那麼當我連接到銀行主機的時候,這個certificate是什麼時候飛進我和銀行之間? certificate是銀行寄給我的嗎? 如果是,銀行寄給我憑證,我打開憑證,使用裡面我(subject)的那把公鑰, 去解開我私鑰加密的訊息? 那銀行一開始怎麼會有我的公鑰? 難道我的公鑰大家都可以任意取得? Verisign如何取得我的電腦名稱以及公鑰資訊? http://docs.python.org/3.3/library/ssl.html#certificates Certificates in general are part of a public-key / private-key system. In this system, each principal, (which may be a machine, or a person, or an organization) is assigned a unique two-part encryption key. One part of the key is public, and is called the public key; the other part is kept secret, and is called the private key. The two parts are related, in that if you encrypt a message with one of the parts, you can decrypt it with the other part, and only with the other part. 每台機器都會有一把"公鑰" 一把"私鑰",如果你用其中一把鑰匙去加密,就得用另 外一把相對應的鑰匙去解密 (但是他沒說要用"哪一把"去加密,不過從下文推斷 應該是用私鑰加密公鑰解密 但是說不定也能反其道而行?) A certificate contains information about two principals. "憑證"包含兩台機器的訊息 It contains the name of a subject, and the subject’s public key. 憑證包含了某台機器(subject)的名稱以及他的公鑰 It also contains a statement by a second principal, the issuer, that the subject is who he claims to be, and that this is indeed the subject’s public key. 另一台機器(issuer)有下面兩個資訊: 1.誰是subject, 2.以及憑證裡面subject的公鑰是否正確 憑證除了上述subject以及subjet公鑰以外,另外也包含issuer裡面的這份資訊 The issuer’s statement is signed with the issuer’s private key, which only the issuer knows. Issuer的資訊被issuer的私鑰加密過了 However, anyone can verify the issuer’s statement by finding the issuer’s public key, decrypting the statement with it, and comparing it to the other information in the certificate. 只要有issuer公鑰的人,都可以用issuer的公鑰去解密issuer的資訊,去驗證,然後比較 憑證裡面有關issuer的資訊以及issuer本身的資訊 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 172.249.127.149 ※ 發信站: 批踢踢實業坊(ptt.cc) ※ 轉錄者: sean72 (172.249.127.149), 時間: 08/03/2013 13:07:25
文章代碼(AID): #1H_90EKz (Network)
文章代碼(AID): #1H_90EKz (Network)