Skip to content
This repository was archived by the owner on Oct 9, 2023. It is now read-only.
This repository was archived by the owner on Oct 9, 2023. It is now read-only.

VerifyProofAsync error when credential attribute is a string made of digits starting with "0". #233

Description

@vasile135

Steps to reproduce:

  • Issued a credential that has an attribute with the mime type "text/plain" and the value "088003297" (a string that starts with "0" and has only digits).
  • The holder successfully accepted and stored this credential.
  • Created a presentation using this document and this attribute value. The created Proof JSON contains the following revealed attribute:
    "RegistrationDocumentNumber": { "sub_proof_index": 0, "raw": "088003297", "encoded": "88003297" },
    The "encoded" value have lost it's "0".
  • When the verifier calls _proofService.VerifyProofAsync(context, proof.RequestJson, proof.ProofJson), an error is thrown saying:
    "The encoded value for 'RegistrationDocumentNumber' is invalid. Expected '88003297'. Actual '88003297'".
    image
    When emit a document with the RegistrationDocumentNumber = "55454" for example, everything works as expected.

Expected result:

  • Must be able to create a valid presentation using an attribute with the string value "088003297" (starting with 0, only digits).

Not sure if the issue is in Aries or Indy. Theoretically the issue occurs when the Proof is created at the Hyperledger.Indy.AnonCredsApi.AnonCreds.ProverCreateProofAsync method that calls the NativeMethods.indy_prover_create_proof from Indy.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions