ssl - TLS 1.2 SHA384 : What should be the length of verify_data in "Finished" message?

标签 ssl encryption pcap rfc

在我研究这个问题时遇到的很多例子中,都提到了 length = 12。

但是:

根据 RFC,verify_data 长度在版本中始终为 12。但是,在 TLS 1.2 中,长度可能会更长 - 取决于密码套件。

    struct {
              opaque verify_data[verify_data_length];
          } Finished;

          verify_data
             PRF(master_secret, finished_label, Hash(handshake_messages))
                [0..verify_data_length-1];

In previous versions of TLS, the verify_data was always 12 octets
      long.  In the current version of TLS, it depends on the cipher
      suite.  Any cipher suite which does not explicitly specify
      verify_data_length has a verify_data_length equal to 12.  This
      includes all existing cipher suites.  Note that this
      representation has the same encoding as with previous versions.
      Future cipher suites MAY specify other lengths but such length
      MUST be at least 12 bytes.

verify_data 定义为使用某种算法的 PRF。据我所知,根据 rfc4868,当使用 SHA384 时,PRF 输出长度将为 48 而不是 12。

   PRF-HMAC-SHA-384 = afd03944d84895626b0825f4ab46907f
                      15f9dadbe4101ec682aa034c7cebc59c
                      faea9ea9076ede7f4af152e8b2fa9cb6

我还记录了一个使用SHA384的SSL流的PCAP,verify_data长度为12:

cipher in server hello

finished message

使用 SHA384 时,完成消息的结构和长度应该是什么?

谢谢!

最佳答案

discussion是关于这个问题。 您可能会觉得它很有趣,但我看不到您的问题的答案。

关于ssl - TLS 1.2 SHA384 : What should be the length of verify_data in "Finished" message?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33747600/

相关文章:

python - 如何使用python计算pcap文件中tcp重传的次数?

c - libpcap 数据包嗅探 流量分析

docker - 通过 microk8s 获取 "x509: certificate signed by unknown authority"

c - Http POST..为什么不打印任何内容?

c++ - Firefox 在使用 https 异常时重定向我

c - 替换密码在 C 程序中给我相同的文本

mysql - mysql 中 AES_ENCRYPT 后无法进行 AES_DECRYPT

java - JAVA中的TEA加密

ssl - 是否可以在 Windows Azure 上拥有一个具有多个域和 SSL 证书的 Web 角色?

ssl - 在 Kafka 上启用 SSL