kaleido-io / kaleido-iden3-samples

Sample code for using the iden3 protocol to issue verifiable claims
Apache License 2.0
6 stars 4 forks source link

Identity and Claim Questions #9

Closed jcqjamesbond closed 1 year ago

jcqjamesbond commented 1 year ago

Hi, this is Chengqing from Weiming's team. We have several questions after reviewing this sample.

  1. If we are going to integrate this sample into real product. Are these identity files under the $HOMEDIR/iden3/XXX folder supposed to be saved in user's mobile or server, for instance, Identity Hub?
  2. we cannot find the detailed Merkle tree proof algorithm implementation, neither in this sample nor go-merkletree-sql
  3. we would like to know why generating claim and verifying claim use different language? Generating part uses Golang while verifying uses Javascript?
OBrezhniev commented 1 year ago

Hi @jcqjamesbond! I'm Oleksandr from Polygon ID & iden3.

Just noticed this project after a bug report from @Chengxuan in iden3/docs. :) Wanted to comment on the readme (will create another issue) and found this issue. BTW, great work, @jimthematrix, @Chengxuan!

I can try to answer on your second question.

Here's an overview of the algorithm: https://docs.iden3.io/publications/pdfs/Merkle-Tree.pdf

You can find examples of proofs and working with merkle tree in our unit tests here: https://github.com/iden3/go-merkletree-sql/blob/master/proof_test.go https://github.com/iden3/go-merkletree-sql/blob/master/db/memory/memory_test.go https://github.com/iden3/go-merkletree-sql/blob/master/db/test/test.go

Chengxuan commented 1 year ago

Hi @jcqjamesbond

  1. you used the word identify files if that's referring to a subset of files inside $HOMEDIR/iden3/XXX folder, then the answer is yes. Inside an identify folder: the private key and claim tree files need to be private and never leave user device. Revocation tree, Root tree should be publicly available. The identify state in the state transition files needs to be recorded on chain. https://github.com/iden3/docs/blob/8cf4a227eec3ffd26f971eea2f6d0d1dd197f788/mkdocs/docs/protocol/spec.md#interaction-between-identity-and-claims has a good explanation on the details.
  2. @OBrezhniev thanks for answering it.
  3. @jimthematrix looked deeper at both the node.js and golang libs. This repo used the programming language that had the most examples from iden3 tutorial. @OBrezhniev I'd appreciate your input on this one as well, we think there is a good parity between node.js and golang libs so that the entire tutorial could be written in a single programming language. Do you know if this is fair statement?
OBrezhniev commented 1 year ago

@Chengxuan We are preparing js libs for release, so that everything that is needed to create identities & claims, publishing identity states, generating zkp, etc would be available in js. But we haven't updated documentation/tutorials on that yet, so better use golang for managing issuer side for now. On verifier side js and golang have parity in features and support.