Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

(Non-conformance) Stateless Cookie Exchange

Open
#259 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c

Research direction

Read the linked DTLS 1.2 RFC section 4.2.1 and inspect the attached handshake trace alongside the duplicate-packet log. Trace how TinyDTLS records and checks the initial ClientHello sequence number; done means the ClientKeyExchange record in the trace is not discarded as a duplicate and the stateless cookie exchange retains no initial ClientHello state.

Written by the indexing model from the issue text.

Description

Description
  • Type: Non-conformance Bug
  • Priority: Minor

Non-conformance Bug

Version: development branch

Expected behavior
The DTLS 1.2 RFC specifies the following requirement regarding stateless cookie exchange :

The DTLS server SHOULD generate cookies in such a way that they can be verified without retaining any per-client state on the server.

Actual behavior

TinyDTLS stores the record sequence number of the initial ClientHello and discards any subsequent records that duplicate this sequence number. However, in a truly stateless exchange, no information from the initial ClientHello should be retained. In the attached handshake trace, the record containing the ClientKeyExchange message uses the same record sequence number as the initial ClientHello. As shown in the log below, this results in the record being discarded.

stateless-cookie-exchange.zip

Log

May 15 13:08:00 INFO received message (117 bytes), starting with 'handshake', epoch 0
May 15 13:08:00 INFO handshake message epoch 0
May 15 13:08:00 INFO got 'handshake' epoch 0 sequence 0 (42 bytes)
May 15 13:08:00 DEBG dtls_handle_message: FOUND PEER
May 15 13:08:00 DEBG bitfield is ffffffffffffffff sequence base 1 rseqn 0
May 15 13:08:00 DEBG Drop: duplicate packet arrived (bitfield)```
Dominant language
C
Stars
122
Forks
67
Avg merge
6d 8h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-tinydtls/tinydtls

All issues in eclipse-tinydtls/tinydtls

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.