Open JoLuPuma opened 2 months ago
Something I'd like to clarify
3FfZB8jq8kch5qddakysA2
is not a DIDdid:sov:3FfZB8jq8kch5qddakysA2
is a DIDThe same way that:
www.linkedin.com
is not a DIDdid:web:www.linkedin.com
is a DIDThere's the concept of qualified/unqualified DID, but I strongly disagree with this as the did core specification has a strict representation that a DID MUST be a URI: https://www.w3.org/TR/did-core/#did-syntax
Unqualified DIDs are NOT DIDs, they are just an identifier. This term is misleading.
Now with this out of the way, what is the difference between did:sov and did:indy when resolving?
DID sov is just this, the did prefix did:sov:
and the did identifier 3FfZB8jq8kch5qddakysA2
.
This method requires the resolver to know in advance against which network to resolve it. This is not covered by the sovrin did method. The did doesn't contain sufficient information in itself to be resolved.
DID indy adds the concept of namespaces in the did prefix:
did:indy:<network>:<identifier>
This sort of addresses the issue, but the problem still remains that the resolver will need to have a list (or directory structure) of known Indy networks. Both of these DID methods require a resolver which has existing knowledge of which networks it knows and their labels.
I started an ACA-Py agent using the initial SEED
There's currently no way to provision aca-py with a seed resulting in something else than a sov provisioned identifier. However, a resolver will still be able to resolve this DID registered on the network using a did:indy:
syntax because they are essentially the same thing.
What the did indy method adds is a specified method to refer to other published objects such as anoncreds object through paths.
@JoLuPuma my first question would be, what do you look to achieve by using the did:indy:
method to refer to your dids? For operating the agent, it won't change much unless I'm missing something.
For the backwards compatibility part, yes I think this is something that should be included in aca-py. Is this something your team can look into?
@PatStLouis I think I didn't explain myself well. I was not talking about resolving a did:indy but the generation of the IDENTIFIER using the spec Indy Did Method . AFAIK for security reasons the spec Indy DID Method (https://hyperledger.github.io/indy-did-method/#nym-transaction-version) has changed or has added a new way to generate the IDENTIFIER (what it is called the did:indy approach):
did = Base58(Truncate_msb(16(publicKey)))
did = Base58(Truncate_msb(16(SHA256(publicKey))))
The problem is that ACA-Py does not respect or does not support the NYM Transaction Version 2 of the spec indy DID Method.
In my case I use the NYM Transaction Version 2 for generating the IDENTIFIER and Verkey, then I register them in the ledger. So when I start/provision my agent ACA-PY, by default, it generates un IDENTIFIER and Verkey from the SEED, but as it uses the did sov approche (NYM Transaction Version 1 ) the IDENTIFIER generated by ACA-Py is very different from the one I published in the ledger. Then the identifiers dont match and ACA-py does not start.
Error from the original post: indy_vdr.error.VdrError: Request failed: client request invalid: could not authenticate, verkey for 3FfZB8jq8kch5qddakysA2 cannot be found
This makes sense yes, so theres 2 things I could see happening:
First, it’s know that for the self-certifying Did’s, the namespace identifier or DID identifier is derived from the public key (Verkey). So for a same SEED value the DID identifier is different if we use the did:sov or did:indy approach (the Verkey remains the same in both cases). https://hyperledger.github.io/indy-did-method/#nym-transaction-version
For example , for a given SEED I generated this: did:indy approach
DID: NLe9bFbaNs1Eareg4eCXky and Verkey: 2EDa4DdtBVSVthbjP7S4p6u8tPZpasV9ywc9xLn1SkpA
did:sov approach
DID: 3FfZB8jq8kch5qddakysA2 and Verkey: 2EDa4DdtBVSVthbjP7S4p6u8tPZpasV9ywc9xLn1SkpA
My use case:
DID: NLe9bFbaNs1Eareg4eCXky and Verkey: 2EDa4DdtBVSVthbjP7S4p6u8tPZpasV9ywc9xLn1SkpA
indy_vdr.error.VdrError: Request failed: client request invalid: could not authenticate, verkey for 3FfZB8jq8kch5qddakysA2 cannot be found
3FfZB8jq8kch5qddakysA2
published in the ledgerIs it planned to replace did:sov by did:indy in ACA-Py or support both as described here?