Skip to content

Discrepancy in HKDF SuppPubInfo encoding #124

@BrianSipos

Description

@BrianSipos

The CoseBase.phdr_encoded() function currently correctly conforms to the COSE requirement that empty protected header maps be encoded as an empty byte string rather than a byte string containing an encoded empty map.

The similar use of an encoded protected header for the SuppPubInfo structure from Section 5.2 of RFC 9053 is currently encoded by pycose with the SupPubInfo.encode() function, which does not handle the special case of an empty protected map. Since the same logic applies in both places, it might be helpful to move it into a shared use stand-alone (internal) function.

This was originally discovered in BrianSipos/dtn-bpsec-cose#47.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions