我想检查一些代码,看看如何安全的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