hyperledger / aries-rfcs

Hyperledger Aries is infrastructure for blockchain-rooted, peer-to-peer interactions
https://hyperledger.github.io/aries-rfcs/
Apache License 2.0
326 stars 217 forks source link

RFC0593: suggest we make `options` a JSONLD object such that it can be extended #662

Open llorllale opened 3 years ago

llorllale commented 3 years ago

The options object of the aries/ld-proof-vc-detail@v1.0 format is a plain old JSON object. It would be better if this object is actually a JSONLD document with @context and type such that it can be extended by different implementations. Of course, the definition of a core Aries JSONLD options type would still be useful and part of the JSONLD profile subtarget for interop. Making options a JSONLD document would also align perfectly with the data formats involved in this RFC.

The primary motivation for this is we would like enable the use of P curves with this attachment format, and we'd like to use JsonWebSignature2020 for it.

Note: specifying the verification method's type (JsonWebKey2020) is insufficient as the underlying key could be anything. We'd like to be able to specify the exact P curve to use (P256, P384, P512).

cc @TimoGlastra

TimoGlastra commented 3 years ago

I agree. As we're already in JSON-LD land it makes sense to utilize its features

How is DIF PE specify the key type? Seems like it is also missing this. Or is it expected that you support all underlying key types if you support the proof type?

Maybe we should have taken the same route as the VC HTTP API where you specify the verificationMethod instead of the proofType. Which is sufficient to determine the key type.