非RSA TLS1.2数据包解密 [英] Non-RSA TLS1.2 Packet decryption

查看:585
本文介绍了非RSA TLS1.2数据包解密的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图解密一个pcap文件。此pcap文件包含HLS加密视频流的捕获。 pcap包含TLSv1.2数据包。



以下是来自pcap文件的一些信息


服务器Hello message Cipher Suite:



TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384。



EC Diffie-Hellman服务器Params:pubkey )



签名哈希算法哈希:SHA256 / p>

签名散列算法签名:ECDSA



客户端密钥交换消息

EC Diffie-Hellman服务器Params:pubkey(2)


我试图关注< a href =https://wiki.wireshark.org/SSL =nofollow noreferrer>此Wireshark SSL解密教程。但它似乎只适用于RSA加密。
我已经研究了一段时间,发现此讨论。我引用了这个讨论的摘录:


有一个重要的参数:解密一个被动的
记录会话与服务器私钥的副本)仅在
密钥交换类型为RSA或静态DH时有效;与DHE和ECDHE
密码套件,你将无法解密这样的会话,即使有
知识的服务器私钥。在这种情况下,您将需要
协商的主密钥,或使用服务器私人
键来主动拦截连接


这是值得注意的,我有客户端私钥。在我的情况下,客户端是FFmpeg视频流(FFplay)。我还看了一下 TLS v1.2 RFC



我的问题:



在这种情况下可以解密吗?如果是,我需要做什么?



解密是使用客户端的私钥还是使用pre_shared_master(即Diffie-Hellman)?

解决方案

不,在这种情况下不可能解密。



是的,解密是使用 pre_master_secret 执行的,即:客户端和服务器解密密钥(通过首先导出 master_secret ,然后执行PRF并将输出分配给会话密钥和IV)。


I am trying to decrypt a pcap file. This pcap file contains a capture of an HLS encrypted video stream. The pcap contains TLSv1.2 packets.

Below are some information from the pcap file

Server Hello message Cipher Suite:

TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384.

EC Diffie-Hellman server Params: pubkey (1)

The Certificate Status message:

Signature Hash Algorithm Hash: SHA256

Signature Hash Algorithm Signature: ECDSA

Client Key Exchange Message

EC Diffie-Hellman server Params: pubkey (2)

I tried to follow this Wireshark SSL decryption tutorial. But it seems that it works only for RSA encryptions. I have been researching for a while and found this discussion. I am quoting an extract from this discussion:

There is an important parameter to mind: decryption of a passively recorded session (with a copy of the server private key) works only if the key exchange was of type RSA or static DH; with "DHE" and "ECDHE" cipher suites, you won't be able to decrypt such a session, even with knowledge of the server private key. In that case, you will need either the negotiated "master secret", or to use the server private key to actively intercept the connection

It's note worthy that I have the client private key. In my case, the client is FFmpeg video streamer (FFplay). I had a look also on the TLS v1.2 RFC.

My question:

Is it possible to do a decryption in this scenario ? If yes, what do I need to have to do so?

Is the decryption done using the client's private key or using the pre_shared_master (i.e. Diffie-Hellman) ?

解决方案

No, it is not possible to decrypt in this scenario. That would involve breaking EC Diffie-Hellman.

Yes, decryption is performed using the pre_master_secret - that is: the client and server decryption keys that are derived from it (by first deriving the master_secret, then performing the PRF and dividing the output to the session keys and IV's).

这篇关于非RSA TLS1.2数据包解密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆