Skip to content

Kad/client UDP encryption preference gating needs Release 1 compatibility proof

Summary

Client UDP send encryption is now gated by thePrefs.IsCryptLayerEnabled(). That may be intentional, but it is protocol-adjacent and can affect Kad, LowID, buddy, callback, or peer UDP interoperability when global crypt settings are disabled.

This blocks Beta 0.7.3 until the behavior is either proven compatible or adjusted with a narrow documented exception.

Evidence

  • srchybrid/ClientUDPSocket.cpp:449 gates outgoing UDP encryption overhead on thePrefs.IsCryptLayerEnabled().
  • srchybrid/ClientUDPSocket.cpp:513 stores newpending->bEncrypt only when the global crypt layer is enabled.
  • The branch diff from release/v0.72a-community shows this as a behavior change from the older Kad/key condition.

Execution Plan

  1. Revalidate the intent of BUG-016 and the current client UDP encryption gating against legacy eMule behavior.
  2. Build a focused regression matrix:
  3. crypt enabled, ED2K UDP peer packet
  4. crypt enabled, Kad UDP packet
  5. crypt disabled, ED2K UDP peer packet
  6. crypt disabled, Kad UDP packet
  7. LowID callback/buddy path where available
  8. Compare against release/v0.72a-community where the existing harness can produce meaningful parity evidence.
  9. If compatibility is broken, restore the previous Kad-specific behavior with a narrow code comment and regression test.
  10. If compatibility is not broken, record the proof in this item and the Beta 0.7.3 execution plan.

Acceptance Criteria

  • Beta 0.7.3 has explicit evidence for Kad/client UDP behavior with crypt enabled and disabled.
  • Any intentional behavior change is documented and covered by tests.
  • LowID and callback paths are not regressed.

Validation

  • 2026-05-08: Done in app commit 2ee49ab and test commit 2d5cc1a.
  • python -m emule_workspace validate --workspace-root .
  • python -m emule_workspace build app --workspace-root . --config Release --platform x64 --variant main
  • python -m emule_workspace build tests --workspace-root . --config Release --platform x64 --test-run-variant main
  • repos\emulebb-build-tests\build\eMulebb-workspace-v0.72a-eMule-main\x64\Release\emule-tests.exe --test-suite=parity --test-case="Client UDP seam gates outgoing encryption on the global crypt preference": 11 assertions passed.
  • Release 1 decision: outgoing ED2K and Kad client UDP obfuscation follows the global crypt-layer preference. With crypt disabled, new outgoing client UDP sends stay plain; inbound encrypted datagrams remain accepted by the encrypted datagram receive path.