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

Improvements to Wallet interface to make it more generic #1236

Open
genaris opened this issue Jan 23, 2023 · 0 comments
Open

Improvements to Wallet interface to make it more generic #1236

genaris opened this issue Jan 23, 2023 · 0 comments

Comments

@genaris
Copy link
Contributor

genaris commented Jan 23, 2023

While it could be adapted quite well to Askar, current Wallet interface is significantly inspired in Indy SDK and therefore it may be interesting to update it to fit

Some remarks I can think of:

  • generateWalletKey could become a generic generateKey that receives a key algorithm and seed or any other parameter needed to securely generate a cryptographic key for the calling entity
  • import and export need a path and a key and we need to go to Indy documentation to see how they are supposed to work. IMHO, export must work on a Wallet instance and create a common dump that can be later imported by the same wallet class or another one. For instance, it can convert all wallet records to JSON in such a way that they can be read without the need of knowing the internals of the wallet class that generated the dump
  • rotateKey actually acts in a wallet that is not opened, so it's more a Wallet static or WalletApi method. I think it's more natural to simply do the rekey to an instance that is already opened.
  • pack and unpack are absolutely focused in DIDCommV1 right now. I think it will be nice to think on extracting these methods to a Packer/Unpacker class and leave in the Wallet interface everything needed to support that packing and unpacking (basically, generate keys and nonces, cryptobox sealing, etc.)
  • As discussed in feat: add initial askar package #1211, maybe WalletConfig can be left as generic as possible and leave each Wallet kind to define their own interfaces to identify and configure the wallets
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

1 participant