hyperledger / aries-vcx

aries-vcx is set of crates to work with DIDs, DID Documents, DIDComm, Verifiable Credentials and Hyperledger Aries.
https://didcomm.org
Apache License 2.0
125 stars 83 forks source link

fix: generate dids from indy seed secret bytes #1224

Open JamesKEbert opened 5 months ago

JamesKEbert commented 5 months ago

Fixes the Askar implementation of the did_wallet trait function create_and_store_my_did() to match other framework implementations, such as ACA-Py, by deterministically generating a DID from a 'seed' (which in Indy is just the secret key). So this function changes the generation to use Askar's from_secret_bytes instead of from_seed. See here for some discussion on the topic.

This required adjusting the underlying insert_key() method to only insert a LocalKey and leave the generation up to the call function (which seems like a better idea anyways IMO).