hyperledger / anoncreds-spec

The specification for AnonCreds verifiable credential exchange.
https://hyperledger.github.io/anoncreds-spec/
Apache License 2.0
45 stars 24 forks source link

Question the correctness of holders AnonCreds data objects diagram #181

Closed wip-abramson closed 8 months ago

wip-abramson commented 9 months ago

I am wondering if the following diagram is misleading?

image

To me, interpretting this seems to imply that for every AnonCred credential that the holder recieves they must store the associated blinded link secret that they used during the issuance protocol.

I do not think that is correct.

My understanding is that I create a blinding of my link secret that is used for the issuance protocol BUT as part of that protocol I remove the blinding from the signature I recieve on my credential. Removing this blinding effectively means the holder stores a valid signature - different from the one the issuer created - over the set of attributes of the credential where one of these attributes is the unblinded link secret. Therefore, the blinding factor and the blinded link secret used in this protocol are only relevant for the protocol itself. There is no need to store these after the protocol has been completed.

During a presentation protocol, the holder creates a fresh unlinkable blinding for their link secret and an associated proof that they know the link secret that was signed in the credential. Again, this blinding is only used for the single protocol instance. No need to persist it.

I think I would update the spec text associated with the diagram to reflect some of this. The most important point, to me at least, is that ultimately the holder stores credentials which are a signature over a set of attributes where one attribute is their link secret

edeykholt commented 9 months ago

While I don't know the answer, I see the class diagram has an association with 1..1 multiplicities on both sides, which is suspicious.

swcurran commented 9 months ago

A PR #183 was merged on this that updated the text about this, but the image still needs to be updated, so this issue still needs action.

swcurran commented 9 months ago

@wip-abramson -- does this work? anoncreds-visual-data-model-overview-simple-trust-triangle

I'm tempted to put into the attributes the "link_secret (blinded)" as a sub of "attributes" to highlight where it is, but I'm not sure that is needed -- or worth the effort.

wip-abramson commented 9 months ago

I think this is perfect. Adding link secret (blinded) in the attributes is confusing to me. You might add link secret (blinded) to the presentation object.