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

Proof Set and Chain Test Vectors #70

Merged
merged 21 commits into from
Dec 27, 2023

Conversation

Wind4Greg
Copy link
Contributor

@Wind4Greg Wind4Greg commented Dec 5, 2023

This PR provides test vectors (informational) for proof sets and chains for the eddsa-rdfc-2022 based on the updated procedures in the VC Data Integrity specification.

  • Starting with a document with a single proof add a proof to form a simple proof set.
  • Starting with a document with a proof set, add a proof to form a proof chain. In this case we will also demonstrate where previousProof can be any array, i.e., the new proof relies on two other proofs.
  • Starting with a document with a proof chain, add a proof to form a longer proof chain.

These test vectors make use of the same starting unsigned document used for all previous test vectors and adds a collection of four public/private key pairs for use in generating the test vectors.


Preview | Diff

Copy link
Contributor

@dlongley dlongley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't run this through an implementation yet, but it looks good from reading over it. Getting multiple implementations to confirm against the test suite will be the next step. Thanks!

{
"keyPair1": {
"publicKeyMultibase": "z6MktgKTsu1QhX6QPbyqG6geXdw6FQCZBPq7uQpieWbiQiG7",
"privateKeyMultibase": "z3u2W4YnTstS1nSSBAgZcYSJF43JuZ9uLV6bF38B1Bf8NugW"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC, these should all be secretKeyMultibase:

Suggested change
"privateKeyMultibase": "z3u2W4YnTstS1nSSBAgZcYSJF43JuZ9uLV6bF38B1Bf8NugW"
"secretKeyMultibase": "z3u2W4YnTstS1nSSBAgZcYSJF43JuZ9uLV6bF38B1Bf8NugW"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did a quick survey. Wikipedia (https://en.wikipedia.org/wiki/Public-key_cryptography) for public key cryptography uses the terms public and private key. Multi-codecs uses the terms public and private for the different parts of a key pair. Boneh and Shoup (https://crypto.stanford.edu/~dabo/cryptobook/BonehShoup_0_6.pdf) use the terms public and secret key. But I think that's so they can use terse notation such as sk and pk. All the test vectors in this document use the public/private terminology. Since both are common in the literature this should not cause confusion and I'd prefer not to change all the test vectors.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Data Integrity specifications use the term secretKeyMultibase, as defined here: https://w3c.github.io/vc-data-integrity/#multikey

@@ -2013,6 +2013,155 @@ <h3>Representation: Ed25519Signature2020</h3>
<pre class="example nohighlight" title="Signed Credential"
data-include="TestVectors/Ed25519Signature2020/signedEdSig.json" data-include-format="text"></pre>
</section>
<section>
<h3>Proof Sets and Chains</h3>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard to tell from the diff here if this is already in a section marked "non-normative", but if not, we need to add that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The entire test vector section is marked as informative:

    <section class="appendix informative">
      <h2>Test Vectors</h2>
      <section>
        <h3>Representation: eddsa-rdfc-2022</h3>

index.html Outdated Show resolved Hide resolved
Co-authored-by: Dave Longley <dlongley@digitalbazaar.com>
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Wind4Greg and others added 2 commits December 6, 2023 12:06
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
index.html Outdated Show resolved Hide resolved
Wind4Greg and others added 6 commits December 6, 2023 12:07
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Wind4Greg and others added 4 commits December 6, 2023 12:10
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
index.html Outdated Show resolved Hide resolved
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
index.html Outdated Show resolved Hide resolved
Wind4Greg and others added 3 commits December 6, 2023 12:13
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@msporny msporny added the editorial This item is editorial in nature. label Dec 10, 2023
@msporny
Copy link
Member

msporny commented Dec 27, 2023

Editorial, multiple reviews, changes requested and made, no objections, merging.

@msporny msporny merged commit 96509d5 into w3c:main Dec 27, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial This item is editorial in nature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants