[D]TLS: ECHDE_PSK is not decoded
Summary
Wireshark doesn't decrypt DTLSv1.2 Application Data. This is CoAP traffic between mbedtls 2.28.8 client and gnutls 3.7.6 server. Capture starts at beginning of session. the session is established and CoAP communication ensues.
Steps to reproduce
- load attached .pcapng
- set DTLS PSK to
c5a71e45665c3c7a11a8255863954e8c2cd1031f5122a7196d8a73963ba481e1
- inspect "Application Data" packet
What is the current bug behavior?
DTLS payload (CoAP) isn't decrypted
Datagram Transport Layer Security
DTLSv1.2 Record Layer: Application Data Protocol: Constrained Application Protocol
Content Type: Application Data (23)
Version: DTLS 1.2 (0xfefd)
Epoch: 1
Sequence Number: 7
Length: 96
Encrypted Application Data: 00b5764a997281d129144764575798316f839115217d5b88561c50fe05e9fcfc56a0b5c58ae30ac9c283db60cadabe1799ec070a36e1aa64e20b08b3773384e97bac3d51599846242d738747aabd7c7e6a603727c3ed0bb073746339ad45c215
[Application Data Protocol: Constrained Application Protocol]
dtls.log complains about missing client random:
ssl_generate_pre_master_secret: found SSL_HND_CLIENT_KEY_EXCHG, state 16
ssl_generate_pre_master_secret: not enough data to generate key (required state 17)
however, it looks like random is sent in packet No. 1:
Datagram Transport Layer Security
DTLSv1.2 Record Layer: Handshake Protocol: Client Hello
...
Handshake Protocol: Client Hello
...
Random: 662d453c888cace43b82d67245397cd88468d73650e070c986a5649dea14cc0e
What is the expected correct behavior?
DTLS payload is decrypted
Sample capture file
Relevant logs and/or screenshots
Build information
Version 4.2.4 (v4.2.4-0-g1fe5bce8d665).
Compiled (64-bit) using Microsoft Visual Studio 2022 (VC++ 14.37, build 32822),
with GLib 2.78.0, with Qt 6.5.3, with libpcap, with zlib 1.3.0, with PCRE2, with
Lua 5.2.4 (with UfW patches), with GnuTLS 3.8.3 and PKCS
#11 (closed) support, with Gcrypt 1.10.2-unknown, with Kerberos (MIT), with MaxMind, with nghttp2 1.57.0, with nghttp3 1.0.0, with brotli, with LZ4, with Zstandard, with Snappy, with libxml2 2.11.5, with libsmi 0.5.0, with QtMultimedia, with automatic updates using WinSparkle 0.8.0, with AirPcap, with Minizip, with binary plugins.
Running on 64-bit Windows 10 (22H2), build 19045, with Intel(R) Core(TM) i5-9400 CPU @ 2.90GHz (with SSE4.2), with 48999 MB of physical memory, with GLib 2.78.0, with Qt 6.5.3, with Npcap version 1.72, based on libpcap version 1.10.2-PRE-GIT, with PCRE2 10.42 2022-12-11, with c-ares 1.27.0, with GnuTLS 3.8.3, with Gcrypt 1.10.2-unknown, with nghttp2 1.57.0, with nghttp3 1.0.0, with brotli 1.0.9, with LZ4 1.9.3, with Zstandard 1.5.2, without AirPcap, with dark display mode, without HiDPI, with QPA plugin "windows", with LC_TYPE=English_United States.utf8, binary plugins supported.