Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

header: fix authentication when protected header is zero-length map #98

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Commits on Jul 28, 2024

  1. header: fix authentication when protected header is zero-length map

    COSE allows an empty protected header to be encoded as a zero-length
    map, even though the standard encourages encoding empty protected
    headers as a zero-length string (RFC 2119 SHOULD according to RFC 9052,
    Section 3).
    
    However, according to RFC 9052, Section 4.4, 5.3 and 6.3, even if the
    header is encoded as a zero-length map, the structure used for
    authentication should not include the empty map if the protected header
    is empty ("if there are no protected attributes, a zero-length byte
    string is used").
    
    This commit ensures that this behavior is implemented in coset, which
    previously did include the zero length map (encoded as h'a0') in
    signature calculation.
    This previously caused signature verification failures, e.g. when
    verifying the CoseSign1 object provided in
    https://github.com/cose-wg/Examples/blob/master/sign1-tests/sign-pass-03.json
    using coset.
    pulsastrix committed Jul 28, 2024
    Configuration menu
    Copy the full SHA
    ccb85ce View commit details
    Browse the repository at this point in the history

Commits on Jul 31, 2024

  1. Configuration menu
    Copy the full SHA
    d97cb14 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    818c958 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b501ff8 View commit details
    Browse the repository at this point in the history