非RSA TLS1.2分组解密 [英] Non-RSA TLS1.2 Packet decryption

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

问题描述

我正在尝试解密pcap文件。该pcap文件包含HLS加密视频流的捕获。 pcap包含TLSv1.2数据包。



以下是pcap文件中的一些信息


服务器您好消息密码套件



TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384。



EC Diffie-Hellman服务器参数:pubkey(1 )



证书状态消息:



签名散列算法散列:SHA256



签名哈希算法签名:ECDSA



客户端密钥交换邮件

EC Diffie-Hellman服务器参数: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)完成解密?

解决方案

不,在这种情况下不可能解密。这将涉及到破坏EC Diffie-Hellman。



使用 pre_master_secret c>,但是它通过从主人之前的秘密直接派生的键执行。也就是说:通过首先导出 master_secret 然后执行PRF并将输出划分为会话密钥和IV,从中派生出来的客户端和服务器解密密钥。 p>

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.

Decryption is not directly performed using the pre_master_secret but it is performed by keys directly derived from the pre-master secret. That is: the client and server decryption keys that are derived from it by first deriving the master_secret and then performing the PRF and dividing the output to the session keys and IV's.

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

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