uport-project / ethr-did

Create ethr DIDs
Apache License 2.0
259 stars 53 forks source link

if I haven't register my identity on the contract ,how can others get my publickey? #38

Closed relaxbao closed 4 years ago

relaxbao commented 4 years ago

hi ,

I have deeply read the ERC1056, but there is something I can't understand , can you help me ?

for example : I have an ethereum account ,as mentioned in the ERC1056 , I have naturally have an identity right ? I don't need to register on the registry contract .

but if I don't register on the registry contract ,how can I get the public Key ? because an important feature of DID is to get the public Keyfrom the DID, so we can use the public Key to encrypted something .

mirceanis commented 4 years ago

Correct. If an ethereum address has no activity on the registry then the default DID document is returned, which contains only the address itself under the public key entries. This can be used to verify signatures but not for encryption. To use it for encryption you need to add an attribute that sets an encryption public key. This requires an ethereum transaction.

Please see this section of the registry regarding key types: https://github.com/uport-project/ethr-did-resolver/blob/develop/README.md#non-ethereum-attributes

mirceanis commented 4 years ago

I believe this was answered. I'm closing it. Please reopen if necessary.

relaxbao commented 4 years ago

I believe this was answered. I'm closing it. Please reopen if necessary.

yes , thank you very much for your answering .