Skip to content

fix(hip): CERT group decodes through the DH Group registry, but RFC 8002 has no registry #2283

Closed

Description

@JarryShaw

Describe the bug
CertParameter.cert_group in the HIP schema is an EnumField(namespace=Enum_Group), which is the DH group registry. _make_param_cert defaults it to Enum_Group.NIST_P_256. RFC 8002 section 2 defines CERT group as the "Group ID grouping multiple related CERT parameters", which is an arbitrary number with no registry behind it.

Reproduction
Parsing a CERT (768) parameter whose group octet is 7 yields cert_group=<Group.NIST_P_256: 7>.

Expected behavior
cert_group=7 (int). The maker should default to a neutral value such as 0, not a curve name.

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

Additional context
Fix: use a UInt8Field in the schema and int in the data class, and drop the cert_group_default/_namespace/_reversed maker arguments that exist only for enum lookup. This changes a released attribute and signature, so it needs a versionchanged note.

Related: #2282.

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)
    breakingBreaks public-facing behaviour or API (apply alongside the type label)
    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 fix edits the HIP REG_* parameters in hip.py, and this one 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

    breakingBreaks public-facing behaviour or API (apply alongside the type label)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