Skip to content

fix(hip): HIP_TRANSFORM maker builds the parameter for HIPv2, which its reader rejects #2275

Closed

Description

@JarryShaw

Describe the bug
_read_param_hip_transform raises when version != 1, since HIP_TRANSFORM is HIPv1-only. _make_param_hip_transform has no version check, unlike its siblings (e.g. _make_param_hip_cipher refuses HIPv1). #1133 added the gates for the HIPv2-only parameters but not this one.

Reproduction
proto._make_param_hip_transform(Parameter.HIP_TRANSFORM, version=2, suites=[Suite.AES_CBC_with_HMAC_SHA1]) returns 0241000200010000. HIP(version=2, parameters=[(Parameter.HIP_TRANSFORM, {...})]) then fails from the reader, in _read_param_hip_transform: ProtocolError: HIPv2: [ParamNo 577] invalid parameter.

Expected behavior
The maker refuses at build time, as _make_param_hip_cipher does for HIPv1. A make→parse pair should not produce bytes its own reader rejects.

System information
Linux, CPython 3.14, main at 9d504ead5.

Additional context
Fix: add if version != 1: raise ProtocolError(...) at the top of _make_param_hip_transform, matching the reader.

Activity

  1. added this to the PyPCAPKit v1.5 milestone on Oct 26, 2026
  2. added
    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)
    on Oct 26, 2026
  3. moved this to Pending in PyPCAPKiton Oct 26, 2026
  4. JarryShaw commented on Oct 26, 2026

    @JarryShaw
    OwnerAuthor

    Blocked until the #2309 fix PR merges. That PR reworks the HIP REG_* parameters in hip.py, and this fix edits the same file, so it starts from the merged tree.

  5. added
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 26, 2026
  6. moved this from Pending to Blocked in PyPCAPKiton Oct 26, 2026
  7. added
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    and removed
    blockedDeferred pending another issue or decision; see the last comment for what unblocks it
    on Oct 27, 2026
  8. JarryShaw commented on Oct 27, 2026

    @JarryShaw
    OwnerAuthor

    Unblocking — #2309 merged. Open to pick up now.

  9. added
    wipWork in flight - a covering PR is open or an agent is actively on it
    and removed
    pendingAccepted and unstarted - nobody is on it and nothing blocks it
    on Oct 27, 2026
  10. moved this from Blocked to WIP in PyPCAPKiton Oct 27, 2026
  11. removed
    wipWork in flight - a covering PR is open or an agent is actively on it
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssues reporting a defect (set by the bug report template; a default, not an assessment)

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions