verifiablesoftware / vsw

Core project of VerifiableSoftware
Apache License 2.0
1 stars 0 forks source link

explanation of verification negative result #95

Open wenjing opened 3 years ago

wenjing commented 3 years ago

When a verifier fails to verify a presentation (proof), it should use whatever information it has to explain why. Reasons could be:

Here is an example when a credential has been revoked. The printout message is too vague. If the agent/controller knows, we should explain to the user as much as possible:

root@d96e6ab50afe:/# vsw verify -n vsw -v 0.0.3 -u https://files.pythonhosted.org/packages/10/32/fdd9f764160699ea93d7a81641f40c6232071a2d7746b918dc8fa3f86250/vsw-0.0.3.tar.gz -i 2dSg1ReG9SFCmH2xuLLmqb 2021-04-23 20:52:15 vsw.commands.verify INFO /usr/local/lib/python3.6/dist-packages/vsw/commands/verify.py Executing verify, please wait for response... digest: z2d9pM8uz5CPu3tZ7xmyyNPVVWyMLzNLdXSRuHfhd5EiVB1VVey2hR3UaGQ9PhAx1Wh4yuMPc6zsE1LiJDNVdxSy5N 2021-04-23 20:52:16 vsw.commands.verify INFO /usr/local/lib/python3.6/dist-packages/vsw/commands/verify.py presentation_exchange_id: 20be7cd8-2865-4849-a197-bcd93ec9866a waiting state update, current state is: request_sent waiting state update, current state is: presentation_received waiting state update, current state is: presentation_received waiting state update, current state is: verified 2021-04-23 20:52:20 vsw.commands.verify ERROR /usr/local/lib/python3.6/dist-packages/vsw/commands/verify.py Verified error, the credential might be revoked! root@d96e6ab50afe:/#

wenjing commented 3 years ago

I revoked a previously issued credential and test with verify again. It correctly reports back verified=false. But from its output, a user can't see why. In this case, if possible, we should say it is revoked. Because in this case a valid Presentation is returned from the holder and yet the result is false, would that mean it is a revoked credential?

wenjing commented 3 years ago

... ...

118, 184, 48, 123, 14, 147, 142, 112, 6, 246, 121, 119, 224, 148, 78, 193, 175, 94, 86, 9, 62, 213, 9, 104, 115, 222, 255, 106, 199, 37, 137, 21, 140, 191, 254, 79, 101, 77, 33, 86, 237, 49, 131, 79, 160, 100, 59, 123, 177, 226, 54, 155, 101, 201, 122, 152, 108, 139, 182, 27, 253, 163, 230, 0, 102, 103, 117, 40, 103, 51, 92, 199, 15, 123, 213, 228, 72, 79, 160, 102, 43, 215, 212]]}}, "requested_proof": {"revealed_attrs": {}, "revealed_attr_groups": {"0_software_certificate_uuid": {"sub_proof_index": 0, "values": {"developerdid": {"raw": "A9cEertJWkV6zKDTwcuEho", "encoded": "49051138543240507531368224277066083221192240786160112780064605078737594528486"}, "softwareurl": {"raw": "https://files.pythonhosted.org/packages/af/a2/269b2d19a6b9fd6dc2b504f91c7562fe9878b6edfecdc4a23407b0e9f872/vsw-0.0.11-py3-none-any.whl", "encoded": "53230171557720878823425978075631286588242450595207158701464928539381187189366"}, "buildlog": {"raw": "", "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549"}, "softwarename": {"raw": "vsw", "encoded": "27794724627924760946003145822168634251007853441043319696617228984540219434388"}, "builderdid": {"raw": "", "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549"}, "dependencydidlist": {"raw": "", "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549"}, "softwaredid": {"raw": "P9VxHNTAmn8LHnbXP95i4q", "encoded": "66794652378837012922532538839058369512494939019242473904555000669312869534124"}, "softwareversion": {"raw": "0.0.11", "encoded": "49513725895899689054064142250869158943483354144004310839609766134835162879760"}, "softwarehash": {"raw": "z2d9pM8uz5CPu3tZ7xmyyNPVVWyMLzNLdXSRuHfhd5EiVB1VVey2hR3UaGQ9PhAx1Wh4yuMPc6zsE1LiJDNVdxSy5N", "encoded": "12780441039413763077642702532216248602998773634090724917978692605609708690275"}, "mediatype": {"raw": "", "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549"}, "sourcedid": {"raw": "", "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549"}, "sourceurl": {"raw": "https://files.pythonhosted.org/packages/7e/27/300a61d019fec87cc9104da199262bd01d15298dc8c21c79b0cb5ffddd5a/vsw-0.0.11.tar.gz", "encoded": "94264147059808493236756018673486502755283721132118570832757932210166881055505"}, "sourcehash": {"raw": "z2d9pM8uz5CPu3tZ7xmyyNPVVWyMLzNLdXSRuHfhd5EiVB1VVey2hR3UaGQ9PhAx1Wh4yuMPc6zsE1LiJDNVdxSy5N", "encoded": "12780441039413763077642702532216248602998773634090724917978692605609708690275"}, "buildertooldidlist": {"raw": "", "encoded": "102987336249554097029535212322581322789799900648198034993379397001115665086549"}}}}, "self_attested_attrs": {}, "unrevealed_attrs": {}, "predicates": {}}, "identifiers": [{"schema_id": "UyDtaEFuTySAV9VZDykHkh:2:softwareCertificate:0.3", "cred_def_id": "A9cEertJWkV6zKDTwcuEho:3:CL:3733:default", "rev_reg_id": "A9cEertJWkV6zKDTwcuEho:4:A9cEertJWkV6zKDTwcuEho:3:CL:3733:default:CL_ACCUM:48d46f9b-34dd-4ab1-8c25-02c4437ccfb4", "timestamp": 1622765876}]}, "state": "verified", "presentation_request_dict": {"@type": "did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/present-proof/1.0/request-presentation", "@id": "cadb3b53-818e-4f89-bb12-4cedf42022d6", "request_presentations~attach": [{"@id": "libindy-request-presentation-0", "mime-type": "application/json", "data": {"base64": "eyJuYW1lIjogIlByb29mIG9mIFNvZnR3YXJlIENlcnRpZmljYXRlIiwgInZlcnNpb24iOiAiMS4wIiwgInJlcXVlc3RlZF9hdHRyaWJ1dGVzIjogeyIwX3NvZnR3YXJlX2NlcnRpZmljYXRlX3V1aWQiOiB7Im5hbWVzIjogWyJzb2Z0d2FyZW5hbWUiLCAic29mdHdhcmV2ZXJzaW9uIiwgImRldmVsb3BlcmRpZCIsICJzb2Z0d2FyZWRpZCIsICJzb2Z0d2FyZWhhc2giLCAic29mdHdhcmV1cmwiLCAibWVkaWF0eXBlIiwgInNvdXJjZWRpZCIsICJzb3VyY2V1cmwiLCAic291cmNlaGFzaCIsICJidWlsZGVydG9vbGRpZGxpc3QiLCAiZGVwZW5kZW5jeWRpZGxpc3QiLCAiYnVpbGRsb2ciLCAiYnVpbGRlcmRpZCJdLCAibm9uX3Jldm9rZWQiOiB7ImZyb20iOiAwLCAidG8iOiAxNjIyNzY2MTY2fSwgInJlc3RyaWN0aW9ucyI6IFt7InNjaGVtYV9pZCI6ICJVeUR0YUVGdVR5U0FWOVZaRHlrSGtoOjI6c29mdHdhcmVDZXJ0aWZpY2F0ZTowLjMiLCAiaXNzdWVyX2RpZCI6ICJBOWNFZXJ0SldrVjZ6S0RUd2N1RWhvIiwgImF0dHI6OnNvZnR3YXJlbmFtZTo6dmFsdWUiOiAidnN3IiwgImF0dHI6OnNvZnR3YXJldmVyc2lvbjo6dmFsdWUiOiAiMC4wLjExIn1dfX0sICJyZXF1ZXN0ZWRfcHJlZGljYXRlcyI6IHt9LCAibm9uY2UiOiAiMjk5NzU5OTkxODAyNzI4NDg4NTIyNDkzIn0="}}]}, "auto_present": false, "updated_at": "2021-06-04 00:22:51.319728Z", "verified": "false", "connection_id": "3314afd8-16a2-447d-817a-7019d6ffb3f2", "trace": false, "presentation_exchange_id": "cbeb03e3-d540-478d-a3cf-19498be5f7a2", "role": "verifier", "presentation_request": {"name": "Proof of Software Certificate", "version": "1.0", "requested_attributes": {"0_software_certificate_uuid": {"names": ["softwarename", "softwareversion", "developerdid", "softwaredid", "softwarehash", "softwareurl", "mediatype", "sourcedid", "sourceurl", "sourcehash", "buildertooldidlist", "dependencydidlist", "buildlog", "builderdid"], "non_revoked": {"from": 0, "to": 1622766166}, "restrictions": [{"schema_id": "UyDtaEFuTySAV9VZDykHkh:2:softwareCertificate:0.3", "issuer_did": "A9cEertJWkV6zKDTwcuEho", "attr::softwarename::value": "vsw", "attr::softwareversion::value": "0.0.11"}]}}, "requested_predicates": {}, "nonce": "299759991802728488522493"}} 2021-06-04 00:22:51 vsw.commands.verify INFO /usr/local/lib/python3.6/dist-packages/vsw/commands/verify.py Verified error, Verified result from indy is False! root@4d7cb3cff4ff:/# root@4d7cb3cff4ff:/#

wenjing commented 3 years ago

The issues involved here seem to be more fundamental. Postponing this to a future enhancement.