digitalbazaar / ecdsa-sd-2023-cryptosuite

A selective disclosure Data Integrity cryptosuite based on ECDSA for use with jsonld-signatures.
BSD 3-Clause "New" or "Revised" License
13 stars 3 forks source link

Add support for verifying base proof #30

Closed Tschuck closed 1 month ago

Tschuck commented 1 month ago

When trying to verify credentials with base proof created using the ecdsa-sd-2023-cryptosuite library, verification fails because only derived proofs can be verified. Since the proof.cryptosuite of the base proof is already ecdsa-sd-2023, it would be beneficial to use the same library for verifying both the base proof and the derived proof.

This pull request (PR) splits the _createBaseProofVerifyData function into two parts: one for base proofs and one for derived proofs.

Details

Questions

I hope these changes align with the interests of the repository. Please let me know if you need any further adjustments.

dlongley commented 1 month ago

Thank you! We'll take a look at this. We might merge it into another branch and make some stylistic tweaks. We might also make it so that you have to call a new function createConfirmCryptosuite (instead of createVerifyCryptosuite to clearly differentiate between something that will accept a base proof from something that will accept a derived one.

Tschuck commented 1 month ago

Perfect, thanks! Looking forward to it :)

dlongley commented 1 month ago

@Tschuck, version 3.4 has been released that exposes createConfirmCryptosuite() which can be used to confirm a base proof.

Tschuck commented 1 month ago

Works well, thanks! :)