hyperledger / aries-askar

Secure storage designed for Hyperledger Aries agents.
Apache License 2.0
58 stars 44 forks source link

[Question] Does Askar generate the same key to IndySDK ? #190

Closed conanoc closed 10 months ago

conanoc commented 10 months ago

I wonder if LocalKey::from_seed(KeyAlg::Ed25519, seed, None) and create_and_store_my_did(<config with the same seed>) generate the same key. Askar's LocalKey is using RandomDet::new(seed) for rng, but I cannot figure out what Indy SDK is using.

TimoGlastra commented 10 months ago

So as I understand it, the seed that was used in Indy SDK is actually the private key (encoded to string), and thus to achieve the same result for Askar as that you got for Indy SDK you need to use treat it as a private key.

swcurran commented 10 months ago

@andrewwhitehead — can you answer this one?

conanoc commented 10 months ago

I've tested with LocalKey::from_secret_bytes(KeyAlg::Ed25519, seed) and it generates the same key as create_and_store_my_did(<config with the same seed>). Thanks @TimoGlastra