Uploaded image for project: 'Indy SDK'
  1. Indy SDK
  2. IS-786

Add encode/decode functions to Indy-SDK for credential attributes



    • New Feature
    • Status: To Develop
    • Medium
    • Resolution: Unresolved
    • None
    • None
    • None
    • None


      In the current implementation of Indy-SDK, a credential to be created is passed to the Indy-SDK from a caller as a list of attributes with a raw and encoded value, something like this:


      {{ "attrs": { }}

          "attr1" : {"raw": "value1", "encoded": "value1_as_int" },

      {{    "attr2" : {"raw": "value2", "encoded": "value2_as_int" }}}


      There are two challenges with this:

      1. The encoding/decoding methods are left to the caller to define and use.  For example, the BC Gov VON-Agent implementation uses [this code to encode/decode|https://von-agent.readthedocs.io/en/latest/_modules/von_agent/codec.html?highlight=codec] the attributes.  This will cause interoperability problems between systems if different agent implementations use different encoding/decoding methods.
      2. The "raw" value can be unrelated to the encoded value and is never checked by the Indy-SDK model against the encoded value. This makes it possible to put in one value in the raw version, have the user see that and thinks that is what is being conveyed, but the encoded version could be different.

      At minimum, we'd like to see the "encode"/"decode" routines be within the Indy-SDK, so that it's not left to the callers to do potentially incompatible encodings. 

      Ideally, the caller would only send in the raw value and Indy-SDK would do the encoding of the raw values as part of the Credential Creation process.




        Issue Links



              Unassigned Unassigned
              swcurran Stephen Curran
              Antonio Vignapiano, Axel Nennker, Mike Lodder, Richard Esplin, Stephen Curran, Stephen Klump, Sudip Verma, Vladan Divac, Vyacheslav Gudkov
              3 Vote for this issue
              9 Start watching this issue