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

Add ecdsa-sd-2023 test where a CBOR Tag is used (C -> B) #100

Open
wants to merge 7 commits into
base: add-sd-proof-value-check
Choose a base branch
from

Conversation

aljones15
Copy link
Contributor

@aljones15 aljones15 commented Nov 17, 2024

Pretty simple test, with a pretty complex Proxy and stub for the derive function of the selectiveSuite (the suite that creates the ecdsa-sd-2023 derived proof).

Features:

  1. A negative test for the statement: "CBOR-encode components per [RFC8949] where CBOR tagging MUST NOT be used on any of the components. Append the produced encoded value to proofValue"
  2. The CBOR tag is:
Uint8Array(uint8Array) {
      return [
         new Token(Type.tag, 2),
       new Token(Type.bytes, uint8Array.map(b => b + 1))
     ];
   }
};
  1. Only a single test is in this PR as there is a lot of code
  2. Subsequent PRs should abstract that Derive stub into a more composable Class that allows for more derive related stubs such as invalid hmac, invalid utf8 encodings, etc.
  3. Also separates stubs and proxies into separate files with comments on which suite the stubs come from
  4. This PR reuses code from ecdsa-sd-2023's library, but removes validators to allow for invalid test fixture creation

@aljones15 aljones15 self-assigned this Nov 17, 2024
@aljones15 aljones15 marked this pull request as ready for review November 17, 2024 15:28
@aljones15 aljones15 changed the title Adds tests where a CBOR Tag is used Adds tests where a CBOR Tag is used (C -> B) Nov 17, 2024
@aljones15 aljones15 changed the title Adds tests where a CBOR Tag is used (C -> B) Adds ecdsa-sd-2023 test where a CBOR Tag is used (C -> B) Nov 17, 2024
@aljones15 aljones15 changed the title Adds ecdsa-sd-2023 test where a CBOR Tag is used (C -> B) Add ecdsa-sd-2023 test where a CBOR Tag is used (C -> B) Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant