# Confidential Identity Library This library implements the Confidential Identity Library protocol, as described [here][wiki_main_design]. The cryptographic building blocks are described [here][wiki_crypto_design]. Refer to the README.md file in the root of the repository for build instructions. The library provides the following APIs. - Rust library: current directory - FFI Wrappers: [./ffi][ffi] - WASM library: [./wasm][wasm] - CLI: [./cli][cli] ## Library Description CDD Claims and Scope Claims are types of claims that can be attached to an investor's identity on the PolyMesh. CDD claims are registered by a trusted CDD provider using [cdd-register-did][cdd-register-did] API, and Scope claims are created and added to the chain by the investor using [add_claim][add-claim] API. CDD claims are generated by a PolyMesh trusted CDD provider during the CDD process (see [cdd-register-did][cdd-register-did]), and privately link an investor's unique id (`investor_unique_id`, which is kept secret between the investor and CDD provider) to their on-chain identity (`investor_did`, the serialized [IdentityId][IdentityId] of the investor). In order to achieve this, the CDD provider has to generate a CDD Id, include it in their claim, and submit it to the PolyMesh chain. Note that every time an investor requests a new identity from a CDD provider, the same unique identity (which is obtained from the Polymath Unique Identity System (PUIS)) must be used to create the CDD claim, even though the investor's DID will be different. A CDD claim has the following format. ```json { "investor_did":[32_bytes_array], "investor_unique_id":[16_bytes_array] } ``` Scope Claims are generated by the investors and reference a specific scope (e.g. asset); see [add_claim][add-claim]. The investor must generate this claim for each identity that they wish to use to invest in a particular asset (i.e. scope). Currently `scope_did` is set to be the asset's ticker name (a 12 bytes string, e.g. `AAPL`). The Scope Claim has the following format. ```json { "scope_did":[12_bytes_array], "investor_unique_id":[16_bytes_array] } ``` [cdd-register-did]: https://docs.polymesh.live/pallet_identity/enum.Call.html#variant.cdd_register_did [IdentityId]: https://docs.polymesh.live/polymesh_primitives/identity_id/struct.IdentityId.html [add-claim]: https://docs.polymesh.live/pallet_identity/enum.Call.html#variant.add_claim [wiki_main_design]: https://polymath.atlassian.net/wiki/spaces/PC/pages/172523576/Asset+Granularity+Unique+Identity [wiki_crypto_design]: https://polymath.atlassian.net/wiki/spaces/CE/pages/202571817/Claim+Proof+Prototype [ffi]: /confidential-identity/ffi/ [wasm]: /confidential-identity/wasm/ [cli]: /confidential-identity/clil/