spruceid / ssi

Core library for decentralized identity.
https://spruceid.dev
Apache License 2.0
180 stars 54 forks source link

Data Integrity `bbs-2023` Cryptosuite #550

Closed timothee-haudebourg closed 2 weeks ago

timothee-haudebourg commented 1 month ago

This PR implements the bbs-2023 cryptosuite defined by Data Integrity BBS Cryptosuites v1.0. It is implemented through the Bbs2023 type in ssi-data-integrity-suites library. The bbs feature must be enabled.

This is based on the zkryptium library providing a Rust implementation of the BBS Signature Scheme. Only the baseline feature option is supported for now. Other options seem not stabilized yet and use features outside of the BBS Signature Scheme not provided by zkryptium. Other implementations such as Digital Bazaar's only provide the baseline option as well.

I have not added Bbs2023 to the AnySuite enum, as there is no generic interface for Data-Integrity selective disclosure suites yet.

timothee-haudebourg commented 2 weeks ago

I've added a DataIntegrity::select method you can use to create a derived document from a base document signed with a SD suite.

let derived_vc = vc.select(params, options).await?;