You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(hip): HIP_TRANSFORM maker builds the parameter for HIPv2, which its reader rejects #2275
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.
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.
Activity
JarryShaw commentedon Oct 26, 2026
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.JarryShaw commentedon Oct 27, 2026
Unblocking — #2309 merged. Open to pick up now.
fix(hip): correct 7 HIP parameter wire defects (#2271, #2275, #2276, #…
fix(hip): correct 7 HIP parameter wire defects (#2400)