Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

non revoc proof failed when present proof #79

Closed
kukgini opened this issue Dec 5, 2023 · 5 comments
Closed

non revoc proof failed when present proof #79

kukgini opened this issue Dec 5, 2023 · 5 comments

Comments

@kukgini
Copy link
Contributor

kukgini commented Dec 5, 2023

This error only occurs in release 2.x.
If issuer issued revocable credential, prover failed non revoc proof.
The reason for failure is that one attribute (m2) is missing.

valid proof is looks like this:

"non_revoc_proof": {
"x_list": {
  "rho": "1BE378C8B66EB6798D8B84C6FED2436535DF1C168D47228D9321CBCC7C57E306",
  "r": "0CD8E067C9BB1F6FFFD94AE08E26D5E9B5E32696A8DE8D60E0AC1A86196ED1B7",
  "r_prime": "099A7460042766004CD14D4202387263E96A58DFB3693336D192C1FD3051126D",
  "r_prime_prime": "1541B6B13658A10A99F1F75AD7F840F11AA69375C571698F9B7FFA60D3CF2554",
  "r_prime_prime_prime": "17059BFE5AF7916E7B5D1A38242E7B78E9DAAA0F72D3547C910929146786B658",
  "o": "1AADE9AF28EA3CDFEE7A5ED0CCC14B515B41B3A63C9A889D2EB5FA7492E6F3D2",
  "o_prime": "03FDBA4754F70E622D55B21F3D2C65ECFDBDDFECBC0C2D88F3125DEE97A597DD",
  "m": "0F493D07BC032161AE58C55CF44EB570508793696D508833BBC26301442B79D9",
  "m_prime": "1467E5BF428819F7E8C1316F0FF941FC3F27400FCB35D36ADF63A44AA640F4AB",
  "t": "0AD6893FC8DA48BA504ED1D869715DD337C66C899B4F8C72D704AE2A4EA098EA",
  "t_prime": "1EBD9DAFB0A233603488B435457873D178559F9496E82395B4AE0EFDC986EEB0",
  "m2": "070835729BE26D3A1D0A0024340AD8CAC98133A00966FF3C96ACE9471F9A59F4",
  "s": "05CB5BB0EBEF0A39057F5EE4AC1A5EA0A53D9EB4F9DAE26C5D4EDF894A77BD06",
  "c": "12528C03032274975191E3E366B08F8BD41F1832D16526A2206E243A53609AE1"
},
"c_list": {
  "e": "6 4E7368F50A88AEC7BDBF87E67D7209F250C91BEBD84575D5CADFFC3DA783E258 4 139492D1555742ADFDE7F10B7732CC1184D7E3640C6EB53CE53E7C32AD1E9817 4 1EE02E13A12C43E4590899A2D9F7F5F20E93981B1E204CC022353428656727B7",
  "d": "6 39F1E13272FF79FFBF2D0D220C9A949F6247EAB34B1FD49C426A6AE91C1D8D3B 4 20A9E006F09A00C2EC216A2A20A7D97441D80A7487FFE44755A0F7DC53A6E049 4 39248E56CA283F70E845548EF8D98674444BE7A14CE7789610ECDF79DBECD111",
  "a": "6 65088FD87900A0FFC29EC46ED760DFFBFA8C7B43B9ABE3C29B51AF4481951E0E 4 2F712DEAFA5244DF2213F545F14853DA5647C011A09ACC43FBF426314896E0FF 4 189957E2589C30120C7A8C4B1A3A5DCB1DD1A5C44EAC1248E890D6E2FC53803F",
  "g": "6 4B366212405C7A16D0E3D84A758D87A9FD762CA64CD624848C829D6EC9BF6D6E 4 20768172AEC4294A436FC044C4616713142BFDCA6CB88D6800388EFD25B2D0AD 4 291FCA2EDFD9E5271AFF42150D41FE8AC9AF8288952CD0A25082A25337BB0AD3",
  "w": "21 13D5A2724D80C7F7F7B777236E03AA8A1F22CCB412EF89C1B853C609A6346F850 21 1427A37EC5DFA8ACF3B05203060C852C6860262AA6703B2464BD77D5AD4B0B5CD 6 7116880AB3C0A835249C2AE30ABA5B7D0B681AC6071409586C8FF0FBA0C489BA 4 0C7609AC24B88068A3620D5EDE508F52642EC4668DB9D17F2F91969AD5DB5289 6 6AFF301631D8B6AAF4BED9E76283542754D42659301C75D2EEE6B364C6CDFDF9 4 2FE00920D629B9DF8098803C42F89DDD96921CAE6E4595E555A32705C2E848C4",
  "s": "21 105444702C867EFDAC859CB7A9FCD4496FC433A25566A04CF66947700D2C03B1E 21 1172D1A3BB1446BDCF1A71012680DC420F64013A46EDA36A94F268790C006476B 6 7888AEF49184D801EAF1E316C8BEB027F821BB5412C515938F6B6C9E8CDAC065 4 32DA229AD62D94A66E1D6F5B8476F79EC6AE0AC27733985FD6B01CA79F3514F1 6 86428F6A92AFD306B4C8D4CCFC38D2813BE22291929DD483076C540967AEC658 4 2188613C8D0AEBC978445915E4C01726AB5934FCC71EE7B9054A36E292B7C855",
  "u": "21 12652E22498AA40EF25E52EEC956AA6E9BC54DC72BA39A0AA7B30B55D4F88406F 21 1284F13A48FDCE6FA63EACEFFA15D2526DAB8DC02C39B40E5E44D78999FD5393A 6 6FFC3231F16DC1E76DBA439B55F7FC5FBD52DD40BA6FABC9D4F6038F0D6EF0B9 4 0D8EF2943FD68DFC4CBB632C1F53083C41A79D5C11509FD72F170695ACF95121 6 805CF510EF1D07B63ABCAA8B4E82FFF41551FB8457B2B504060C23D74ADCEA49 4 2CB080F1F72FAAB900AD0B938646B5FA0CC0378AD2AC35F7173897714E74A28E"
}
} 

The proof of 2.0 is as follows. (Note that there is no m2 attribute in x_list)

"non_revoc_proof": {
"x_list": {
  "rho": "1D1B51B333A5EE44E5DC879D94E327C7D2C0BBFB88F447CF6C89832F2B548639",
  "r": "097B6CCB9E36E8A7FC08168A7964F35C79A30108973268FCCC33616D5D49ABB5",
  "r_prime": "0A78DA1EBCB4AD5622EB0452666176C635465B1BB546F65C105B74BD103B50F0",
  "r_prime_prime": "115986E91094C51CFC23FD973D594720FEB3E862CEB21038124ED523D1E20445",
  "r_prime_prime_prime": "0FFA23C1BC8F8B9497AF04A0E937D87A11E090F72E96F5A9287A85B557CE814E",
  "o": "23AE4A769EB217DC619ED5CCF6BAC10FA518E0270FB6B314B7B796D64EF14055",
  "o_prime": "0CFDD17005D2AE5D96999FA38F92638F3B500957CFC0E25D985D49B47B9AD3AF",
  "m": "21BC78FC7CCBCDB091B9F8DEB160F5D93DD61A1311B590146465D62FFB0D76E2",
  "m_prime": "07735EFF9E83503009E7ED0F823097099F4570147F7D638CFA94D77E02FDEE09",
  "t": "0E9529067C503C74F57A2DCD071AC0E0E1B374E843D7C7E88F7D1FF47D2761D8",
  "t_prime": "1307DFD5C4076C4CE9EC38B0CFABE806828C19F5384F084090B299ECFD4EA01F",
  "s": "07CE39A824689FD3577C46FFAE5027E8BA0DEE94B71ECB6E76C3E6C5FC2320F3",
  "c": "0B6D25EF40D6DEA834ED5043347C7A49E106AD2520EF8176339B60BC2C68A71F"
},
"c_list": {
  "e": "6 6285B6A4D84507BA667CD1E4A8B8C028D988C260B12F986A3B2437AAB7622F10 4 30B44FBCED416AE0B91D2BE12BABF1802DF473D6F8535019A595092A0CE17964 4 17EF991B519465841D7FF3D6F50113A627544813FD3A4560CB568944177007A3",
  "d": "6 39834097C428806DD37C62C135E6B74CEA50166B84DD2964EAA168C99533C6FA 4 2F5D89D92EFD61224D204A1D96252B10D81C999DC50AE89873585B27EFF4430F 4 4583BAD45931CA3D215048C59F668CCE639DB4EF9275769A7770CFFDE624E460",
  "a": "6 5EDCE2A3A2CA4F3C09E82E9D29EB180050C7B1DA00C925AC1678884BA2173B66 4 383AD9AB0468DE8938B42EF9D12EF6443BF98241DF71D18DC0986F1423E51959 4 10F3BCCD29BF32D0D1075F8CAA3BA5A8C5AF6E55134BC25AD7C09FB97077B0DE",
  "g": "6 4D6F567DEF10F22CECDF21C6678B834CE53BC44D61D2001D653BAA1248EE350A 4 26803043C9F5373C4A939F775740AE8F5A71349FB03DD80BA220C5A62A48433C 4 3CA98E5E14A9175DDCA30FBB68CB875B67953ED16AFC16CE9984B2C384424EC4",
  "w": "21 14073E1399C58F4D075AF5D3FF8E333C8E87107C0C8E155F624DE1484C24B5FB5 21 146777AEECDF4C25165AD1D039DA10825F0B29D752FDDBBE393CA40DE04848C8B 6 6A29F5AAB5FF2524AFFADB2C6FEAE912BBFB8A880C1FAE162F1E1A67541B7642 4 2605FA2ACC5661143E549FF70B95BC58196973E041E0943BCC8BF2856876BEDA 6 51A30330DF69B18BD7543850CEC26BF048E3B66F3AD6C69D19E4FA0E687EF939 4 283650B8776395191B92977DCF7EF5F8A082CBD6B9C6C2AE699974B7F783626A",
  "s": "21 1276F64396AEA229EFCCE2734BCF6A8EEE835F1DC9A6A393F7ABD35068A0559B6 21 141F6004D9E44A70740AA9CA4855012555463A1E6370D4A5F31A9B88C1643304D 6 79502E1F182F8121E4CEE24BAF174F690D204C8392B53353242D9B128FA60AD7 4 2C5D95A0F759B70387C96D3FC355A292ED2CBEB95D2D2A7D152FF6B3D01EDFD2 6 6CFAA9A3AA34A8AA48A17B58053387604B12EB462CF3FFA1D52CE50113DDDAA7 4 1AE6BE75B2EF1A29D83BCC407BA3EB46617D73214F4489ABF869A73950A94447",
  "u": "21 144E1C16FFABC0C53C96B5D8F72CD8F6C1D5FB5F4AE55E8B3D3B7C49044ED285D 21 141636B2F3470E07F7B48475881761781D650E3E8D308366E69F2483A8DBAABCC 6 6751A054249881ECCDA2A5C63DCFD96E553BE2F4853857D79A215D7D62D5A80B 4 18490167F005AF8A1A394D5338D422E8DAAD7CFB5B7822CCD89BB42E6B255022 6 6CF692C78BADAC94B4CEAE054E91C33A1BD171AB1CA4C15FF22FA303A9069908 4 1BAE44281E173A807D87DD9A2E52535EA7B765080A81EE99293D7996875E3856"
}
}
``
@conanoc
Copy link
Contributor

conanoc commented Dec 5, 2023

@andrewwhitehead Do you have any idea about this issue?
I have no idea why the proof created by anoncreds-rs ommits m2.

@conanoc
Copy link
Contributor

conanoc commented Dec 5, 2023

Because m2 is not optional in NonRevocProofXList of ursa, the proof json could not be parsed in indy-sdk.
https://github.com/hyperledger-archives/ursa/blob/main/libursa/src/cl/mod.rs#L1173

@kukgini
Copy link
Contributor Author

kukgini commented Dec 5, 2023

Additional information:
The verifier was aca-py 0.8.2 multitenancy mode using askar wallet.
(I thought that it is using indy-credex instead of indy-sdk)

/presnet-proof/record/{prex_ex_id} has this verification message:

"verified": "false",
"verified_msgs": [
    "VERIFY_ERROR::Input error [missing field `m2` at line 1 column 13219]"
  ]

@kukgini
Copy link
Contributor Author

kukgini commented Dec 13, 2023

When I did the same test with aca-py 0.9.0 which is using anoncreds-rs instead of Ursa, verification worked well. As mentioned in this issue, Ursa has vulnerabilities, so It would be fine to close this issue without fix anything.

@kukgini
Copy link
Contributor Author

kukgini commented Dec 13, 2023

Additionally, once the description of the vulnerability is made public, it would be good to add a warning that there is a vulnerability in the 1.0 release notes.

@kukgini kukgini closed this as completed Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants