我想檢查一些代碼,看看如何安全的SSL/TLS連接,但我不知道如何確定這一點。確定SSL/TLS加密?
代碼使用這些參數創建的證書:
makecert
"-pe -n ""CN=certificatename"" -ss my -sr LocalMachine -a sha1 -sky exchange -eku 1.3.6.1.5.5.7.3.1 -in ""certname"" -is my -ir LocalMachine -sp ""Microsoft RSA SChannel Cryptographic Provider"" -sy 12 ""certificatefilename.cer"""
當客戶端連接它創建一個這樣的sslStream:
sslStream.AuthenticateAsServer(SocketServerClass.serverCertificate, False, SslProtocols.Default, False)
的任何信息將是巨大的,以確定有關細節位大小和安全方法。謝謝!
UPDATE:
我看着sslStream如你所說連接時,得到了這樣的:
CipherAlgorithm = AES128 {26126} CipherStrength = 128 HashStrength = 160 KeyExchangeAlgorithm = RsaKeyX {41984} KeyExchangeStrength = 1024 SslProtocol = Tls {192}
這有多安全? 「軍事」等級?
你的意思是認爲像'SslStream.CipherAlgorithm' http://msdn.microsoft.com/en-us/library/system.net.security.sslstream.cipheralgorithm.aspx和'SslStream.CipherStrength' http:// msdn.microsoft.com/en-us/library/system.net.security.sslstream.cipherstrength.aspx? – 2013-03-22 16:35:31
你如何評估安全級別? 「軍事」級別的TLS通信是什麼意思? – 2013-03-22 18:03:48
同時請記住,TLS可能會在每個會話中就不同的密碼細節進行協商,並且可能會爲每個連接的服務器設置不同的密碼細節。 TLS支持未加密的連接。 – 2013-03-22 18:06:07